====================================== | [ 182.450480][ T1013] ================================================================== | [ 182.450924][ T1013] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 182.451319][ T1013] Read of size 1 at addr ffff88800e3216ac by task ip/1013 | [ 182.451609][ T1013] [ 182.451747][ T1013] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 182.451750][ T1013] Call Trace: [ 182.451752][ T1013] [ 182.451755][ T1013] dump_stack_lvl (lib/dump_stack.c:123) [ 182.451762][ T1013] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 182.451770][ T1013] ? kobject_put (lib/kobject.c:733) [ 182.451776][ T1013] print_report (mm/kasan/report.c:483) [ 182.451780][ T1013] ? kobject_put (lib/kobject.c:733) [ 182.451784][ T1013] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 182.451789][ T1013] ? kobject_put (lib/kobject.c:733) [ 182.451793][ T1013] kasan_report (mm/kasan/report.c:597) [ 182.451798][ T1013] ? kobject_put (lib/kobject.c:733) [ 182.451807][ T1013] kobject_put (lib/kobject.c:733) [ 182.451812][ T1013] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 182.451818][ T1013] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 182.451822][ T1013] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 182.451827][ T1013] ? generic_xdp_install (net/core/dev.c:11630) [ 182.451834][ T1013] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 182.451841][ T1013] rtnl_dellink (net/core/rtnetlink.c:3580) [ 182.451847][ T1013] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 182.451881][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.451890][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.451899][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.451904][ T1013] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 182.451908][ T1013] ? __lock_release (kernel/locking/lockdep.c:5536) [ 182.451914][ T1013] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 182.451919][ T1013] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 182.451925][ T1013] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 182.451928][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.451940][ T1013] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 182.451946][ T1013] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 182.451951][ T1013] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 182.451962][ T1013] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 182.451966][ T1013] ? 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) [ 182.451972][ T1013] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 182.451978][ T1013] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 182.451984][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.451993][ T1013] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 182.451999][ T1013] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 182.452005][ T1013] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 182.452013][ T1013] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 182.452018][ T1013] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 182.452026][ T1013] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 182.452030][ T1013] ? __copy_msghdr (net/socket.c:2556) [ 182.452042][ T1013] ___sys_sendmsg (net/socket.c:2686) [ 182.452046][ T1013] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 182.452050][ T1013] ? __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) [ 182.452064][ T1013] ? copy_msghdr_from_user (net/socket.c:2673) [ 182.452071][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.452078][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.452087][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.452092][ T1013] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 182.452101][ T1013] ? __lock_release (kernel/locking/lockdep.c:5536) [ 182.452111][ T1013] __sys_sendmsg (net/socket.c:2716) [ 182.452115][ T1013] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 182.452120][ T1013] ? __sys_sendmsg_sock (net/socket.c:2701) [ 182.452132][ T1013] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 182.452138][ T1013] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 182.452145][ T1013] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 182.452150][ T1013] RIP: 0033:0x7fc781f941d7 [ 182.452156][ T1013] 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) [ 182.452160][ T1013] RSP: 002b:00007ffd7e43baf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 182.452165][ T1013] RAX: ffffffffffffffda RBX: 00007ffd7e43c220 RCX: 00007fc781f941d7 [ 182.452169][ T1013] RDX: 0000000000000000 RSI: 00007ffd7e43bb60 RDI: 0000000000000005 [ 182.452171][ T1013] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 182.452174][ T1013] R10: 00007fc781e90f60 R11: 0000000000000246 R12: 0000000000000002 [ 182.452176][ T1013] R13: 00000000690de9e7 R14: 0000000000499600 R15: 0000000000000000 | [ 182.493567][ T1013] refcount_t: underflow; use-after-free. | [ 182.493838][ T1013] WARNING: CPU: 0 PID: 1013 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 182.494292][ T1013] Modules linked in: bridge stp llc 8021q vrf veth | [ 182.495288][ T1013] Tainted: [B]=BAD_PAGE [ 182.495472][ T1013] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 182.495934][ T1013] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 182.496261][ T1013] 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 a5 a0 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 a5 a0 mov $0xffffffffa0a58d60,%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 [ 182.497473][ T1013] RSP: 0018:ffffc90001db71f0 EFLAGS: 00010286 [ 182.498098][ T1013] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 182.498489][ T1013] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 182.498861][ T1013] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff427e134 [ 182.499250][ T1013] R10: 0000000000000003 R11: ffffc90001db6d80 R12: 0000000000000001 [ 182.499663][ T1013] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 182.500058][ T1013] FS: 00007fc781dc6800(0000) GS:ffff8880939f2000(0000) knlGS:0000000000000000 [ 182.500524][ T1013] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 182.500860][ T1013] CR2: 00000000004e5be0 CR3: 000000000cc09005 CR4: 0000000000772ef0 [ 182.501261][ T1013] PKRU: 55555554 [ 182.501625][ T1013] Call Trace: [ 182.501821][ T1013] [ 182.501965][ T1013] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 182.502397][ T1013] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 182.502660][ T1013] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 182.502918][ T1013] ? generic_xdp_install (net/core/dev.c:11630) [ 182.503187][ T1013] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 182.503450][ T1013] rtnl_dellink (net/core/rtnetlink.c:3580) [ 182.503874][ T1013] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 182.504260][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.504509][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.504934][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.505216][ T1013] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 182.505459][ T1013] ? __lock_release (kernel/locking/lockdep.c:5536) [ 182.505723][ T1013] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 182.506211][ T1013] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 182.506495][ T1013] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 182.506761][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.507030][ T1013] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 182.507314][ T1013] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 182.507563][ T1013] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 182.507836][ T1013] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 182.508082][ T1013] ? 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) [ 182.508369][ T1013] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 182.508644][ T1013] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 182.508919][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.509231][ T1013] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 182.509655][ T1013] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 182.509906][ T1013] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 182.510165][ T1013] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 182.510416][ T1013] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 182.510819][ T1013] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 182.511135][ T1013] ? __copy_msghdr (net/socket.c:2556) [ 182.511403][ T1013] ___sys_sendmsg (net/socket.c:2686) [ 182.511644][ T1013] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 182.512047][ T1013] ? __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) [ 182.512358][ T1013] ? copy_msghdr_from_user (net/socket.c:2673) [ 182.512594][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.512845][ T1013] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 182.513256][ T1013] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 182.513511][ T1013] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 182.513786][ T1013] ? __lock_release (kernel/locking/lockdep.c:5536) [ 182.514047][ T1013] __sys_sendmsg (net/socket.c:2716) [ 182.514303][ T1013] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 182.514611][ T1013] ? __sys_sendmsg_sock (net/socket.c:2701) [ 182.514870][ T1013] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 182.515291][ T1013] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 182.515545][ T1013] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 182.515847][ T1013] RIP: 0033:0x7fc781f941d7 [ 182.516121][ T1013] 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) [ 182.517195][ T1013] RSP: 002b:00007ffd7e43baf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 182.517731][ T1013] RAX: ffffffffffffffda RBX: 00007ffd7e43c220 RCX: 00007fc781f941d7 [ 182.518167][ T1013] RDX: 0000000000000000 RSI: 00007ffd7e43bb60 RDI: 0000000000000005 [ 182.518573][ T1013] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 182.519102][ T1013] R10: 00007fc781e90f60 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