====================================== | [ 43.355062][ T422] ================================================================== | [ 43.355565][ T422] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 43.356038][ T422] Read of size 1 at addr ffff88800e0c96ac by task ip/422 | [ 43.356416][ T422] [ 43.356595][ T422] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 43.356598][ T422] Call Trace: [ 43.356602][ T422] [ 43.356604][ T422] dump_stack_lvl (lib/dump_stack.c:123) [ 43.356615][ T422] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 43.356633][ T422] ? kobject_put (lib/kobject.c:733) [ 43.356640][ T422] print_report (mm/kasan/report.c:483) [ 43.356646][ T422] ? kobject_put (lib/kobject.c:733) [ 43.356651][ T422] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 43.356656][ T422] ? kobject_put (lib/kobject.c:733) [ 43.356661][ T422] kasan_report (mm/kasan/report.c:597) [ 43.356668][ T422] ? kobject_put (lib/kobject.c:733) [ 43.356677][ T422] kobject_put (lib/kobject.c:733) [ 43.356683][ T422] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 43.356692][ T422] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 43.356696][ T422] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 43.356703][ T422] ? generic_xdp_install (net/core/dev.c:11630) [ 43.356710][ T422] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 43.356718][ T422] rtnl_dellink (net/core/rtnetlink.c:3580) [ 43.356726][ T422] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 43.356761][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.356771][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.356782][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.356789][ T422] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 43.356793][ T422] ? __lock_release (kernel/locking/lockdep.c:5536) [ 43.356801][ T422] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 43.356807][ T422] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 43.356814][ T422] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 43.356819][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.356833][ T422] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 43.356841][ T422] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 43.356848][ T422] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 43.356861][ T422] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 43.356866][ T422] ? 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) [ 43.356873][ T422] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 43.356881][ T422] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 43.356888][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.356898][ T422] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 43.356907][ T422] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 43.356913][ T422] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 43.356926][ T422] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 43.356932][ T422] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 43.356940][ T422] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 43.356946][ T422] ? __copy_msghdr (net/socket.c:2556) [ 43.356959][ T422] ___sys_sendmsg (net/socket.c:2686) [ 43.356964][ T422] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 43.356969][ T422] ? __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) [ 43.356979][ T422] ? copy_msghdr_from_user (net/socket.c:2673) [ 43.356988][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.356996][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.357006][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.357011][ T422] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 43.357024][ T422] ? __lock_release (kernel/locking/lockdep.c:5536) [ 43.357036][ T422] __sys_sendmsg (net/socket.c:2716) [ 43.357041][ T422] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 43.357048][ T422] ? __sys_sendmsg_sock (net/socket.c:2701) [ 43.357062][ T422] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 43.357070][ T422] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 43.357078][ T422] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 43.357085][ T422] RIP: 0033:0x7fa9834571d7 [ 43.357092][ T422] 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) [ 43.357097][ T422] RSP: 002b:00007ffcd2c14598 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 43.357104][ T422] RAX: ffffffffffffffda RBX: 00007ffcd2c14cc0 RCX: 00007fa9834571d7 [ 43.357108][ T422] RDX: 0000000000000000 RSI: 00007ffcd2c14600 RDI: 0000000000000005 [ 43.357111][ T422] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 43.357114][ T422] R10: 00007fa983353f60 R11: 0000000000000246 R12: 0000000000000002 [ 43.357117][ T422] R13: 00000000690def17 R14: 0000000000499600 R15: 0000000000000000 | [ 43.408031][ T422] refcount_t: underflow; use-after-free. | [ 43.409267][ T422] WARNING: CPU: 0 PID: 422 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 43.409810][ T422] Modules linked in: bridge stp llc 8021q vrf veth | [ 43.410850][ T422] Tainted: [B]=BAD_PAGE [ 43.411075][ T422] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 43.411463][ T422] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 43.411841][ T422] 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 [ 43.412967][ T422] RSP: 0018:ffffc900009671f0 EFLAGS: 00010286 [ 43.413369][ T422] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 43.413831][ T422] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 43.414327][ T422] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff6afe134 [ 43.414803][ T422] R10: 0000000000000003 R11: ffffc90000966d80 R12: 0000000000000001 [ 43.415279][ T422] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 43.415737][ T422] FS: 00007fa983289800(0000) GS:ffff88807f5f2000(0000) knlGS:0000000000000000 [ 43.416364][ T422] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 43.416780][ T422] CR2: 00000000004e6668 CR3: 000000000a53a002 CR4: 0000000000772ef0 [ 43.417245][ T422] PKRU: 55555554 [ 43.417465][ T422] Call Trace: [ 43.417701][ T422] [ 43.418034][ T422] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 43.418349][ T422] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 43.418670][ T422] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 43.418971][ T422] ? generic_xdp_install (net/core/dev.c:11630) [ 43.419281][ T422] ? vlan_vid_del (net/8021q/vlan_core.c:368 net/8021q/vlan_core.c:387) [ 43.419594][ T422] rtnl_dellink (net/core/rtnetlink.c:3580) [ 43.419889][ T422] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 43.420303][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.420612][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.420941][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.421251][ T422] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 43.421555][ T422] ? __lock_release (kernel/locking/lockdep.c:5536) [ 43.422020][ T422] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 43.422396][ T422] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 43.422694][ T422] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 43.422983][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.423301][ T422] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 43.423621][ T422] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 43.423931][ T422] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 43.424458][ T422] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 43.424756][ T422] ? 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) [ 43.425049][ T422] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 43.425351][ T422] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 43.425643][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.426158][ T422] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 43.426433][ T422] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 43.426703][ T422] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 43.426985][ T422] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 43.427499][ T422] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 43.427780][ T422] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 43.428133][ T422] ? __copy_msghdr (net/socket.c:2556) [ 43.428608][ T422] ___sys_sendmsg (net/socket.c:2686) [ 43.428893][ T422] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 43.429194][ T422] ? __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) [ 43.429547][ T422] ? copy_msghdr_from_user (net/socket.c:2673) [ 43.430005][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.430317][ T422] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 43.430601][ T422] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 43.430879][ T422] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 43.431373][ T422] ? __lock_release (kernel/locking/lockdep.c:5536) [ 43.431653][ T422] __sys_sendmsg (net/socket.c:2716) [ 43.431944][ T422] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 43.432331][ T422] ? __sys_sendmsg_sock (net/socket.c:2701) [ 43.432790][ T422] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 43.433062][ T422] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 43.433359][ T422] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 43.433692][ T422] RIP: 0033:0x7fa9834571d7 [ 43.434195][ T422] 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) [ 43.435219][ T422] RSP: 002b:00007ffcd2c14598 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 43.435668][ T422] RAX: ffffffffffffffda RBX: 00007ffcd2c14cc0 RCX: 00007fa9834571d7 [ 43.436134][ T422] RDX: 0000000000000000 RSI: 00007ffcd2c14600 RDI: 0000000000000005 [ 43.436740][ T422] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 43.437165][ T422] R10: 00007fa983353f60 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