====================================== | [ 155.520633][ T379] ================================================================== | [ 155.520985][ T379] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 155.521293][ T379] Read of size 1 at addr ffff888013fdc6ac by task teamd/379 | [ 155.521558][ T379] [ 155.521656][ T379] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 155.521659][ T379] Call Trace: [ 155.521663][ T379] [ 155.521664][ T379] dump_stack_lvl (lib/dump_stack.c:123) [ 155.521671][ T379] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 155.521679][ T379] ? kobject_put (lib/kobject.c:733) [ 155.521683][ T379] print_report (mm/kasan/report.c:483) [ 155.521687][ T379] ? kobject_put (lib/kobject.c:733) [ 155.521693][ T379] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 155.521697][ T379] ? kobject_put (lib/kobject.c:733) [ 155.521701][ T379] kasan_report (mm/kasan/report.c:597) [ 155.521707][ T379] ? kobject_put (lib/kobject.c:733) [ 155.521715][ T379] kobject_put (lib/kobject.c:733) [ 155.521719][ T379] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 155.521727][ T379] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 155.521730][ T379] ? generic_xdp_install (net/core/dev.c:11630) [ 155.521733][ T379] ? unregister_netdevice_many (net/core/dev.c:12241) [ 155.521736][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.521746][ T379] rtnl_dellink (net/core/rtnetlink.c:3580) [ 155.521753][ T379] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 155.521784][ T379] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 155.521790][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.521795][ T379] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 155.521799][ T379] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 155.521802][ T379] ? __lock_release (kernel/locking/lockdep.c:5536) [ 155.521807][ T379] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 155.521810][ T379] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 155.521814][ T379] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 155.521817][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.521824][ T379] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 155.521832][ T379] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 155.521835][ T379] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 155.521842][ T379] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 155.521845][ T379] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48 net/netlink/af_netlink.c:333) [ 155.521848][ T379] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 155.521853][ T379] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 155.521857][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.521862][ T379] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 155.521866][ T379] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 155.521872][ T379] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 155.521886][ T379] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 155.521891][ T379] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 155.521900][ T379] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 155.521903][ T379] ? __copy_msghdr (net/socket.c:2556) [ 155.521911][ T379] ___sys_sendmsg (net/socket.c:2686) [ 155.521916][ T379] ? copy_msghdr_from_user (net/socket.c:2673) [ 155.521920][ T379] ? do_pte_missing (mm/memory.c:6134) [ 155.521925][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.521931][ T379] ? __handle_mm_fault (mm/memory.c:6318) [ 155.521934][ T379] ? __pmd_alloc (mm/memory.c:6229) [ 155.521941][ T379] ? lock_vma_under_rcu (mm/mmap_lock.c:226) [ 155.521944][ T379] ? lock_vma_under_rcu (mm/mmap_lock.c:259) [ 155.521948][ T379] __sys_sendmsg (net/socket.c:2716) [ 155.521952][ T379] ? __sys_sendmsg_sock (net/socket.c:2701) [ 155.521955][ T379] ? exc_page_fault (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:109 ./arch/x86/include/asm/irqflags.h:151 arch/x86/mm/fault.c:1484 arch/x86/mm/fault.c:1532) [ 155.521964][ T379] ? do_user_addr_fault (./arch/x86/include/asm/atomic.h:93 ./include/linux/atomic/atomic-arch-fallback.h:949 ./include/linux/atomic/atomic-instrumented.h:401 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/mmap_lock.h:143 ./include/linux/mmap_lock.h:182 arch/x86/mm/fault.c:1338) [ 155.521974][ T379] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 155.521983][ T379] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 155.521988][ T379] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 155.521993][ T379] RIP: 0033:0x7f761c7ee1d7 [ 155.522001][ T379] 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) [ 155.522005][ T379] RSP: 002b:00007ffd855cf388 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 155.522013][ T379] RAX: ffffffffffffffda RBX: 00000000304e7320 RCX: 00007f761c7ee1d7 [ 155.522016][ T379] RDX: 0000000000000000 RSI: 00007ffd855cf3c0 RDI: 0000000000000005 [ 155.522018][ T379] RBP: 00000000304e7230 R08: 0000000000000003 R09: 0000000000000000 [ 155.522020][ T379] R10: 0000000000000020 R11: 0000000000000246 R12: 00000000304f5200 [ 155.522022][ T379] R13: 00007ffd855cf3c0 R14: 0000000000000000 R15: 00007ffd855cf520 | [ 155.550253][ T379] refcount_t: underflow; use-after-free. | [ 155.550499][ T379] WARNING: CPU: 2 PID: 379 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 155.550848][ T379] Modules linked in: bridge stp llc vrf veth | [ 155.551696][ T379] Tainted: [B]=BAD_PAGE [ 155.551870][ T379] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 155.552224][ T379] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 155.553132][ T379] Code: 7d 93 02 80 fb 01 0f 87 bb 99 d9 fe 83 e3 01 0f 85 51 ff ff ff c6 05 a8 7d 93 02 01 90 48 c7 c7 60 8d 25 a1 e8 32 bf 18 ff 90 <0f> 0b 90 90 e9 33 ff ff ff 48 89 df e8 b0 63 a1 ff e9 ba fe ff ff All code ======== 0: 7d 93 jge 0xffffffffffffff95 2: 02 80 fb 01 0f 87 add -0x78f0fe05(%rax),%al 8: bb 99 d9 fe 83 mov $0x83fed999,%ebx d: e3 01 jrcxz 0x10 f: 0f 85 51 ff ff ff jne 0xffffffffffffff66 15: c6 05 a8 7d 93 02 01 movb $0x1,0x2937da8(%rip) # 0x2937dc4 1c: 90 nop 1d: 48 c7 c7 60 8d 25 a1 mov $0xffffffffa1258d60,%rdi 24: e8 32 bf 18 ff call 0xffffffffff18bf5b 29: 90 nop 2a:* 0f 0b ud2 <-- trapping instruction 2c: 90 nop 2d: 90 nop 2e: e9 33 ff ff ff jmp 0xffffffffffffff66 33: 48 89 df mov %rbx,%rdi 36: e8 b0 63 a1 ff call 0xffffffffffa163eb 3b: e9 ba fe ff ff jmp 0xfffffffffffffefa Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 90 nop 3: 90 nop 4: e9 33 ff ff ff jmp 0xffffffffffffff3c 9: 48 89 df mov %rbx,%rdi c: e8 b0 63 a1 ff call 0xffffffffffa163c1 11: e9 ba fe ff ff jmp 0xfffffffffffffed0 [ 155.553893][ T379] RSP: 0018:ffffc900005f71f0 EFLAGS: 00010286 [ 155.554222][ T379] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 155.554563][ T379] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 155.554933][ T379] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff437e134 [ 155.555286][ T379] R10: 0000000000000003 R11: ffffc900005f6d80 R12: 0000000000000001 [ 155.555626][ T379] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 155.556000][ T379] FS: 00007f761c6adb80(0000) GS:ffff8880932f2000(0000) knlGS:0000000000000000 [ 155.556402][ T379] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 155.556696][ T379] CR2: 00007f18b82ceb70 CR3: 0000000009598006 CR4: 0000000000772ef0 [ 155.557034][ T379] PKRU: 55555554 [ 155.557192][ T379] Call Trace: [ 155.557349][ T379] [ 155.557459][ T379] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 155.557655][ T379] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 155.557875][ T379] ? generic_xdp_install (net/core/dev.c:11630) [ 155.558088][ T379] ? unregister_netdevice_many (net/core/dev.c:12241) [ 155.558271][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.558466][ T379] rtnl_dellink (net/core/rtnetlink.c:3580) [ 155.558650][ T379] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 155.558921][ T379] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 155.559134][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.559319][ T379] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 155.559514][ T379] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 155.559700][ T379] ? __lock_release (kernel/locking/lockdep.c:5536) [ 155.559928][ T379] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 155.560169][ T379] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 155.560377][ T379] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 155.560566][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.560775][ T379] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 155.560982][ T379] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 155.561192][ T379] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 155.561389][ T379] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 155.561572][ T379] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48 net/netlink/af_netlink.c:333) [ 155.561778][ T379] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 155.561990][ T379] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 155.562200][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.562397][ T379] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 155.562587][ T379] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 155.562799][ T379] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 155.563013][ T379] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 155.563210][ T379] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 155.563411][ T379] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 155.563636][ T379] ? __copy_msghdr (net/socket.c:2556) [ 155.563847][ T379] ___sys_sendmsg (net/socket.c:2686) [ 155.564061][ T379] ? copy_msghdr_from_user (net/socket.c:2673) [ 155.564246][ T379] ? do_pte_missing (mm/memory.c:6134) [ 155.564443][ T379] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 155.564628][ T379] ? __handle_mm_fault (mm/memory.c:6318) [ 155.564836][ T379] ? __pmd_alloc (mm/memory.c:6229) [ 155.565053][ T379] ? lock_vma_under_rcu (mm/mmap_lock.c:226) [ 155.565245][ T379] ? lock_vma_under_rcu (mm/mmap_lock.c:259) [ 155.565441][ T379] __sys_sendmsg (net/socket.c:2716) [ 155.565626][ T379] ? __sys_sendmsg_sock (net/socket.c:2701) [ 155.565841][ T379] ? exc_page_fault (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:109 ./arch/x86/include/asm/irqflags.h:151 arch/x86/mm/fault.c:1484 arch/x86/mm/fault.c:1532) [ 155.566059][ T379] ? do_user_addr_fault (./arch/x86/include/asm/atomic.h:93 ./include/linux/atomic/atomic-arch-fallback.h:949 ./include/linux/atomic/atomic-instrumented.h:401 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/mmap_lock.h:143 ./include/linux/mmap_lock.h:182 arch/x86/mm/fault.c:1338) [ 155.566351][ T379] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 155.566537][ T379] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 155.566734][ T379] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 155.566986][ T379] RIP: 0033:0x7f761c7ee1d7 [ 155.567300][ T379] 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) [ 155.568058][ T379] RSP: 002b:00007ffd855cf388 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 155.568336][ T379] RAX: ffffffffffffffda RBX: 00000000304e7320 RCX: 00007f761c7ee1d7 [ 155.568610][ T379] RDX: 0000000000000000 RSI: 00007ffd855cf3c0 RDI: 0000000000000005 [ 155.569019][ T379] RBP: 00000000304e7230 R08: 0000000000000003 R09: 0000000000000000 [ 155.569297][ T379] R10: 0000000000000020 R11: 0000000000000246 R12: 00000000304f5200 Finger prints: print_report:kasan_report:kobject_put:netdev_run_todo:rtnl_dellink refcount_warn_saturate:netdev_run_todo:rtnl_dellink:rtnetlink_rcv_msg:netlink_rcv_skb