====================================== | [ 113.548590][ T660] ================================================================== | [ 113.548919][ T660] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 113.549198][ T660] Read of size 1 at addr ffff88800890c6ac by task ip/660 | [ 113.549405][ T660] [ 113.549550][ T660] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 113.549553][ T660] Call Trace: [ 113.549555][ T660] [ 113.549557][ T660] dump_stack_lvl (lib/dump_stack.c:123) [ 113.549563][ T660] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 113.549569][ T660] ? kobject_put (lib/kobject.c:733) [ 113.549574][ T660] print_report (mm/kasan/report.c:483) [ 113.549577][ T660] ? kobject_put (lib/kobject.c:733) [ 113.549580][ T660] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 113.549583][ T660] ? kobject_put (lib/kobject.c:733) [ 113.549586][ T660] kasan_report (mm/kasan/report.c:597) [ 113.549589][ T660] ? kobject_put (lib/kobject.c:733) [ 113.549595][ T660] kobject_put (lib/kobject.c:733) [ 113.549598][ T660] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 113.549603][ T660] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 113.549607][ T660] ? generic_xdp_install (net/core/dev.c:11630) [ 113.549610][ T660] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 113.549617][ T660] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 113.549621][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.549629][ T660] rtnl_dellink (net/core/rtnetlink.c:3580) [ 113.549634][ T660] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 113.549653][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.549658][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.549663][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.549667][ T660] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 113.549669][ T660] ? __lock_release (kernel/locking/lockdep.c:5536) [ 113.549674][ T660] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 113.549677][ T660] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 113.549681][ T660] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 113.549683][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.549690][ T660] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 113.549694][ T660] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 113.549698][ T660] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 113.549708][ T660] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 113.549712][ T660] ? 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) [ 113.549718][ T660] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 113.549725][ T660] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 113.549730][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.549740][ T660] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 113.549748][ T660] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 113.549752][ T660] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 113.549758][ T660] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 113.549762][ T660] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 113.549767][ T660] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 113.549770][ T660] ? __copy_msghdr (net/socket.c:2556) [ 113.549777][ T660] ___sys_sendmsg (net/socket.c:2686) [ 113.549780][ T660] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 113.549783][ T660] ? __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) [ 113.549788][ T660] ? copy_msghdr_from_user (net/socket.c:2673) [ 113.549792][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.549797][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.549802][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.549806][ T660] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 113.549810][ T660] ? __lock_release (kernel/locking/lockdep.c:5536) [ 113.549817][ T660] __sys_sendmsg (net/socket.c:2716) [ 113.549820][ T660] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 113.549823][ T660] ? __sys_sendmsg_sock (net/socket.c:2701) [ 113.549831][ T660] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 113.549835][ T660] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 113.549839][ T660] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 113.549843][ T660] RIP: 0033:0x7f837ba421d7 [ 113.549847][ T660] 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) [ 113.549850][ T660] RSP: 002b:00007fff87d89a88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 113.549854][ T660] RAX: ffffffffffffffda RBX: 00007fff87d8a1b0 RCX: 00007f837ba421d7 [ 113.549856][ T660] RDX: 0000000000000000 RSI: 00007fff87d89af0 RDI: 0000000000000005 [ 113.549858][ T660] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 113.549860][ T660] R10: 00007f837b93ef60 R11: 0000000000000246 R12: 0000000000000002 [ 113.549861][ T660] R13: 00000000690df5af R14: 0000000000499600 R15: 0000000000000000 | [ 113.582462][ T660] refcount_t: underflow; use-after-free. | [ 113.582645][ T660] WARNING: CPU: 1 PID: 660 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 113.583025][ T660] Modules linked in: act_gact cls_flower sch_ingress ip_gre gre 8021q vrf veth | [ 113.583646][ T660] Tainted: [B]=BAD_PAGE [ 113.583790][ T660] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 113.583988][ T660] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 113.584197][ T660] 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 c5 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 c5 b4 mov $0xffffffffb4c58d60,%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 [ 113.584780][ T660] RSP: 0018:ffffc900010df1f0 EFLAGS: 00010286 [ 113.584981][ T660] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 113.585311][ T660] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 113.585548][ T660] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff6abe134 [ 113.585812][ T660] R10: 0000000000000003 R11: ffffc900010ded80 R12: 0000000000000001 [ 113.586147][ T660] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 113.586382][ T660] FS: 00007f837b874800(0000) GS:ffff88807f872000(0000) knlGS:0000000000000000 [ 113.586772][ T660] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 113.586972][ T660] CR2: 00000000004061e9 CR3: 0000000008200001 CR4: 0000000000772ef0 [ 113.587211][ T660] PKRU: 55555554 [ 113.587334][ T660] Call Trace: [ 113.587545][ T660] [ 113.587626][ T660] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 113.587813][ T660] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 113.587989][ T660] ? generic_xdp_install (net/core/dev.c:11630) [ 113.588254][ T660] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 113.588422][ T660] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 113.588626][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.588811][ T660] rtnl_dellink (net/core/rtnetlink.c:3580) [ 113.589074][ T660] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 113.589281][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.589452][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.589619][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.589877][ T660] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 113.590039][ T660] ? __lock_release (kernel/locking/lockdep.c:5536) [ 113.590199][ T660] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 113.590394][ T660] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 113.590670][ T660] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 113.590841][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.591002][ T660] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 113.591163][ T660] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 113.591423][ T660] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 113.591599][ T660] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 113.591767][ T660] ? 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) [ 113.591940][ T660] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 113.592212][ T660] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 113.592376][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.592541][ T660] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 113.592713][ T660] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 113.592898][ T660] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 113.593059][ T660] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 113.593234][ T660] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 113.593408][ T660] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 113.593716][ T660] ? __copy_msghdr (net/socket.c:2556) [ 113.593900][ T660] ___sys_sendmsg (net/socket.c:2686) [ 113.594068][ T660] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 113.594331][ T660] ? __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) [ 113.594532][ T660] ? copy_msghdr_from_user (net/socket.c:2673) [ 113.594692][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.594859][ T660] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 113.595109][ T660] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 113.595267][ T660] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 113.595422][ T660] ? __lock_release (kernel/locking/lockdep.c:5536) [ 113.595582][ T660] __sys_sendmsg (net/socket.c:2716) [ 113.595865][ T660] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 113.596066][ T660] ? __sys_sendmsg_sock (net/socket.c:2701) [ 113.596227][ T660] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 113.596399][ T660] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 113.596664][ T660] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 113.596917][ T660] RIP: 0033:0x7f837ba421d7 [ 113.597092][ T660] 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) [ 113.597784][ T660] RSP: 002b:00007fff87d89a88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 113.598043][ T660] RAX: ffffffffffffffda RBX: 00007fff87d8a1b0 RCX: 00007f837ba421d7 [ 113.598374][ T660] RDX: 0000000000000000 RSI: 00007fff87d89af0 RDI: 0000000000000005 [ 113.598614][ T660] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 113.598977][ T660] R10: 00007f837b93ef60 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