====================================== | [ 12.874073] ------------[ cut here ]------------ | [ 12.874213] refcount_t: underflow; use-after-free. | [ 12.874294] WARNING: CPU: 2 PID: 1221 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 12.874384] Modules linked in: ip_gre gre cls_u32 sch_htb [ 12.874537] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 12.874608] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 12.874681] Code: ad e8 e8 54 ba ff 90 0f 0b 90 90 c3 80 3d 00 e6 2b 01 00 75 89 c6 05 f7 e5 2b 01 01 90 48 c7 c7 f8 48 55 ad e8 c5 54 ba ff 90 <0f> 0b 90 90 c3 80 3d db e5 2b 01 00 0f 85 62 ff ff ff c6 05 ce e5 All code ======== 0: ad lods %ds:(%rsi),%eax 1: e8 e8 54 ba ff call 0xffffffffffba54ee 6: 90 nop 7: 0f 0b ud2 9: 90 nop a: 90 nop b: c3 ret c: 80 3d 00 e6 2b 01 00 cmpb $0x0,0x12be600(%rip) # 0x12be613 13: 75 89 jne 0xffffffffffffff9e 15: c6 05 f7 e5 2b 01 01 movb $0x1,0x12be5f7(%rip) # 0x12be613 1c: 90 nop 1d: 48 c7 c7 f8 48 55 ad mov $0xffffffffad5548f8,%rdi 24: e8 c5 54 ba ff call 0xffffffffffba54ee 29: 90 nop 2a:* 0f 0b ud2 <-- trapping instruction 2c: 90 nop 2d: 90 nop 2e: c3 ret 2f: 80 3d db e5 2b 01 00 cmpb $0x0,0x12be5db(%rip) # 0x12be611 36: 0f 85 62 ff ff ff jne 0xffffffffffffff9e 3c: c6 .byte 0xc6 3d: 05 .byte 0x5 3e: ce (bad) 3f: e5 .byte 0xe5 Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 90 nop 3: 90 nop 4: c3 ret 5: 80 3d db e5 2b 01 00 cmpb $0x0,0x12be5db(%rip) # 0x12be5e7 c: 0f 85 62 ff ff ff jne 0xffffffffffffff74 12: c6 .byte 0xc6 13: 05 .byte 0x5 14: ce (bad) 15: e5 .byte 0xe5 [ 12.874820] RSP: 0018:ffffa23200767730 EFLAGS: 00010282 [ 12.874881] RAX: 0000000000000000 RBX: ffffa23200767740 RCX: 00000000ffffdfff [ 12.874957] RDX: 0000000000000000 RSI: 00000000ffffffea RDI: 0000000000000001 [ 12.875043] RBP: ffffa23200767238 R08: ffffffffadd5ba28 R09: 00000000ffffdfff [ 12.875119] R10: ffffffffadc7ba40 R11: ffffffffadd2ba40 R12: dead000000000122 [ 12.875201] R13: 00000000fffb9de8 R14: 0000000000000001 R15: ffff90f0c30a7000 [ 12.875280] FS: 00007f37803e0800(0000) GS:ffff90f150891000(0000) knlGS:0000000000000000 [ 12.875371] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 12.875440] CR2: 00000000004e64e8 CR3: 000000000916b003 CR4: 0000000000772ef0 [ 12.875598] PKRU: 55555554 [ 12.875654] Call Trace: [ 12.875710] [ 12.875764] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 12.875836] rtnl_dellink (net/core/rtnetlink.c:3580) [ 12.875912] ? virtio_fs_enqueue_req (fs/fuse/virtio_fs.c:1473) [ 12.875995] ? netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11653) [ 12.876068] ? rtnl_bridge_getlink (net/core/rtnetlink.c:3536) [ 12.876147] rtnetlink_rcv_msg (net/core/rtnetlink.c:6959) [ 12.876216] ? get_page_from_freelist (mm/page_alloc.c:1226 mm/page_alloc.c:1848 mm/page_alloc.c:1858 mm/page_alloc.c:3884) [ 12.876296] ? rtnl_calcit.isra.0 (net/core/rtnetlink.c:6861) [ 12.876378] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 12.876449] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 12.876517] ? __alloc_skb (net/core/skbuff.c:690) [ 12.876586] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 12.876654] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 12.876726] ? copy_msghdr_from_user (net/socket.c:2570) [ 12.876807] ___sys_sendmsg (net/socket.c:2686) [ 12.876874] ? do_wp_page (./include/linux/mmu_notifier.h:468 mm/memory.c:3786 mm/memory.c:4140) [ 12.876942] ? ___pte_offset_map (./include/linux/pgtable.h:347 ./include/linux/pgtable.h:635 mm/pgtable-generic.c:288) [ 12.877011] ? nfulnl_rcv_nl_event (net/netfilter/nfnetlink_log.c:836) [ 12.877103] ? fsnotify_grab_connector (fs/notify/mark.c:709) [ 12.877184] ? fsnotify_destroy_marks (fs/notify/mark.c:937) [ 12.877278] __sys_sendmsg (net/socket.c:2716) [ 12.877340] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 12.877411] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 12.877488] RIP: 0033:0x7f37805ae1d7 [ 12.877551] 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) [ 12.877779] RSP: 002b:00007fff6cb356e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 12.877883] RAX: ffffffffffffffda RBX: 00007fff6cb35e10 RCX: 00007f37805ae1d7 [ 12.877984] RDX: 0000000000000000 RSI: 00007fff6cb35750 RDI: 0000000000000005 [ 12.878089] RBP: 0000000000000001 R08: 0000000000000003 R09: 0000000000000078 [ 12.878195] R10: 00007f37804aaf60 R11: 0000000000000246 R12: 0000000000000001 [ 12.878300] R13: 00000000690de770 R14: 0000000000499600 R15: 0000000000000000 | [ 28.737085] ------------[ cut here ]------------ | [ 28.737208] kernel BUG at net/core/net-sysfs.c:2246! | [ 28.737263] Oops: invalid opcode: 0000 [#1] SMP | [ 28.737454] Tainted: [W]=WARN [ 28.737495] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 28.737564] RIP: 0010:netdev_release (net/core/net-sysfs.c:2246 net/core/net-sysfs.c:2242) [ 28.737628] Code: fa 0f 1f 44 00 00 80 7f d8 04 75 1d 55 48 8d af a8 fa ff ff 48 8b bf e0 fb ff ff e8 ed d7 a4 ff 48 89 ef 5d e9 a4 de a4 ff 90 <0f> 0b 90 f3 0f 1e fa 0f 1f 44 00 00 55 48 89 f5 48 8d 97 c8 fb ff All code ======== 0: fa cli 1: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 6: 80 7f d8 04 cmpb $0x4,-0x28(%rdi) a: 75 1d jne 0x29 c: 55 push %rbp d: 48 8d af a8 fa ff ff lea -0x558(%rdi),%rbp 14: 48 8b bf e0 fb ff ff mov -0x420(%rdi),%rdi 1b: e8 ed d7 a4 ff call 0xffffffffffa4d80d 20: 48 89 ef mov %rbp,%rdi 23: 5d pop %rbp 24: e9 a4 de a4 ff jmp 0xffffffffffa4decd 29: 90 nop 2a:* 0f 0b ud2 <-- trapping instruction 2c: 90 nop 2d: f3 0f 1e fa endbr64 31: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 36: 55 push %rbp 37: 48 89 f5 mov %rsi,%rbp 3a: 48 rex.W 3b: 8d .byte 0x8d 3c: 97 xchg %eax,%edi 3d: c8 .byte 0xc8 3e: fb sti 3f: ff .byte 0xff Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 90 nop 3: f3 0f 1e fa endbr64 7: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) c: 55 push %rbp d: 48 89 f5 mov %rsi,%rbp 10: 48 rex.W 11: 8d .byte 0x8d 12: 97 xchg %eax,%edi 13: c8 .byte 0xc8 14: fb sti 15: ff .byte 0xff [ 28.737823] RSP: 0018:ffffa232005f7bf0 EFLAGS: 00010297 [ 28.737890] RAX: ffffffffacf51ca0 RBX: 00000000ffffffff RCX: 0000000000000003 [ 28.737972] RDX: 0000000000000007 RSI: ffffffffacd58ea4 RDI: ffff90f0c2dba558 [ 28.738052] RBP: ffff90f0c2dba558 R08: 0000000000000010 R09: 0000000000000298 [ 28.738130] R10: 0000000000000400 R11: 00000000000002a0 R12: ffff90f0c96cc300 [ 28.738212] R13: ffffffffad2b2ea0 R14: ffff90f0c1b80190 R15: ffff90f0c2dba000 [ 28.738293] FS: 00007f1d9c1dc000(0000) GS:ffff90f150911000(0000) knlGS:0000000000000000 [ 28.738379] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 28.738450] CR2: 000055739a83b3b0 CR3: 0000000005c24006 CR4: 0000000000772ef0 [ 28.738530] PKRU: 55555554 [ 28.738562] Call Trace: [ 28.738590] [ 28.738622] device_release (drivers/base/core.c:2569) [ 28.738670] kobject_put (lib/kobject.c:693 lib/kobject.c:720 ./include/linux/kref.h:65 lib/kobject.c:737) [ 28.738716] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 28.738766] nsim_destroy (drivers/net/netdevsim/netdevsim.h:396 drivers/net/netdevsim/netdev.c:1186) netdevsim [ 28.738832] __nsim_dev_port_del (drivers/net/netdevsim/dev.c:441 drivers/net/netdevsim/dev.c:1474) netdevsim [ 28.738890] nsim_dev_reload_destroy (drivers/net/netdevsim/dev.c:1483 drivers/net/netdevsim/dev.c:1707) netdevsim [ 28.738949] nsim_drv_remove (drivers/net/netdevsim/dev.c:1724) netdevsim [ 28.739007] device_release_driver_internal (drivers/base/dd.c:1276 drivers/base/dd.c:1297) [ 28.739066] bus_remove_device (./include/linux/kobject.h:193 (discriminator 3) drivers/base/base.h:73 (discriminator 3) drivers/base/bus.c:586 (discriminator 3)) [ 28.739112] device_del (drivers/base/core.c:3879) [ 28.739159] device_unregister (drivers/base/core.c:3796 drivers/base/core.c:3920) [ 28.739205] del_device_store (drivers/net/netdevsim/bus.c:248) netdevsim [ 28.739266] kernfs_fop_write_iter (fs/kernfs/file.c:88 fs/kernfs/file.c:356) [ 28.739326] vfs_write (fs/read_write.c:594 fs/read_write.c:686) [ 28.739373] ksys_write (fs/read_write.c:738) [ 28.739420] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 28.739468] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 28.739527] RIP: 0033:0x7f1d9c2dc257 [ 28.739574] Code: 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 All code ======== 0: 0f 00 (bad) 2: f7 d8 neg %eax 4: 64 89 02 mov %eax,%fs:(%rdx) 7: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax e: eb b7 jmp 0xffffffffffffffc7 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 01 00 00 00 mov $0x1,%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: 48 89 54 24 18 mov %rdx,0x18(%rsp) 3c: 48 rex.W 3d: 89 .byte 0x89 3e: 74 24 je 0x64 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: 48 89 54 24 18 mov %rdx,0x18(%rsp) 12: 48 rex.W 13: 89 .byte 0x89 14: 74 24 je 0x3a [ 28.739759] RSP: 002b:00007ffce82d1a58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 28.739843] RAX: ffffffffffffffda RBX: 00007f1d9c3d8780 RCX: 00007f1d9c2dc257 [ 28.739948] RDX: 0000000000000002 RSI: 000055739a83b3b0 RDI: 0000000000000001 [ 28.740025] RBP: 0000000000000002 R08: 0000000000000000 R09: 00007f1d9c38ed20 [ 28.740102] R10: 00007f1d9c38ec20 R11: 0000000000000246 R12: 0000000000000002 Finger prints: refcount_warn_saturate:netdev_run_todo:rtnl_dellink:rtnetlink_rcv_msg:netlink_rcv_skb netdev_release:device_release:kobject_put:netdev_run_todo:nsim_destroy