====================================== | [ 72.863513][ T396] ================================================================== | [ 72.863872][ T396] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 72.864159][ T396] Read of size 1 at addr ffff8880119c96ac by task ip/396 | [ 72.864385][ T396] [ 72.864490][ T396] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 72.864492][ T396] Call Trace: [ 72.864495][ T396] [ 72.864496][ T396] dump_stack_lvl (lib/dump_stack.c:123) [ 72.864503][ T396] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 72.864515][ T396] ? kobject_put (lib/kobject.c:733) [ 72.864519][ T396] print_report (mm/kasan/report.c:483) [ 72.864522][ T396] ? kobject_put (lib/kobject.c:733) [ 72.864525][ T396] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 72.864528][ T396] ? kobject_put (lib/kobject.c:733) [ 72.864532][ T396] kasan_report (mm/kasan/report.c:597) [ 72.864535][ T396] ? kobject_put (lib/kobject.c:733) [ 72.864540][ T396] kobject_put (lib/kobject.c:733) [ 72.864544][ T396] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 72.864550][ T396] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 72.864554][ T396] ? generic_xdp_install (net/core/dev.c:11630) [ 72.864558][ T396] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 72.864564][ T396] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 72.864569][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.864581][ T396] rtnl_dellink (net/core/rtnetlink.c:3580) [ 72.864587][ T396] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 72.864606][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.864610][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.864616][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.864620][ T396] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 72.864623][ T396] ? __lock_release (kernel/locking/lockdep.c:5536) [ 72.864628][ T396] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 72.864631][ T396] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 72.864635][ T396] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 72.864638][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.864645][ T396] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 72.864650][ T396] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 72.864654][ T396] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 72.864664][ T396] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 72.864668][ T396] ? 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) [ 72.864675][ T396] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 72.864682][ T396] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 72.864688][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.864693][ T396] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 72.864698][ T396] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 72.864701][ T396] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 72.864709][ T396] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 72.864712][ T396] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 72.864719][ T396] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 72.864723][ T396] ? __copy_msghdr (net/socket.c:2556) [ 72.864731][ T396] ___sys_sendmsg (net/socket.c:2686) [ 72.864734][ T396] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 72.864738][ T396] ? __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) [ 72.864746][ T396] ? copy_msghdr_from_user (net/socket.c:2673) [ 72.864751][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.864756][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.864761][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.864765][ T396] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 72.864774][ T396] ? __lock_release (kernel/locking/lockdep.c:5536) [ 72.864781][ T396] __sys_sendmsg (net/socket.c:2716) [ 72.864784][ T396] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 72.864788][ T396] ? __sys_sendmsg_sock (net/socket.c:2701) [ 72.864796][ T396] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 72.864800][ T396] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 72.864807][ T396] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 72.864811][ T396] RIP: 0033:0x7f4a745241d7 [ 72.864818][ T396] 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) [ 72.864821][ T396] RSP: 002b:00007ffd09fae9c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 72.864826][ T396] RAX: ffffffffffffffda RBX: 00007ffd09faf0f0 RCX: 00007f4a745241d7 [ 72.864828][ T396] RDX: 0000000000000000 RSI: 00007ffd09faea30 RDI: 0000000000000005 [ 72.864830][ T396] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 72.864832][ T396] R10: 00007f4a74420f60 R11: 0000000000000246 R12: 0000000000000002 [ 72.864834][ T396] R13: 00000000690df04b R14: 0000000000499600 R15: 0000000000000000 | [ 72.896831][ T396] refcount_t: underflow; use-after-free. | [ 72.897064][ T396] WARNING: CPU: 2 PID: 396 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 72.897436][ T396] Modules linked in: 8021q vrf veth | [ 72.898936][ T396] Tainted: [B]=BAD_PAGE [ 72.899108][ T396] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 72.899369][ T396] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 72.899636][ T396] 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 8d 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 8d mov $0xffffffff8d258d60,%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 [ 72.900338][ T396] RSP: 0018:ffffc900005e71f0 EFLAGS: 00010286 [ 72.900597][ T396] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 72.900913][ T396] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 72.901209][ T396] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff1b7e134 [ 72.901528][ T396] R10: 0000000000000003 R11: ffffc900005e6d80 R12: 0000000000000001 [ 72.901842][ T396] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 72.902142][ T396] FS: 00007f4a74356800(0000) GS:ffff8880a72f2000(0000) knlGS:0000000000000000 [ 72.902499][ T396] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 72.902763][ T396] CR2: 00000000004e6680 CR3: 0000000004b64003 CR4: 0000000000772ef0 [ 72.903069][ T396] PKRU: 55555554 [ 72.903232][ T396] Call Trace: [ 72.903402][ T396] [ 72.903520][ T396] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 72.903765][ T396] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 72.903979][ T396] ? generic_xdp_install (net/core/dev.c:11630) [ 72.904295][ T396] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 72.904515][ T396] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 72.904805][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.905021][ T396] rtnl_dellink (net/core/rtnetlink.c:3580) [ 72.905333][ T396] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 72.905594][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.905803][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.906008][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.906229][ T396] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 72.906446][ T396] ? __lock_release (kernel/locking/lockdep.c:5536) [ 72.906653][ T396] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 72.907033][ T396] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 72.907248][ T396] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 72.907465][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.907683][ T396] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 72.907997][ T396] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 72.908210][ T396] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 72.908429][ T396] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 72.908636][ T396] ? 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) [ 72.908960][ T396] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 72.909169][ T396] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 72.909384][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.909591][ T396] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 72.909909][ T396] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 72.910117][ T396] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 72.910335][ T396] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 72.910544][ T396] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 72.910857][ T396] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 72.911110][ T396] ? __copy_msghdr (net/socket.c:2556) [ 72.911326][ T396] ___sys_sendmsg (net/socket.c:2686) [ 72.911531][ T396] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 72.911847][ T396] ? __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) [ 72.912102][ T396] ? copy_msghdr_from_user (net/socket.c:2673) [ 72.912315][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.912518][ T396] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 72.912849][ T396] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 72.913049][ T396] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 72.913253][ T396] ? __lock_release (kernel/locking/lockdep.c:5536) [ 72.913473][ T396] __sys_sendmsg (net/socket.c:2716) [ 72.913783][ T396] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 72.914027][ T396] ? __sys_sendmsg_sock (net/socket.c:2701) [ 72.914229][ T396] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 72.914538][ T396] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 72.914748][ T396] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 72.914987][ T396] RIP: 0033:0x7f4a745241d7 [ 72.915201][ T396] 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) [ 72.915881][ T396] RSP: 002b:00007ffd09fae9c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 72.916281][ T396] RAX: ffffffffffffffda RBX: 00007ffd09faf0f0 RCX: 00007f4a745241d7 [ 72.916579][ T396] RDX: 0000000000000000 RSI: 00007ffd09faea30 RDI: 0000000000000005 [ 72.916908][ T396] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 72.917203][ T396] R10: 00007f4a74420f60 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