====================================== | [ 168.279990][ T1012] ================================================================== | [ 168.280295][ T1012] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 168.280612][ T1012] Read of size 1 at addr ffff88800bbe16ac by task ip/1012 | [ 168.280817][ T1012] [ 168.280944][ T1012] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 168.280949][ T1012] Call Trace: [ 168.280951][ T1012] [ 168.280953][ T1012] dump_stack_lvl (lib/dump_stack.c:123) [ 168.280960][ T1012] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 168.280967][ T1012] ? kobject_put (lib/kobject.c:733) [ 168.280971][ T1012] print_report (mm/kasan/report.c:483) [ 168.280974][ T1012] ? kobject_put (lib/kobject.c:733) [ 168.280978][ T1012] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 168.280981][ T1012] ? kobject_put (lib/kobject.c:733) [ 168.280984][ T1012] kasan_report (mm/kasan/report.c:597) [ 168.280987][ T1012] ? kobject_put (lib/kobject.c:733) [ 168.280993][ T1012] kobject_put (lib/kobject.c:733) [ 168.280997][ T1012] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 168.281005][ T1012] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 168.281007][ T1012] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 168.281012][ T1012] ? generic_xdp_install (net/core/dev.c:11630) [ 168.281017][ T1012] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 168.281021][ T1012] rtnl_dellink (net/core/rtnetlink.c:3580) [ 168.281027][ T1012] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 168.281046][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.281054][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.281061][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.281065][ T1012] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 168.281067][ T1012] ? __lock_release (kernel/locking/lockdep.c:5536) [ 168.281072][ T1012] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 168.281075][ T1012] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 168.281079][ T1012] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 168.281081][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.281089][ T1012] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 168.281098][ T1012] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 168.281101][ T1012] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 168.281108][ T1012] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 168.281110][ T1012] ? 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) [ 168.281114][ T1012] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 168.281118][ T1012] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 168.281122][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.281128][ T1012] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 168.281132][ T1012] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 168.281135][ T1012] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 168.281143][ T1012] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 168.281146][ T1012] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 168.281157][ T1012] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 168.281160][ T1012] ? __copy_msghdr (net/socket.c:2556) [ 168.281170][ T1012] ___sys_sendmsg (net/socket.c:2686) [ 168.281173][ T1012] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 168.281176][ T1012] ? __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) [ 168.281186][ T1012] ? copy_msghdr_from_user (net/socket.c:2673) [ 168.281191][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.281195][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.281201][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.281204][ T1012] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 168.281213][ T1012] ? __lock_release (kernel/locking/lockdep.c:5536) [ 168.281219][ T1012] __sys_sendmsg (net/socket.c:2716) [ 168.281222][ T1012] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 168.281226][ T1012] ? __sys_sendmsg_sock (net/socket.c:2701) [ 168.281234][ T1012] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 168.281238][ T1012] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 168.281246][ T1012] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 168.281250][ T1012] RIP: 0033:0x7f3bd146f1d7 [ 168.281255][ T1012] 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) [ 168.281259][ T1012] RSP: 002b:00007fff6c6f9848 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 168.281263][ T1012] RAX: ffffffffffffffda RBX: 00007fff6c6f9f70 RCX: 00007f3bd146f1d7 [ 168.281265][ T1012] RDX: 0000000000000000 RSI: 00007fff6c6f98b0 RDI: 0000000000000005 [ 168.281267][ T1012] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 168.281269][ T1012] R10: 00007f3bd136bf60 R11: 0000000000000246 R12: 0000000000000002 [ 168.281271][ T1012] R13: 00000000690df476 R14: 0000000000499600 R15: 0000000000000000 | [ 168.308609][ T1012] refcount_t: underflow; use-after-free. | [ 168.308853][ T1012] WARNING: CPU: 2 PID: 1012 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 168.309237][ T1012] Modules linked in: bridge stp llc 8021q vrf veth | [ 168.309900][ T1012] Tainted: [B]=BAD_PAGE [ 168.310072][ T1012] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 168.310339][ T1012] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 168.310611][ T1012] 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 25 8e 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 25 8e mov $0xffffffff8e258d60,%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 [ 168.311297][ T1012] RSP: 0018:ffffc90001d971f0 EFLAGS: 00010286 [ 168.311547][ T1012] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 168.311860][ T1012] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 168.312178][ T1012] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff1d7e134 [ 168.312489][ T1012] R10: 0000000000000003 R11: ffffc90001d96d80 R12: 0000000000000001 [ 168.312797][ T1012] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 168.313101][ T1012] FS: 00007f3bd12a1800(0000) GS:ffff8880a62f2000(0000) knlGS:0000000000000000 [ 168.313451][ T1012] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 168.313713][ T1012] CR2: 00007f93ac964aa0 CR3: 000000000e1f4006 CR4: 0000000000772ef0 [ 168.314005][ T1012] PKRU: 55555554 [ 168.314166][ T1012] Call Trace: [ 168.314325][ T1012] [ 168.314439][ T1012] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 168.314642][ T1012] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 168.314838][ T1012] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 168.315043][ T1012] ? generic_xdp_install (net/core/dev.c:11630) [ 168.315237][ T1012] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 168.315434][ T1012] rtnl_dellink (net/core/rtnetlink.c:3580) [ 168.315732][ T1012] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 168.315981][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.316184][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.316480][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.316681][ T1012] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 168.316871][ T1012] ? __lock_release (kernel/locking/lockdep.c:5536) [ 168.317074][ T1012] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 168.317438][ T1012] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 168.317643][ T1012] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 168.317844][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.318051][ T1012] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 168.318357][ T1012] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 168.318549][ T1012] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 168.318751][ T1012] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 168.318938][ T1012] ? 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) [ 168.319251][ T1012] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 168.319450][ T1012] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 168.319647][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.319847][ T1012] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 168.320054][ T1012] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 168.320252][ T1012] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 168.320449][ T1012] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 168.320643][ T1012] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 168.320934][ T1012] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 168.321192][ T1012] ? __copy_msghdr (net/socket.c:2556) [ 168.321389][ T1012] ___sys_sendmsg (net/socket.c:2686) [ 168.321580][ T1012] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 168.321868][ T1012] ? __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) [ 168.322107][ T1012] ? copy_msghdr_from_user (net/socket.c:2673) [ 168.322310][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.322503][ T1012] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 168.322807][ T1012] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 168.323014][ T1012] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 168.323217][ T1012] ? __lock_release (kernel/locking/lockdep.c:5536) [ 168.323422][ T1012] __sys_sendmsg (net/socket.c:2716) [ 168.323723][ T1012] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 168.323964][ T1012] ? __sys_sendmsg_sock (net/socket.c:2701) [ 168.324159][ T1012] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 168.324356][ T1012] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 168.324559][ T1012] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 168.324793][ T1012] RIP: 0033:0x7f3bd146f1d7 [ 168.325004][ T1012] 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) [ 168.325657][ T1012] RSP: 002b:00007fff6c6f9848 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 168.325943][ T1012] RAX: ffffffffffffffda RBX: 00007fff6c6f9f70 RCX: 00007f3bd146f1d7 [ 168.326268][ T1012] RDX: 0000000000000000 RSI: 00007fff6c6f98b0 RDI: 0000000000000005 [ 168.326550][ T1012] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 168.326825][ T1012] R10: 00007f3bd136bf60 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