====================================== | [ 111.527534] ------------[ cut here ]------------ | [ 111.527691] refcount_t: underflow; use-after-free. | [ 111.527758] WARNING: CPU: 3 PID: 367 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 111.527838] Modules linked in: bridge stp llc vrf veth [ 111.528008] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 111.528056] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 111.528097] Code: a8 e8 18 df ba ff 90 0f 0b 90 90 c3 80 3d f9 da eb 00 00 75 89 c6 05 f0 da eb 00 01 90 48 c7 c7 28 e0 71 a8 e8 f5 de ba ff 90 <0f> 0b 90 90 c3 80 3d d4 da eb 00 00 0f 85 62 ff ff ff c6 05 c7 da All code ======== 0: a8 e8 test $0xe8,%al 2: 18 df sbb %bl,%bh 4: ba ff 90 0f 0b mov $0xb0f90ff,%edx 9: 90 nop a: 90 nop b: c3 ret c: 80 3d f9 da eb 00 00 cmpb $0x0,0xebdaf9(%rip) # 0xebdb0c 13: 75 89 jne 0xffffffffffffff9e 15: c6 05 f0 da eb 00 01 movb $0x1,0xebdaf0(%rip) # 0xebdb0c 1c: 90 nop 1d: 48 c7 c7 28 e0 71 a8 mov $0xffffffffa871e028,%rdi 24: e8 f5 de ba ff call 0xffffffffffbadf1e 29: 90 nop 2a:* 0f 0b ud2 <-- trapping instruction 2c: 90 nop 2d: 90 nop 2e: c3 ret 2f: 80 3d d4 da eb 00 00 cmpb $0x0,0xebdad4(%rip) # 0xebdb0a 36: 0f 85 62 ff ff ff jne 0xffffffffffffff9e 3c: c6 .byte 0xc6 3d: 05 .byte 0x5 3e: c7 (bad) 3f: da .byte 0xda Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 90 nop 3: 90 nop 4: c3 ret 5: 80 3d d4 da eb 00 00 cmpb $0x0,0xebdad4(%rip) # 0xebdae0 c: 0f 85 62 ff ff ff jne 0xffffffffffffff74 12: c6 .byte 0xc6 13: 05 .byte 0x5 14: c7 (bad) 15: da .byte 0xda [ 111.528235] RSP: 0018:ffffaf16c02a3730 EFLAGS: 00010282 [ 111.528275] RAX: 0000000000000000 RBX: ffffaf16c02a3740 RCX: 00000000ffffdfff [ 111.528354] RDX: 0000000000000000 RSI: 00000000ffffffea RDI: 0000000000000001 [ 111.528410] RBP: ffffaf16c02a3248 R08: ffffffffa8b56a28 R09: 00000000ffffdfff [ 111.528499] R10: ffffffffa8a76a40 R11: ffffffffa8b26a40 R12: dead000000000122 [ 111.528557] R13: 00000000fffd1f3c R14: 0000000000000001 R15: ffffa0b086460000 [ 111.528646] FS: 00007fdc249fab80(0000) GS:ffffa0b115b59000(0000) knlGS:0000000000000000 [ 111.528710] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 111.528760] CR2: 00007f34f6fe9760 CR3: 0000000003361001 CR4: 0000000000772ef0 [ 111.528812] PKRU: 55555554 [ 111.528836] Call Trace: [ 111.528871] [ 111.528902] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 111.528954] rtnl_dellink (net/core/rtnetlink.c:3580) [ 111.529002] ? kmem_cache_alloc_node_noprof (./include/linux/kernel.h:61 ./include/linux/sched/mm.h:321 mm/slub.c:4921 mm/slub.c:5256 mm/slub.c:5332) [ 111.529050] ? finish_task_switch.isra.0 (./arch/x86/include/asm/irqflags.h:42 ./arch/x86/include/asm/irqflags.h:119 kernel/sched/sched.h:1559 kernel/sched/core.c:5073 kernel/sched/core.c:5191) [ 111.529097] ? kmalloc_reserve (net/core/skbuff.c:586 (discriminator 2)) [ 111.529142] ? kmalloc_reserve (net/core/skbuff.c:586 (discriminator 2)) [ 111.529173] ? rtnl_bridge_getlink (net/core/rtnetlink.c:3536) [ 111.529217] rtnetlink_rcv_msg (net/core/rtnetlink.c:6959) [ 111.529248] ? netlink_unicast (net/netlink/af_netlink.c:1269 net/netlink/af_netlink.c:1359) [ 111.529284] ? rtnl_calcit.isra.0 (net/core/rtnetlink.c:6861) [ 111.529334] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 111.529384] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 111.529428] ? __alloc_skb (net/core/skbuff.c:690) [ 111.529477] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 111.529523] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 111.529571] ? copy_msghdr_from_user (net/socket.c:2570) [ 111.529634] ___sys_sendmsg (net/socket.c:2686) [ 111.529681] ? __handle_mm_fault (mm/memory.c:5690 mm/memory.c:5832 mm/memory.c:4361 mm/memory.c:6177 mm/memory.c:6318) [ 111.529743] ? anon_pipe_write (fs/pipe.c:598) [ 111.529792] __sys_sendmsg (net/socket.c:2716) [ 111.529838] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 111.529889] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 111.529952] RIP: 0033:0x7fdc24b3b1d7 [ 111.530002] Code: 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 All code ======== 0: 0e (bad) 1: 00 f7 add %dh,%bh 3: d8 64 89 02 fsubs 0x2(%rcx,%rcx,4) 7: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax e: eb b9 jmp 0xffffffffffffffc9 10: 0f 1f 00 nopl (%rax) 13: f3 0f 1e fa endbr64 17: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax 1e: 00 1f: 85 c0 test %eax,%eax 21: 75 10 jne 0x33 23: b8 2e 00 00 00 mov $0x2e,%eax 28: 0f 05 syscall 2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 51 ja 0x83 32: c3 ret 33: 48 83 ec 28 sub $0x28,%rsp 37: 89 54 24 1c mov %edx,0x1c(%rsp) 3b: 48 89 74 24 10 mov %rsi,0x10(%rsp) Code starting with the faulting instruction =========================================== 0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax 6: 77 51 ja 0x59 8: c3 ret 9: 48 83 ec 28 sub $0x28,%rsp d: 89 54 24 1c mov %edx,0x1c(%rsp) 11: 48 89 74 24 10 mov %rsi,0x10(%rsp) [ 111.530182] RSP: 002b:00007ffd8496ec08 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 111.530265] RAX: ffffffffffffffda RBX: 0000000003d26320 RCX: 00007fdc24b3b1d7 [ 111.530340] RDX: 0000000000000000 RSI: 00007ffd8496ec40 RDI: 0000000000000005 [ 111.530420] RBP: 0000000003d26230 R08: 0000000000000003 R09: 0000000000000000 [ 111.530507] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000003d499a0 Finger prints: refcount_warn_saturate:netdev_run_todo:rtnl_dellink:rtnetlink_rcv_msg:netlink_rcv_skb