====================================== | xx__-> [ 236.339108][ T2842] ================================================================== | [ 236.339473][ T2842] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 236.339801][ T2842] Read of size 1 at addr ffff888004bec6ac by task ip/2842 | [ 236.340074][ T2842] [ 236.340188][ T2842] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 236.340191][ T2842] Call Trace: [ 236.340193][ T2842] [ 236.340195][ T2842] dump_stack_lvl (lib/dump_stack.c:123) [ 236.340204][ T2842] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 236.340212][ T2842] ? kobject_put (lib/kobject.c:733) [ 236.340216][ T2842] print_report (mm/kasan/report.c:483) [ 236.340219][ T2842] ? kobject_put (lib/kobject.c:733) [ 236.340222][ T2842] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 236.340225][ T2842] ? kobject_put (lib/kobject.c:733) [ 236.340229][ T2842] kasan_report (mm/kasan/report.c:597) [ 236.340232][ T2842] ? kobject_put (lib/kobject.c:733) [ 236.340237][ T2842] kobject_put (lib/kobject.c:733) [ 236.340241][ T2842] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 236.340247][ T2842] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 236.340253][ T2842] ? generic_xdp_install (net/core/dev.c:11630) [ 236.340258][ T2842] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 236.340268][ T2842] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 236.340274][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.340285][ T2842] rtnl_dellink (net/core/rtnetlink.c:3580) [ 236.340291][ T2842] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 236.340310][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.340315][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.340321][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.340325][ T2842] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 236.340327][ T2842] ? __lock_release (kernel/locking/lockdep.c:5536) [ 236.340332][ T2842] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 236.340335][ T2842] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 236.340339][ T2842] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 236.340341][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.340348][ T2842] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 236.340353][ T2842] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 236.340357][ T2842] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 236.340363][ T2842] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 236.340366][ T2842] ? 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) [ 236.340370][ T2842] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 236.340374][ T2842] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 236.340378][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.340384][ T2842] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 236.340388][ T2842] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 236.340392][ T2842] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 236.340399][ T2842] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 236.340402][ T2842] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 236.340409][ T2842] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 236.340412][ T2842] ? __copy_msghdr (net/socket.c:2556) [ 236.340421][ T2842] ___sys_sendmsg (net/socket.c:2686) [ 236.340424][ T2842] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 236.340427][ T2842] ? __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) [ 236.340434][ T2842] ? copy_msghdr_from_user (net/socket.c:2673) [ 236.340439][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.340443][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.340449][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.340452][ T2842] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 236.340458][ T2842] ? __lock_release (kernel/locking/lockdep.c:5536) [ 236.340464][ T2842] __sys_sendmsg (net/socket.c:2716) [ 236.340467][ T2842] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 236.340471][ T2842] ? __sys_sendmsg_sock (net/socket.c:2701) [ 236.340479][ T2842] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 236.340482][ T2842] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 236.340489][ T2842] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 236.340493][ T2842] RIP: 0033:0x7f90f4d641d7 [ 236.340499][ T2842] 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) [ 236.340502][ T2842] RSP: 002b:00007fff81f9e3a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 236.340506][ T2842] RAX: ffffffffffffffda RBX: 00007fff81f9ead0 RCX: 00007f90f4d641d7 [ 236.340509][ T2842] RDX: 0000000000000000 RSI: 00007fff81f9e410 RDI: 0000000000000005 [ 236.340510][ T2842] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 236.340512][ T2842] R10: 00007f90f4c60f60 R11: 0000000000000246 R12: 0000000000000002 [ 236.340515][ T2842] R13: 00000000690de9ab R14: 0000000000499600 R15: 0000000000000000 | [ 236.370808][ T2842] refcount_t: underflow; use-after-free. | [ 236.371111][ T2842] WARNING: CPU: 1 PID: 2842 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 236.371550][ T2842] Modules linked in: vrf veth | [ 236.372334][ T2842] Tainted: [B]=BAD_PAGE [ 236.372515][ T2842] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 236.372828][ T2842] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 236.373180][ T2842] 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 85 a3 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 85 a3 mov $0xffffffffa3858d60,%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 [ 236.374168][ T2842] RSP: 0018:ffffc90003b571f0 EFLAGS: 00010286 [ 236.374496][ T2842] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 236.374864][ T2842] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 236.375255][ T2842] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff483e134 [ 236.375661][ T2842] R10: 0000000000000003 R11: ffffc90003b56d80 R12: 0000000000000001 [ 236.376143][ T2842] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 236.376538][ T2842] FS: 00007f90f4b96800(0000) GS:ffff888090c72000(0000) knlGS:0000000000000000 [ 236.377019][ T2842] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 236.377397][ T2842] CR2: 00007fd97833d000 CR3: 000000000e9a0004 CR4: 0000000000772ef0 [ 236.377816][ T2842] PKRU: 55555554 [ 236.378034][ T2842] Call Trace: [ 236.378251][ T2842] [ 236.378372][ T2842] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 236.378666][ T2842] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 236.378964][ T2842] ? generic_xdp_install (net/core/dev.c:11630) [ 236.379265][ T2842] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 236.379562][ T2842] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 236.379946][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.380223][ T2842] rtnl_dellink (net/core/rtnetlink.c:3580) [ 236.380472][ T2842] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 236.380825][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.381096][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.381365][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.381622][ T2842] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 236.381888][ T2842] ? __lock_release (kernel/locking/lockdep.c:5536) [ 236.382168][ T2842] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 236.382503][ T2842] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 236.382776][ T2842] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 236.383056][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.383323][ T2842] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 236.383661][ T2842] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 236.383946][ T2842] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 236.384206][ T2842] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 236.384470][ T2842] ? 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) [ 236.384737][ T2842] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 236.385057][ T2842] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 236.385327][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.385578][ T2842] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 236.385859][ T2842] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 236.386188][ T2842] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 236.386462][ T2842] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 236.386719][ T2842] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 236.387000][ T2842] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 236.387334][ T2842] ? __copy_msghdr (net/socket.c:2556) [ 236.387596][ T2842] ___sys_sendmsg (net/socket.c:2686) [ 236.387842][ T2842] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 236.388122][ T2842] ? __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) [ 236.388469][ T2842] ? copy_msghdr_from_user (net/socket.c:2673) [ 236.388735][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.389003][ T2842] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 236.389275][ T2842] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 236.389540][ T2842] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 236.389804][ T2842] ? __lock_release (kernel/locking/lockdep.c:5536) [ 236.390088][ T2842] __sys_sendmsg (net/socket.c:2716) [ 236.390373][ T2842] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 236.390699][ T2842] ? __sys_sendmsg_sock (net/socket.c:2701) [ 236.390985][ T2842] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 236.391252][ T2842] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 236.391573][ T2842] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 236.391907][ T2842] RIP: 0033:0x7f90f4d641d7 [ 236.392195][ T2842] 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) [ 236.393462][ T2842] RSP: 002b:00007fff81f9e3a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 236.393900][ T2842] RAX: ffffffffffffffda RBX: 00007fff81f9ead0 RCX: 00007f90f4d641d7 [ 236.394494][ T2842] RDX: 0000000000000000 RSI: 00007fff81f9e410 RDI: 0000000000000005 [ 236.394909][ T2842] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 236.395488][ T2842] R10: 00007f90f4c60f60 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