====================================== | [ 478.202155][ T2002] ================================================================== | [ 478.202501][ T2002] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 478.202873][ T2002] Read of size 1 at addr ffff88800555a6ac by task ip/2002 | [ 478.203118][ T2002] [ 478.203264][ T2002] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 478.203271][ T2002] Call Trace: [ 478.203274][ T2002] [ 478.203276][ T2002] dump_stack_lvl (lib/dump_stack.c:123) [ 478.203287][ T2002] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 478.203295][ T2002] ? kobject_put (lib/kobject.c:733) [ 478.203299][ T2002] print_report (mm/kasan/report.c:483) [ 478.203302][ T2002] ? kobject_put (lib/kobject.c:733) [ 478.203305][ T2002] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 478.203309][ T2002] ? kobject_put (lib/kobject.c:733) [ 478.203312][ T2002] kasan_report (mm/kasan/report.c:597) [ 478.203316][ T2002] ? kobject_put (lib/kobject.c:733) [ 478.203321][ T2002] kobject_put (lib/kobject.c:733) [ 478.203325][ T2002] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 478.203329][ T2002] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 478.203332][ T2002] ? generic_xdp_install (net/core/dev.c:11630) [ 478.203335][ T2002] ? 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) [ 478.203340][ T2002] ? unregister_netdevice_many (net/core/dev.c:12241) [ 478.203346][ T2002] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 478.203385][ T2002] rtnl_dellink (net/core/rtnetlink.c:3580) [ 478.203390][ T2002] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 478.203420][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.203428][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.203437][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.203443][ T2002] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 478.203446][ T2002] ? __lock_release (kernel/locking/lockdep.c:5536) [ 478.203451][ T2002] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 478.203454][ T2002] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 478.203458][ T2002] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 478.203461][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.203468][ T2002] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 478.203472][ T2002] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 478.203476][ T2002] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 478.203483][ T2002] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 478.203486][ T2002] ? 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) [ 478.203489][ T2002] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 478.203494][ T2002] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 478.203498][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.203503][ T2002] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 478.203508][ T2002] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 478.203512][ T2002] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 478.203520][ T2002] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 478.203527][ T2002] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 478.203535][ T2002] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 478.203539][ T2002] ? __copy_msghdr (net/socket.c:2556) [ 478.203552][ T2002] ___sys_sendmsg (net/socket.c:2686) [ 478.203556][ T2002] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 478.203559][ T2002] ? __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) [ 478.203567][ T2002] ? copy_msghdr_from_user (net/socket.c:2673) [ 478.203572][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.203577][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.203582][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.203586][ T2002] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 478.203592][ T2002] ? __lock_release (kernel/locking/lockdep.c:5536) [ 478.203598][ T2002] __sys_sendmsg (net/socket.c:2716) [ 478.203602][ T2002] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 478.203606][ T2002] ? __sys_sendmsg_sock (net/socket.c:2701) [ 478.203613][ T2002] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 478.203617][ T2002] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 478.203623][ T2002] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 478.203627][ T2002] RIP: 0033:0x7f878814b1d7 [ 478.203632][ T2002] 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) [ 478.203635][ T2002] RSP: 002b:00007ffe33c768b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 478.203639][ T2002] RAX: ffffffffffffffda RBX: 00007ffe33c76fe0 RCX: 00007f878814b1d7 [ 478.203643][ T2002] RDX: 0000000000000000 RSI: 00007ffe33c76920 RDI: 0000000000000005 [ 478.203646][ T2002] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 478.203648][ T2002] R10: 00007f8788047f60 R11: 0000000000000246 R12: 0000000000000002 [ 478.203651][ T2002] R13: 00000000690de6bc R14: 0000000000499600 R15: 0000000000000000 | [ 478.246230][ T2002] refcount_t: underflow; use-after-free. | [ 478.246520][ T2002] WARNING: CPU: 3 PID: 2002 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 478.247026][ T2002] Modules linked in: em_meta cls_basic sch_ets sch_tbf bridge stp llc 8021q vrf veth | [ 478.247882][ T2002] Tainted: [B]=BAD_PAGE [ 478.248049][ T2002] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 478.248303][ T2002] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 478.248566][ T2002] 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 65 a7 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 65 a7 mov $0xffffffffa7658d60,%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 [ 478.249325][ T2002] RSP: 0018:ffffc900019471f0 EFLAGS: 00010286 [ 478.249542][ T2002] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 478.249856][ T2002] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 478.250248][ T2002] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff4ffe134 [ 478.250592][ T2002] R10: 0000000000000003 R11: ffffc90001946d80 R12: 0000000000000001 [ 478.250906][ T2002] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 478.251246][ T2002] FS: 00007f8787f7d800(0000) GS:ffff888087372000(0000) knlGS:0000000000000000 [ 478.251612][ T2002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 478.251895][ T2002] CR2: 00007f878834b050 CR3: 000000000f984002 CR4: 0000000000772ef0 [ 478.252232][ T2002] PKRU: 55555554 [ 478.252367][ T2002] Call Trace: [ 478.252545][ T2002] [ 478.252651][ T2002] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 478.252994][ T2002] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 478.253228][ T2002] ? generic_xdp_install (net/core/dev.c:11630) [ 478.253442][ T2002] ? 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) [ 478.253646][ T2002] ? unregister_netdevice_many (net/core/dev.c:12241) [ 478.253981][ T2002] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 478.254214][ T2002] rtnl_dellink (net/core/rtnetlink.c:3580) [ 478.254419][ T2002] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 478.254683][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.255006][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.255239][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.255438][ T2002] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 478.255641][ T2002] ? __lock_release (kernel/locking/lockdep.c:5536) [ 478.255979][ T2002] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 478.256237][ T2002] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 478.256437][ T2002] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 478.256731][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.256988][ T2002] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 478.257197][ T2002] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 478.257395][ T2002] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 478.257687][ T2002] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 478.257883][ T2002] ? 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) [ 478.258087][ T2002] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 478.258300][ T2002] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 478.258564][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.258755][ T2002] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 478.258926][ T2002] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 478.259111][ T2002] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 478.259388][ T2002] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 478.259556][ T2002] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 478.259725][ T2002] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 478.260070][ T2002] ? __copy_msghdr (net/socket.c:2556) [ 478.260347][ T2002] ___sys_sendmsg (net/socket.c:2686) [ 478.260516][ T2002] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 478.260676][ T2002] ? __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) [ 478.260893][ T2002] ? copy_msghdr_from_user (net/socket.c:2673) [ 478.261075][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.261254][ T2002] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 478.261480][ T2002] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 478.261683][ T2002] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 478.261997][ T2002] ? __lock_release (kernel/locking/lockdep.c:5536) [ 478.262221][ T2002] __sys_sendmsg (net/socket.c:2716) [ 478.262426][ T2002] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 478.262680][ T2002] ? __sys_sendmsg_sock (net/socket.c:2701) [ 478.262993][ T2002] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 478.263219][ T2002] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 478.263385][ T2002] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 478.263691][ T2002] RIP: 0033:0x7f878814b1d7 [ 478.263878][ T2002] 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) [ 478.264692][ T2002] RSP: 002b:00007ffe33c768b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 478.265002][ T2002] RAX: ffffffffffffffda RBX: 00007ffe33c76fe0 RCX: 00007f878814b1d7 [ 478.265314][ T2002] RDX: 0000000000000000 RSI: 00007ffe33c76920 RDI: 0000000000000005 [ 478.265711][ T2002] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 478.266019][ T2002] R10: 00007f8788047f60 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