====================================== | xx__-> [ 1952.564661][T17218] ================================================================== | [ 1952.565127][T17218] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 1952.565538][T17218] Read of size 1 at addr ffff888007df16ac by task ip/17218 | [ 1952.565922][T17218] [ 1952.566075][T17218] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 1952.566078][T17218] Call Trace: [ 1952.566082][T17218] [ 1952.566085][T17218] dump_stack_lvl (lib/dump_stack.c:123) [ 1952.566093][T17218] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 1952.566102][T17218] ? kobject_put (lib/kobject.c:733) [ 1952.566108][T17218] print_report (mm/kasan/report.c:483) [ 1952.566113][T17218] ? kobject_put (lib/kobject.c:733) [ 1952.566117][T17218] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 1952.566122][T17218] ? kobject_put (lib/kobject.c:733) [ 1952.566126][T17218] kasan_report (mm/kasan/report.c:597) [ 1952.566132][T17218] ? kobject_put (lib/kobject.c:733) [ 1952.566141][T17218] kobject_put (lib/kobject.c:733) [ 1952.566146][T17218] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 1952.566153][T17218] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 1952.566158][T17218] ? generic_xdp_install (net/core/dev.c:11630) [ 1952.566163][T17218] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 1952.566177][T17218] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 1952.566184][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.566197][T17218] rtnl_dellink (net/core/rtnetlink.c:3580) [ 1952.566205][T17218] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 1952.566237][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.566245][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.566253][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.566258][T17218] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 1952.566263][T17218] ? __lock_release (kernel/locking/lockdep.c:5536) [ 1952.566270][T17218] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 1952.566275][T17218] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 1952.566281][T17218] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 1952.566285][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.566296][T17218] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 1952.566302][T17218] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 1952.566308][T17218] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 1952.566318][T17218] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 1952.566323][T17218] ? 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) [ 1952.566329][T17218] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 1952.566335][T17218] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 1952.566340][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.566347][T17218] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 1952.566353][T17218] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 1952.566358][T17218] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 1952.566367][T17218] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 1952.566372][T17218] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 1952.566379][T17218] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 1952.566383][T17218] ? __copy_msghdr (net/socket.c:2556) [ 1952.566394][T17218] ___sys_sendmsg (net/socket.c:2686) [ 1952.566399][T17218] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 1952.566403][T17218] ? __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) [ 1952.566414][T17218] ? copy_msghdr_from_user (net/socket.c:2673) [ 1952.566422][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.566429][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.566439][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.566444][T17218] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 1952.566453][T17218] ? __lock_release (kernel/locking/lockdep.c:5536) [ 1952.566464][T17218] __sys_sendmsg (net/socket.c:2716) [ 1952.566468][T17218] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 1952.566474][T17218] ? __sys_sendmsg_sock (net/socket.c:2701) [ 1952.566487][T17218] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 1952.566493][T17218] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 1952.566502][T17218] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 1952.566508][T17218] RIP: 0033:0x7f8f58e1f1d7 [ 1952.566516][T17218] 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) [ 1952.566520][T17218] RSP: 002b:00007ffc0df1ae38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1952.566526][T17218] RAX: ffffffffffffffda RBX: 00007ffc0df1b560 RCX: 00007f8f58e1f1d7 [ 1952.566530][T17218] RDX: 0000000000000000 RSI: 00007ffc0df1aea0 RDI: 0000000000000005 [ 1952.566533][T17218] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 1952.566535][T17218] R10: 00007f8f58d1bf60 R11: 0000000000000246 R12: 0000000000000002 [ 1952.566538][T17218] R13: 00000000690de9fc R14: 0000000000499600 R15: 0000000000000000 | [ 1952.604061][T17218] refcount_t: underflow; use-after-free. | [ 1952.604266][T17218] WARNING: CPU: 1 PID: 17218 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 1952.604706][T17218] Modules linked in: vrf veth | [ 1952.605302][T17218] Tainted: [B]=BAD_PAGE [ 1952.605443][T17218] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 1952.605684][T17218] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 1952.605952][T17218] 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 a8 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 a8 mov $0xffffffffa8658d60,%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 [ 1952.606727][T17218] RSP: 0018:ffffc90005ea71f0 EFLAGS: 00010286 [ 1952.607069][T17218] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 1952.607347][T17218] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 1952.607639][T17218] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff51fe134 [ 1952.608032][T17218] R10: 0000000000000003 R11: ffffc90005ea6d80 R12: 0000000000000001 [ 1952.608312][T17218] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 1952.608601][T17218] FS: 00007f8f58c51800(0000) GS:ffff88808be72000(0000) knlGS:0000000000000000 [ 1952.608936][T17218] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1952.609175][T17218] CR2: 00007fa7196d4000 CR3: 000000000a505006 CR4: 0000000000772ef0 [ 1952.609583][T17218] PKRU: 55555554 [ 1952.609737][T17218] Call Trace: [ 1952.609874][T17218] [ 1952.609983][T17218] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 1952.610172][T17218] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 1952.610465][T17218] ? generic_xdp_install (net/core/dev.c:11630) [ 1952.610683][T17218] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 1952.610877][T17218] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 1952.611113][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.611401][T17218] rtnl_dellink (net/core/rtnetlink.c:3580) [ 1952.611598][T17218] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 1952.611838][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.612035][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.612215][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.612425][T17218] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 1952.612624][T17218] ? __lock_release (kernel/locking/lockdep.c:5536) [ 1952.612824][T17218] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 1952.613058][T17218] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 1952.613245][T17218] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 1952.613534][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.613737][T17218] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 1952.613945][T17218] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 1952.614221][T17218] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 1952.614415][T17218] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 1952.614629][T17218] ? 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) [ 1952.614925][T17218] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 1952.615112][T17218] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 1952.615298][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.615482][T17218] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 1952.615689][T17218] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 1952.615882][T17218] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 1952.616080][T17218] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 1952.616278][T17218] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 1952.616582][T17218] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 1952.616816][T17218] ? __copy_msghdr (net/socket.c:2556) [ 1952.617011][T17218] ___sys_sendmsg (net/socket.c:2686) [ 1952.617391][T17218] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 1952.617595][T17218] ? __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) [ 1952.617833][T17218] ? copy_msghdr_from_user (net/socket.c:2673) [ 1952.618025][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.618298][T17218] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 1952.618474][T17218] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 1952.618665][T17218] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 1952.618856][T17218] ? __lock_release (kernel/locking/lockdep.c:5536) [ 1952.619136][T17218] __sys_sendmsg (net/socket.c:2716) [ 1952.619313][T17218] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 1952.619552][T17218] ? __sys_sendmsg_sock (net/socket.c:2701) [ 1952.619839][T17218] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 1952.620031][T17218] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 1952.620210][T17218] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 1952.620428][T17218] RIP: 0033:0x7f8f58e1f1d7 [ 1952.620640][T17218] 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) [ 1952.621281][T17218] RSP: 002b:00007ffc0df1ae38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1952.621665][T17218] RAX: ffffffffffffffda RBX: 00007ffc0df1b560 RCX: 00007f8f58e1f1d7 [ 1952.621952][T17218] RDX: 0000000000000000 RSI: 00007ffc0df1aea0 RDI: 0000000000000005 [ 1952.622310][T17218] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 1952.622588][T17218] R10: 00007f8f58d1bf60 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