====================================== | [ 212.288793][ T573] ================================================================== | [ 212.289172][ T573] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 212.289437][ T573] Read of size 1 at addr ffff888008bc16ac by task ip/573 | [ 212.289663][ T573] [ 212.289766][ T573] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 212.289768][ T573] Call Trace: [ 212.289771][ T573] [ 212.289773][ T573] dump_stack_lvl (lib/dump_stack.c:123) [ 212.289779][ T573] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 212.289787][ T573] ? kobject_put (lib/kobject.c:733) [ 212.289791][ T573] print_report (mm/kasan/report.c:483) [ 212.289794][ T573] ? kobject_put (lib/kobject.c:733) [ 212.289798][ T573] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 212.289804][ T573] ? kobject_put (lib/kobject.c:733) [ 212.289808][ T573] kasan_report (mm/kasan/report.c:597) [ 212.289814][ T573] ? kobject_put (lib/kobject.c:733) [ 212.289822][ T573] kobject_put (lib/kobject.c:733) [ 212.289828][ T573] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 212.289832][ T573] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 212.289836][ T573] ? generic_xdp_install (net/core/dev.c:11630) [ 212.289841][ T573] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 212.289847][ T573] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 212.289852][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.289860][ T573] rtnl_dellink (net/core/rtnetlink.c:3580) [ 212.289865][ T573] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 212.289884][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.289889][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.289895][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.289898][ T573] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 212.289901][ T573] ? __lock_release (kernel/locking/lockdep.c:5536) [ 212.289905][ T573] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 212.289909][ T573] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 212.289912][ T573] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 212.289915][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.289922][ T573] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 212.289927][ T573] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 212.289930][ T573] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 212.289936][ T573] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 212.289939][ T573] ? 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) [ 212.289943][ T573] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 212.289948][ T573] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 212.289951][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.289957][ T573] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 212.289961][ T573] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 212.289965][ T573] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 212.289973][ T573] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 212.289976][ T573] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 212.289981][ T573] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 212.289984][ T573] ? __copy_msghdr (net/socket.c:2556) [ 212.289991][ T573] ___sys_sendmsg (net/socket.c:2686) [ 212.289994][ T573] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 212.289997][ T573] ? __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) [ 212.290004][ T573] ? copy_msghdr_from_user (net/socket.c:2673) [ 212.290009][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.290013][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.290019][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.290022][ T573] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 212.290029][ T573] ? __lock_release (kernel/locking/lockdep.c:5536) [ 212.290038][ T573] __sys_sendmsg (net/socket.c:2716) [ 212.290043][ T573] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 212.290049][ T573] ? __sys_sendmsg_sock (net/socket.c:2701) [ 212.290056][ T573] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 212.290060][ T573] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 212.290066][ T573] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 212.290069][ T573] RIP: 0033:0x7fd1ec1301d7 [ 212.290075][ T573] 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) [ 212.290077][ T573] RSP: 002b:00007ffcd3a906f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 212.290081][ T573] RAX: ffffffffffffffda RBX: 00007ffcd3a90e20 RCX: 00007fd1ec1301d7 [ 212.290084][ T573] RDX: 0000000000000000 RSI: 00007ffcd3a90760 RDI: 0000000000000005 [ 212.290085][ T573] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 212.290087][ T573] R10: 00007fd1ec02cf60 R11: 0000000000000246 R12: 0000000000000002 [ 212.290089][ T573] R13: 00000000690df375 R14: 0000000000499600 R15: 0000000000000000 | [ 212.321196][ T573] refcount_t: underflow; use-after-free. | [ 212.321425][ T573] WARNING: CPU: 0 PID: 573 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 212.322355][ T573] Modules linked in: act_gact cls_flower sch_ingress 8021q ip6_gre ip6_tunnel tunnel6 gre vrf veth | [ 212.323150][ T573] Tainted: [B]=BAD_PAGE [ 212.323332][ T573] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 212.323562][ T573] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 212.323856][ T573] 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 05 8c 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 05 8c mov $0xffffffff8c058d60,%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 [ 212.324609][ T573] RSP: 0018:ffffc90000edf1f0 EFLAGS: 00010286 [ 212.324986][ T573] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 212.325301][ T573] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 212.325591][ T573] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff193e134 [ 212.325882][ T573] R10: 0000000000000003 R11: ffffc90000eded80 R12: 0000000000000001 [ 212.326293][ T573] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 212.326677][ T573] FS: 00007fd1ebf62800(0000) GS:ffff8880a27f2000(0000) knlGS:0000000000000000 [ 212.327011][ T573] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 212.327259][ T573] CR2: 00000000004e7450 CR3: 00000000107f2006 CR4: 0000000000772ef0 [ 212.327562][ T573] PKRU: 55555554 [ 212.327700][ T573] Call Trace: [ 212.327851][ T573] [ 212.327954][ T573] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 212.328149][ T573] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 212.328374][ T573] ? generic_xdp_install (net/core/dev.c:11630) [ 212.328656][ T573] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 212.328870][ T573] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 212.329117][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.329314][ T573] rtnl_dellink (net/core/rtnetlink.c:3580) [ 212.329599][ T573] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 212.329871][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.330097][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.330294][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.330574][ T573] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 212.330798][ T573] ? __lock_release (kernel/locking/lockdep.c:5536) [ 212.331001][ T573] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 212.331268][ T573] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 212.331552][ T573] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 212.331742][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.331941][ T573] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 212.332127][ T573] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 212.332446][ T573] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 212.332638][ T573] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 212.332827][ T573] ? 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) [ 212.333018][ T573] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 212.333327][ T573] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 212.333510][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.333700][ T573] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 212.334005][ T573] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 212.334211][ T573] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 212.334409][ T573] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 212.334604][ T573] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 212.334914][ T573] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 212.335153][ T573] ? __copy_msghdr (net/socket.c:2556) [ 212.335444][ T573] ___sys_sendmsg (net/socket.c:2686) [ 212.335630][ T573] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 212.335837][ T573] ? __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) [ 212.336083][ T573] ? copy_msghdr_from_user (net/socket.c:2673) [ 212.336294][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.336485][ T573] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 212.336670][ T573] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 212.336874][ T573] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 212.337064][ T573] ? __lock_release (kernel/locking/lockdep.c:5536) [ 212.337290][ T573] __sys_sendmsg (net/socket.c:2716) [ 212.337600][ T573] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 212.337844][ T573] ? __sys_sendmsg_sock (net/socket.c:2701) [ 212.338050][ T573] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 212.338267][ T573] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 212.338549][ T573] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 212.338793][ T573] RIP: 0033:0x7fd1ec1301d7 [ 212.339011][ T573] 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) [ 212.339814][ T573] RSP: 002b:00007ffcd3a906f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 212.340107][ T573] RAX: ffffffffffffffda RBX: 00007ffcd3a90e20 RCX: 00007fd1ec1301d7 [ 212.340511][ T573] RDX: 0000000000000000 RSI: 00007ffcd3a90760 RDI: 0000000000000005 [ 212.340811][ T573] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 212.341210][ T573] R10: 00007fd1ec02cf60 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