====================================== | [ 128.177877][ T2120] ================================================================== | [ 128.178384][ T2120] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 128.178869][ T2120] Read of size 1 at addr ffff88800bd0a6ac by task ip/2120 | [ 128.179242][ T2120] [ 128.179413][ T2120] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 128.179417][ T2120] Call Trace: [ 128.179420][ T2120] [ 128.179423][ T2120] dump_stack_lvl (lib/dump_stack.c:123) [ 128.179433][ T2120] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 128.179443][ T2120] ? kobject_put (lib/kobject.c:733) [ 128.179450][ T2120] print_report (mm/kasan/report.c:483) [ 128.179455][ T2120] ? kobject_put (lib/kobject.c:733) [ 128.179460][ T2120] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 128.179466][ T2120] ? kobject_put (lib/kobject.c:733) [ 128.179471][ T2120] kasan_report (mm/kasan/report.c:597) [ 128.179478][ T2120] ? kobject_put (lib/kobject.c:733) [ 128.179487][ T2120] kobject_put (lib/kobject.c:733) [ 128.179494][ T2120] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 128.179506][ T2120] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 128.179510][ T2120] ? generic_xdp_install (net/core/dev.c:11630) [ 128.179514][ T2120] ? 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) [ 128.179523][ T2120] ? unregister_netdevice_many (net/core/dev.c:12241) [ 128.179533][ T2120] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 128.179591][ T2120] rtnl_dellink (net/core/rtnetlink.c:3580) [ 128.179602][ T2120] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 128.179640][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.179650][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.179661][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.179667][ T2120] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 128.179672][ T2120] ? __lock_release (kernel/locking/lockdep.c:5536) [ 128.179679][ T2120] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 128.179685][ T2120] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 128.179691][ T2120] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 128.179696][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.179710][ T2120] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 128.179721][ T2120] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 128.179728][ T2120] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 128.179741][ T2120] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 128.179746][ T2120] ? 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) [ 128.179754][ T2120] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 128.179762][ T2120] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 128.179768][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.179778][ T2120] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 128.179787][ T2120] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 128.179793][ T2120] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 128.179806][ T2120] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 128.179813][ T2120] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 128.179825][ T2120] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 128.179830][ T2120] ? __copy_msghdr (net/socket.c:2556) [ 128.179847][ T2120] ___sys_sendmsg (net/socket.c:2686) [ 128.179852][ T2120] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 128.179857][ T2120] ? __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) [ 128.179869][ T2120] ? copy_msghdr_from_user (net/socket.c:2673) [ 128.179878][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.179885][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.179896][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.179902][ T2120] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 128.179910][ T2120] ? __lock_release (kernel/locking/lockdep.c:5536) [ 128.179922][ T2120] __sys_sendmsg (net/socket.c:2716) [ 128.179927][ T2120] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 128.179934][ T2120] ? __sys_sendmsg_sock (net/socket.c:2701) [ 128.179948][ T2120] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 128.179955][ T2120] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 128.179966][ T2120] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 128.179974][ T2120] RIP: 0033:0x7f367fd831d7 [ 128.179982][ T2120] 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) [ 128.179990][ T2120] RSP: 002b:00007ffe4672e538 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 128.180002][ T2120] RAX: ffffffffffffffda RBX: 00007ffe4672ec60 RCX: 00007f367fd831d7 [ 128.180006][ T2120] RDX: 0000000000000000 RSI: 00007ffe4672e5a0 RDI: 0000000000000005 [ 128.180012][ T2120] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 128.180015][ T2120] R10: 00007f367fc7ff60 R11: 0000000000000246 R12: 0000000000000002 [ 128.180018][ T2120] R13: 00000000690de6f5 R14: 0000000000499600 R15: 0000000000000000 | [ 128.239785][ T2120] refcount_t: underflow; use-after-free. | [ 128.240129][ T2120] WARNING: CPU: 0 PID: 2120 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 128.240631][ T2120] Modules linked in: bridge stp llc 8021q vrf veth | [ 128.241388][ T2120] Tainted: [B]=BAD_PAGE [ 128.241554][ T2120] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 128.241779][ T2120] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 128.242015][ T2120] 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 e5 b4 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 e5 b4 mov $0xffffffffb4e58d60,%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 [ 128.242622][ T2120] RSP: 0018:ffffc90003c971f0 EFLAGS: 00010286 [ 128.242843][ T2120] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 128.243110][ T2120] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 128.243367][ T2120] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff6afe134 [ 128.243618][ T2120] R10: 0000000000000003 R11: ffffc90003c96d80 R12: 0000000000000001 [ 128.243945][ T2120] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 128.244240][ T2120] FS: 00007f367fbb5800(0000) GS:ffff88807f5f2000(0000) knlGS:0000000000000000 [ 128.244632][ T2120] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 128.244875][ T2120] CR2: 000055a2889badec CR3: 000000000e8f0002 CR4: 0000000000772ef0 [ 128.245167][ T2120] PKRU: 55555554 [ 128.245306][ T2120] Call Trace: [ 128.245560][ T2120] [ 128.245652][ T2120] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 128.245845][ T2120] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 128.246219][ T2120] ? generic_xdp_install (net/core/dev.c:11630) [ 128.246390][ T2120] ? 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) [ 128.246581][ T2120] ? unregister_netdevice_many (net/core/dev.c:12241) [ 128.246852][ T2120] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 128.247063][ T2120] rtnl_dellink (net/core/rtnetlink.c:3580) [ 128.247244][ T2120] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 128.247560][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.247739][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.247932][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.248120][ T2120] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 128.248290][ T2120] ? __lock_release (kernel/locking/lockdep.c:5536) [ 128.248479][ T2120] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 128.248787][ T2120] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 128.248972][ T2120] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 128.249152][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.249326][ T2120] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 128.249602][ T2120] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 128.249819][ T2120] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 128.250018][ T2120] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 128.250322][ T2120] ? 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) [ 128.250559][ T2120] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 128.250754][ T2120] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 128.250934][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.251254][ T2120] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 128.251438][ T2120] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 128.251613][ T2120] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 128.251816][ T2120] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 128.251992][ T2120] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 128.252284][ T2120] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 128.252513][ T2120] ? __copy_msghdr (net/socket.c:2556) [ 128.252684][ T2120] ___sys_sendmsg (net/socket.c:2686) [ 128.252999][ T2120] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 128.253220][ T2120] ? __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) [ 128.253509][ T2120] ? copy_msghdr_from_user (net/socket.c:2673) [ 128.253733][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.254057][ T2120] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.254248][ T2120] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.254425][ T2120] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 128.254638][ T2120] ? __lock_release (kernel/locking/lockdep.c:5536) [ 128.254918][ T2120] __sys_sendmsg (net/socket.c:2716) [ 128.255107][ T2120] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 128.255335][ T2120] ? __sys_sendmsg_sock (net/socket.c:2701) [ 128.255518][ T2120] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 128.255801][ T2120] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 128.255982][ T2120] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 128.256243][ T2120] RIP: 0033:0x7f367fd831d7 [ 128.256437][ T2120] 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) [ 128.257299][ T2120] RSP: 002b:00007ffe4672e538 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 128.257715][ T2120] RAX: ffffffffffffffda RBX: 00007ffe4672ec60 RCX: 00007f367fd831d7 [ 128.258019][ T2120] RDX: 0000000000000000 RSI: 00007ffe4672e5a0 RDI: 0000000000000005 [ 128.258425][ T2120] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 128.258725][ T2120] R10: 00007f367fc7ff60 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