====================================== | [ 24.744517][ T326] ================================================================== | [ 24.744822][ T326] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 24.745114][ T326] Read of size 1 at addr ffff88801075a6ac by task ip/326 | [ 24.745326][ T326] [ 24.745436][ T326] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 24.745440][ T326] Call Trace: [ 24.745444][ T326] [ 24.745446][ T326] dump_stack_lvl (lib/dump_stack.c:123) [ 24.745452][ T326] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 24.745470][ T326] ? kobject_put (lib/kobject.c:733) [ 24.745474][ T326] print_report (mm/kasan/report.c:483) [ 24.745477][ T326] ? kobject_put (lib/kobject.c:733) [ 24.745480][ T326] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 24.745483][ T326] ? kobject_put (lib/kobject.c:733) [ 24.745488][ T326] kasan_report (mm/kasan/report.c:597) [ 24.745491][ T326] ? kobject_put (lib/kobject.c:733) [ 24.745497][ T326] kobject_put (lib/kobject.c:733) [ 24.745500][ T326] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 24.745512][ T326] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 24.745516][ T326] ? generic_xdp_install (net/core/dev.c:11630) [ 24.745518][ T326] ? 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) [ 24.745533][ T326] ? unregister_netdevice_many (net/core/dev.c:12241) [ 24.745538][ T326] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 24.745574][ T326] rtnl_dellink (net/core/rtnetlink.c:3580) [ 24.745580][ T326] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.745599][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.745613][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.745619][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.745622][ T326] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 24.745625][ T326] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.745629][ T326] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.745633][ T326] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 24.745636][ T326] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.745639][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.745646][ T326] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 24.745652][ T326] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.745657][ T326] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 24.745663][ T326] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 24.745666][ T326] ? 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) [ 24.745670][ T326] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 24.745674][ T326] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 24.745677][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.745683][ T326] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 24.745687][ T326] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.745690][ T326] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 24.745701][ T326] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.745705][ T326] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 24.745715][ T326] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 24.745718][ T326] ? __copy_msghdr (net/socket.c:2556) [ 24.745726][ T326] ___sys_sendmsg (net/socket.c:2686) [ 24.745729][ T326] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 24.745732][ T326] ? __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) [ 24.745746][ T326] ? copy_msghdr_from_user (net/socket.c:2673) [ 24.745751][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.745755][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.745761][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.745764][ T326] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 24.745779][ T326] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.745786][ T326] __sys_sendmsg (net/socket.c:2716) [ 24.745789][ T326] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 24.745793][ T326] ? __sys_sendmsg_sock (net/socket.c:2701) [ 24.745800][ T326] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.745804][ T326] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 24.745811][ T326] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 24.745819][ T326] RIP: 0033:0x7f85d89b61d7 [ 24.745823][ T326] 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) [ 24.745826][ T326] RSP: 002b:00007ffda4f237f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 24.745833][ T326] RAX: ffffffffffffffda RBX: 00007ffda4f23f20 RCX: 00007f85d89b61d7 [ 24.745836][ T326] RDX: 0000000000000000 RSI: 00007ffda4f23860 RDI: 0000000000000005 [ 24.745837][ T326] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 24.745839][ T326] R10: 00007f85d88b2f60 R11: 0000000000000246 R12: 0000000000000002 [ 24.745841][ T326] R13: 00000000690dfb43 R14: 0000000000499600 R15: 0000000000000000 | [ 24.782405][ T326] refcount_t: underflow; use-after-free. | [ 24.782784][ T326] WARNING: CPU: 2 PID: 326 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 24.783097][ T326] Modules linked in: bridge stp llc vrf veth | [ 24.784305][ T326] Tainted: [B]=BAD_PAGE [ 24.784559][ T326] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 24.784785][ T326] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 24.785021][ T326] 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 84 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 84 mov $0xffffffff84858d60,%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 [ 24.785630][ T326] RSP: 0018:ffffc900007c71f0 EFLAGS: 00010286 [ 24.785865][ T326] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 24.786132][ T326] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 24.786403][ T326] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff0a3e134 [ 24.786678][ T326] R10: 0000000000000003 R11: ffffc900007c6d80 R12: 0000000000000001 [ 24.786948][ T326] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 24.787214][ T326] FS: 00007f85d87e8800(0000) GS:ffff8880afcf2000(0000) knlGS:0000000000000000 [ 24.787535][ T326] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.787768][ T326] CR2: 00000000004e68c8 CR3: 0000000011501002 CR4: 0000000000772ef0 [ 24.788042][ T326] PKRU: 55555554 [ 24.788193][ T326] Call Trace: [ 24.788346][ T326] [ 24.788465][ T326] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 24.788655][ T326] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 24.788850][ T326] ? generic_xdp_install (net/core/dev.c:11630) [ 24.789030][ T326] ? 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) [ 24.789215][ T326] ? unregister_netdevice_many (net/core/dev.c:12241) [ 24.789415][ T326] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 24.789643][ T326] rtnl_dellink (net/core/rtnetlink.c:3580) [ 24.789924][ T326] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.790157][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.790347][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.790641][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.790828][ T326] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 24.791011][ T326] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.791191][ T326] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.791419][ T326] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 24.791613][ T326] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.791793][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.791979][ T326] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 24.792186][ T326] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.792376][ T326] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 24.792586][ T326] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 24.792775][ T326] ? 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) [ 24.792961][ T326] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 24.793145][ T326] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 24.793331][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.793523][ T326] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 24.793806][ T326] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.793992][ T326] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 24.794182][ T326] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.794370][ T326] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 24.794653][ T326] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 24.794875][ T326] ? __copy_msghdr (net/socket.c:2556) [ 24.795057][ T326] ___sys_sendmsg (net/socket.c:2686) [ 24.795306][ T326] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 24.795595][ T326] ? __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) [ 24.795824][ T326] ? copy_msghdr_from_user (net/socket.c:2673) [ 24.796009][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.796190][ T326] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.796474][ T326] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.796657][ T326] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 24.796844][ T326] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.797026][ T326] __sys_sendmsg (net/socket.c:2716) [ 24.797305][ T326] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 24.797539][ T326] ? __sys_sendmsg_sock (net/socket.c:2701) [ 24.797732][ T326] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.797917][ T326] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 24.798195][ T326] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 24.798418][ T326] RIP: 0033:0x7f85d89b61d7 [ 24.798620][ T326] 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) [ 24.799324][ T326] RSP: 002b:00007ffda4f237f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 24.799712][ T326] RAX: ffffffffffffffda RBX: 00007ffda4f23f20 RCX: 00007f85d89b61d7 [ 24.799981][ T326] RDX: 0000000000000000 RSI: 00007ffda4f23860 RDI: 0000000000000005 [ 24.800244][ T326] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 24.800618][ T326] R10: 00007f85d88b2f60 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