====================================== | [ 45.849774][ T551] ================================================================== | [ 45.850123][ T551] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 45.850434][ T551] Read of size 1 at addr ffff8880085b26ac by task ip/551 | [ 45.850660][ T551] [ 45.850762][ T551] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 45.850764][ T551] Call Trace: [ 45.850766][ T551] [ 45.850768][ T551] dump_stack_lvl (lib/dump_stack.c:123) [ 45.850774][ T551] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 45.850785][ T551] ? kobject_put (lib/kobject.c:733) [ 45.850789][ T551] print_report (mm/kasan/report.c:483) [ 45.850792][ T551] ? kobject_put (lib/kobject.c:733) [ 45.850795][ T551] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 45.850798][ T551] ? kobject_put (lib/kobject.c:733) [ 45.850801][ T551] kasan_report (mm/kasan/report.c:597) [ 45.850805][ T551] ? kobject_put (lib/kobject.c:733) [ 45.850810][ T551] kobject_put (lib/kobject.c:733) [ 45.850814][ T551] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 45.850819][ T551] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 45.850824][ T551] ? generic_xdp_install (net/core/dev.c:11630) [ 45.850828][ T551] ? kernfs_put.part.0 (./arch/x86/include/asm/atomic.h:67 ./include/linux/atomic/atomic-arch-fallback.h:2278 ./include/linux/atomic/atomic-instrumented.h:1384 fs/kernfs/dir.c:595) [ 45.850840][ T551] ? unregister_netdevice_many (net/core/dev.c:12241) [ 45.850847][ T551] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 45.850892][ T551] rtnl_dellink (net/core/rtnetlink.c:3580) [ 45.850898][ T551] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 45.850916][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.850927][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.850937][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.850943][ T551] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 45.850947][ T551] ? __lock_release (kernel/locking/lockdep.c:5536) [ 45.850951][ T551] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 45.850955][ T551] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 45.850958][ T551] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 45.850961][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.850968][ T551] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 45.850973][ T551] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 45.850976][ T551] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 45.850983][ T551] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 45.850986][ T551] ? 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) [ 45.850989][ T551] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 45.850994][ T551] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 45.850998][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.851003][ T551] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 45.851008][ T551] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 45.851011][ T551] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 45.851018][ T551] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 45.851021][ T551] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 45.851027][ T551] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 45.851030][ T551] ? __copy_msghdr (net/socket.c:2556) [ 45.851043][ T551] ___sys_sendmsg (net/socket.c:2686) [ 45.851052][ T551] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 45.851060][ T551] ? __call_rcu_common.constprop.0 (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:109 ./arch/x86/include/asm/irqflags.h:127 kernel/rcu/tree.c:3125) [ 45.851072][ T551] ? copy_msghdr_from_user (net/socket.c:2673) [ 45.851082][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.851087][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.851092][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.851096][ T551] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 45.851107][ T551] ? __lock_release (kernel/locking/lockdep.c:5536) [ 45.851113][ T551] __sys_sendmsg (net/socket.c:2716) [ 45.851116][ T551] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 45.851120][ T551] ? __sys_sendmsg_sock (net/socket.c:2701) [ 45.851127][ T551] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 45.851131][ T551] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 45.851137][ T551] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 45.851143][ T551] RIP: 0033:0x7fc40eb7a1d7 [ 45.851148][ T551] 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) [ 45.851150][ T551] RSP: 002b:00007ffc035325d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 45.851154][ T551] RAX: ffffffffffffffda RBX: 00007ffc03532d00 RCX: 00007fc40eb7a1d7 [ 45.851157][ T551] RDX: 0000000000000000 RSI: 00007ffc03532640 RDI: 0000000000000005 [ 45.851158][ T551] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 45.851160][ T551] R10: 00007fc40ea76f60 R11: 0000000000000246 R12: 0000000000000002 [ 45.851162][ T551] R13: 00000000690deee5 R14: 0000000000499600 R15: 0000000000000000 | [ 45.890571][ T551] refcount_t: underflow; use-after-free. | [ 45.890989][ T551] WARNING: CPU: 1 PID: 551 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 45.891509][ T551] Modules linked in: bridge stp llc vrf veth | [ 45.892386][ T551] Tainted: [B]=BAD_PAGE [ 45.892606][ T551] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 45.892945][ T551] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 45.893320][ T551] 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 85 92 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 85 92 mov $0xffffffff92858d60,%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 [ 45.894386][ T551] RSP: 0018:ffffc90000e471f0 EFLAGS: 00010286 [ 45.894742][ T551] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 45.895243][ T551] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 45.895603][ T551] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff263e134 [ 45.895975][ T551] R10: 0000000000000003 R11: ffffc90000e46d80 R12: 0000000000000001 [ 45.896315][ T551] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 45.896681][ T551] FS: 00007fc40e9ac800(0000) GS:ffff8880a1c72000(0000) knlGS:0000000000000000 [ 45.897213][ T551] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 45.897499][ T551] CR2: 00007fdc53ba1000 CR3: 000000000b9da004 CR4: 0000000000772ef0 [ 45.897827][ T551] PKRU: 55555554 [ 45.898161][ T551] Call Trace: [ 45.898402][ T551] [ 45.898550][ T551] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 45.898825][ T551] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 45.899075][ T551] ? generic_xdp_install (net/core/dev.c:11630) [ 45.899485][ T551] ? kernfs_put.part.0 (./arch/x86/include/asm/atomic.h:67 ./include/linux/atomic/atomic-arch-fallback.h:2278 ./include/linux/atomic/atomic-instrumented.h:1384 fs/kernfs/dir.c:595) [ 45.899719][ T551] ? unregister_netdevice_many (net/core/dev.c:12241) [ 45.899967][ T551] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 45.900263][ T551] rtnl_dellink (net/core/rtnetlink.c:3580) [ 45.900684][ T551] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 45.901022][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.901270][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.901496][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.901869][ T551] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 45.902100][ T551] ? __lock_release (kernel/locking/lockdep.c:5536) [ 45.902318][ T551] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 45.902624][ T551] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 45.903071][ T551] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 45.903320][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.903580][ T551] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 45.903867][ T551] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 45.904296][ T551] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 45.904542][ T551] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 45.904792][ T551] ? 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) [ 45.905051][ T551] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 45.905406][ T551] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 45.905629][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.905883][ T551] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 45.906115][ T551] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 45.906460][ T551] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 45.906676][ T551] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 45.907005][ T551] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 45.907213][ T551] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 45.907585][ T551] ? __copy_msghdr (net/socket.c:2556) [ 45.907788][ T551] ___sys_sendmsg (net/socket.c:2686) [ 45.907996][ T551] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 45.908197][ T551] ? __call_rcu_common.constprop.0 (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:109 ./arch/x86/include/asm/irqflags.h:127 kernel/rcu/tree.c:3125) [ 45.908573][ T551] ? copy_msghdr_from_user (net/socket.c:2673) [ 45.908785][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.908996][ T551] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 45.909321][ T551] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 45.909519][ T551] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 45.909718][ T551] ? __lock_release (kernel/locking/lockdep.c:5536) [ 45.909927][ T551] __sys_sendmsg (net/socket.c:2716) [ 45.910253][ T551] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 45.910541][ T551] ? __sys_sendmsg_sock (net/socket.c:2701) [ 45.910744][ T551] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 45.910967][ T551] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 45.911290][ T551] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 45.911539][ T551] RIP: 0033:0x7fc40eb7a1d7 [ 45.911751][ T551] 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) [ 45.912638][ T551] RSP: 002b:00007ffc035325d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 45.912953][ T551] RAX: ffffffffffffffda RBX: 00007ffc03532d00 RCX: 00007fc40eb7a1d7 [ 45.913397][ T551] RDX: 0000000000000000 RSI: 00007ffc03532640 RDI: 0000000000000005 [ 45.913692][ T551] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 45.914151][ T551] R10: 00007fc40ea76f60 R11: 0000000000000246 R12: 0000000000000002 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