====================================== | [ 50.113855][ T318] ================================================================== | [ 50.114388][ T318] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 50.114845][ T318] Read of size 1 at addr ffff88800d5916ac by task teamd/318 | [ 50.115273][ T318] [ 50.115479][ T318] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 50.115483][ T318] Call Trace: [ 50.115487][ T318] [ 50.115490][ T318] dump_stack_lvl (lib/dump_stack.c:123) [ 50.115500][ T318] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 50.115515][ T318] ? kobject_put (lib/kobject.c:733) [ 50.115525][ T318] print_report (mm/kasan/report.c:483) [ 50.115530][ T318] ? kobject_put (lib/kobject.c:733) [ 50.115535][ T318] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 50.115541][ T318] ? kobject_put (lib/kobject.c:733) [ 50.115546][ T318] kasan_report (mm/kasan/report.c:597) [ 50.115553][ T318] ? kobject_put (lib/kobject.c:733) [ 50.115563][ T318] kobject_put (lib/kobject.c:733) [ 50.115569][ T318] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 50.115577][ T318] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 50.115581][ T318] ? generic_xdp_install (net/core/dev.c:11630) [ 50.115586][ T318] ? unregister_netdevice_many (net/core/dev.c:12241) [ 50.115592][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.115613][ T318] rtnl_dellink (net/core/rtnetlink.c:3580) [ 50.115626][ T318] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 50.115661][ T318] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 50.115670][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.115680][ T318] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 50.115686][ T318] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 50.115690][ T318] ? __lock_release (kernel/locking/lockdep.c:5536) [ 50.115698][ T318] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 50.115704][ T318] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 50.115711][ T318] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 50.115719][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.115732][ T318] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 50.115740][ T318] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 50.115746][ T318] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 50.115760][ T318] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 50.115764][ T318] ? 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) [ 50.115771][ T318] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 50.115779][ T318] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 50.115786][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.115795][ T318] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 50.115804][ T318] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 50.115811][ T318] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 50.115822][ T318] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 50.115829][ T318] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 50.115842][ T318] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 50.115848][ T318] ? __copy_msghdr (net/socket.c:2556) [ 50.115863][ T318] ___sys_sendmsg (net/socket.c:2686) [ 50.115870][ T318] ? copy_msghdr_from_user (net/socket.c:2673) [ 50.115877][ T318] ? do_pte_missing (mm/memory.c:6134) [ 50.115887][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.115897][ T318] ? __handle_mm_fault (mm/memory.c:6318) [ 50.115904][ T318] ? __pmd_alloc (mm/memory.c:6229) [ 50.115916][ T318] ? lock_vma_under_rcu (mm/mmap_lock.c:226) [ 50.115921][ T318] ? lock_vma_under_rcu (mm/mmap_lock.c:259) [ 50.115929][ T318] __sys_sendmsg (net/socket.c:2716) [ 50.115935][ T318] ? __sys_sendmsg_sock (net/socket.c:2701) [ 50.115942][ T318] ? 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) [ 50.115957][ T318] ? 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) [ 50.115978][ T318] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 50.115991][ T318] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 50.116000][ T318] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 50.116010][ T318] RIP: 0033:0x7f3c9c2601d7 [ 50.116018][ T318] 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) [ 50.116024][ T318] RSP: 002b:00007ffd5d418658 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 50.116033][ T318] RAX: ffffffffffffffda RBX: 0000000039965320 RCX: 00007f3c9c2601d7 [ 50.116037][ T318] RDX: 0000000000000000 RSI: 00007ffd5d418690 RDI: 0000000000000005 [ 50.116039][ T318] RBP: 0000000039965230 R08: 0000000000000003 R09: 0000000000000000 [ 50.116042][ T318] R10: 0000000000000200 R11: 0000000000000246 R12: 0000000039965690 [ 50.116045][ T318] R13: 00007ffd5d418690 R14: 0000000000000000 R15: 00007ffd5d4187f0 | [ 50.159826][ T318] refcount_t: underflow; use-after-free. | [ 50.161301][ T318] WARNING: CPU: 1 PID: 318 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 50.161941][ T318] Modules linked in: act_gact act_mirred cls_flower sch_ingress ip_gre gre 8021q vrf veth | [ 50.163243][ T318] Tainted: [B]=BAD_PAGE [ 50.163487][ T318] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 50.163828][ T318] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 50.164354][ T318] 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 45 8a 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 45 8a mov $0xffffffff8a458d60,%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 [ 50.165503][ T318] RSP: 0000:ffffc900005771f0 EFLAGS: 00010286 [ 50.165852][ T318] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 50.166400][ T318] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 50.166808][ T318] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff15be134 [ 50.167356][ T318] R10: 0000000000000003 R11: ffffc90000576d80 R12: 0000000000000001 [ 50.167749][ T318] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 50.168265][ T318] FS: 00007f3c9c11fb80(0000) GS:ffff8880aa072000(0000) knlGS:0000000000000000 [ 50.168733][ T318] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 50.169193][ T318] CR2: 00007f24a0a56000 CR3: 0000000013e17002 CR4: 0000000000772ef0 [ 50.169622][ T318] PKRU: 55555554 [ 50.169830][ T318] Call Trace: [ 50.170184][ T318] [ 50.170328][ T318] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 50.170612][ T318] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 50.171022][ T318] ? generic_xdp_install (net/core/dev.c:11630) [ 50.171288][ T318] ? unregister_netdevice_many (net/core/dev.c:12241) [ 50.171548][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.171836][ T318] rtnl_dellink (net/core/rtnetlink.c:3580) [ 50.172241][ T318] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 50.172601][ T318] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 50.173003][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.173277][ T318] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 50.173557][ T318] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 50.173848][ T318] ? __lock_release (kernel/locking/lockdep.c:5536) [ 50.174264][ T318] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 50.174574][ T318] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 50.174740][ T318] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 50.175017][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.175207][ T318] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 50.175365][ T318] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 50.175530][ T318] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 50.175688][ T318] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 50.175857][ T318] ? 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) [ 50.176126][ T318] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 50.176292][ T318] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 50.176460][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.176620][ T318] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 50.176780][ T318] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 50.177044][ T318] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 50.177332][ T318] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 50.177603][ T318] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 50.177998][ T318] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 50.178339][ T318] ? __copy_msghdr (net/socket.c:2556) [ 50.178648][ T318] ___sys_sendmsg (net/socket.c:2686) [ 50.179024][ T318] ? copy_msghdr_from_user (net/socket.c:2673) [ 50.179294][ T318] ? do_pte_missing (mm/memory.c:6134) [ 50.179594][ T318] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 50.180013][ T318] ? __handle_mm_fault (mm/memory.c:6318) [ 50.180278][ T318] ? __pmd_alloc (mm/memory.c:6229) [ 50.180546][ T318] ? lock_vma_under_rcu (mm/mmap_lock.c:226) [ 50.180808][ T318] ? lock_vma_under_rcu (mm/mmap_lock.c:259) [ 50.181204][ T318] __sys_sendmsg (net/socket.c:2716) [ 50.181486][ T318] ? __sys_sendmsg_sock (net/socket.c:2701) [ 50.181741][ T318] ? 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) [ 50.182139][ T318] ? 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) [ 50.182392][ T318] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 50.182659][ T318] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 50.183037][ T318] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 50.183386][ T318] RIP: 0033:0x7f3c9c2601d7 [ 50.183639][ T318] 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) [ 50.184325][ T318] RSP: 002b:00007ffd5d418658 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 50.184581][ T318] RAX: ffffffffffffffda RBX: 0000000039965320 RCX: 00007f3c9c2601d7 [ 50.184824][ T318] RDX: 0000000000000000 RSI: 00007ffd5d418690 RDI: 0000000000000005 [ 50.185153][ T318] RBP: 0000000039965230 R08: 0000000000000003 R09: 0000000000000000 [ 50.185412][ T318] R10: 0000000000000200 R11: 0000000000000246 R12: 0000000039965690 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