====================================== | [ 62.254639][ T646] ================================================================== | [ 62.255000][ T646] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 62.255316][ T646] Read of size 1 at addr ffff88800af3c6ac by task ip/646 | [ 62.255557][ T646] [ 62.255667][ T646] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 62.255669][ T646] Call Trace: [ 62.255676][ T646] [ 62.255677][ T646] dump_stack_lvl (lib/dump_stack.c:123) [ 62.255685][ T646] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 62.255693][ T646] ? kobject_put (lib/kobject.c:733) [ 62.255697][ T646] print_report (mm/kasan/report.c:483) [ 62.255700][ T646] ? kobject_put (lib/kobject.c:733) [ 62.255703][ T646] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 62.255706][ T646] ? kobject_put (lib/kobject.c:733) [ 62.255709][ T646] kasan_report (mm/kasan/report.c:597) [ 62.255713][ T646] ? kobject_put (lib/kobject.c:733) [ 62.255718][ T646] kobject_put (lib/kobject.c:733) [ 62.255722][ T646] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 62.255727][ T646] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 62.255732][ T646] ? generic_xdp_install (net/core/dev.c:11630) [ 62.255737][ T646] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 62.255743][ T646] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 62.255748][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.255758][ T646] rtnl_dellink (net/core/rtnetlink.c:3580) [ 62.255764][ T646] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 62.255783][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.255788][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.255793][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.255797][ T646] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 62.255799][ T646] ? __lock_release (kernel/locking/lockdep.c:5536) [ 62.255804][ T646] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 62.255807][ T646] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 62.255811][ T646] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 62.255814][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.255821][ T646] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 62.255827][ T646] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 62.255831][ T646] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 62.255837][ T646] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 62.255840][ T646] ? 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) [ 62.255843][ T646] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 62.255848][ T646] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 62.255852][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.255857][ T646] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 62.255861][ T646] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 62.255865][ T646] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 62.255876][ T646] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 62.255879][ T646] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 62.255886][ T646] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 62.255889][ T646] ? __copy_msghdr (net/socket.c:2556) [ 62.255898][ T646] ___sys_sendmsg (net/socket.c:2686) [ 62.255901][ T646] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 62.255904][ T646] ? __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) [ 62.255913][ T646] ? copy_msghdr_from_user (net/socket.c:2673) [ 62.255918][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.255922][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.255946][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.255951][ T646] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 62.255964][ T646] ? __lock_release (kernel/locking/lockdep.c:5536) [ 62.255971][ T646] __sys_sendmsg (net/socket.c:2716) [ 62.255974][ T646] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 62.255978][ T646] ? __sys_sendmsg_sock (net/socket.c:2701) [ 62.255985][ T646] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 62.255989][ T646] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 62.255996][ T646] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 62.256005][ T646] RIP: 0033:0x7ff2a02461d7 [ 62.256010][ T646] 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) [ 62.256013][ T646] RSP: 002b:00007ffd22c51fd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 62.256018][ T646] RAX: ffffffffffffffda RBX: 00007ffd22c52700 RCX: 00007ff2a02461d7 [ 62.256020][ T646] RDX: 0000000000000000 RSI: 00007ffd22c52040 RDI: 0000000000000005 [ 62.256022][ T646] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 62.256023][ T646] R10: 00007ff2a0142f60 R11: 0000000000000246 R12: 0000000000000002 [ 62.256025][ T646] R13: 00000000690dee2b R14: 0000000000499600 R15: 0000000000000000 | [ 62.286208][ T646] refcount_t: underflow; use-after-free. | [ 62.286424][ T646] WARNING: CPU: 0 PID: 646 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 62.286782][ T646] Modules linked in: act_gact cls_flower sch_ingress vrf veth | [ 62.287478][ T646] Tainted: [B]=BAD_PAGE [ 62.287628][ T646] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 62.287876][ T646] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 62.288128][ T646] 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 a1 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 a1 mov $0xffffffffa1658d60,%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 [ 62.288805][ T646] RSP: 0018:ffffc900010571f0 EFLAGS: 00010286 [ 62.289050][ T646] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 62.289345][ T646] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 62.289628][ T646] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff43fe134 [ 62.289922][ T646] R10: 0000000000000003 R11: ffffc90001056d80 R12: 0000000000000001 [ 62.290217][ T646] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 62.290515][ T646] FS: 00007ff2a0078800(0000) GS:ffff88808d1f2000(0000) knlGS:0000000000000000 [ 62.290858][ T646] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 62.291103][ T646] CR2: 00000000004e73d8 CR3: 0000000004e4d003 CR4: 0000000000772ef0 [ 62.291389][ T646] PKRU: 55555554 [ 62.291535][ T646] Call Trace: [ 62.291681][ T646] [ 62.291787][ T646] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 62.291988][ T646] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 62.292188][ T646] ? generic_xdp_install (net/core/dev.c:11630) [ 62.292376][ T646] ? vrf_dellink (drivers/net/vrf.c:1667) vrf [ 62.292566][ T646] ? vrf_map_unregister_dev (drivers/net/vrf.c:1667) vrf [ 62.292811][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.293006][ T646] rtnl_dellink (net/core/rtnetlink.c:3580) [ 62.293197][ T646] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 62.293452][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.293641][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.293839][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.294027][ T646] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 62.294212][ T646] ? __lock_release (kernel/locking/lockdep.c:5536) [ 62.294399][ T646] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 62.294635][ T646] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 62.294835][ T646] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 62.295025][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.295221][ T646] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 62.295434][ T646] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 62.295623][ T646] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 62.295823][ T646] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 62.296028][ T646] ? 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) [ 62.296220][ T646] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 62.296420][ T646] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 62.296610][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.296807][ T646] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 62.297000][ T646] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 62.297189][ T646] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 62.297383][ T646] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 62.297571][ T646] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 62.297762][ T646] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 62.298016][ T646] ? __copy_msghdr (net/socket.c:2556) [ 62.298213][ T646] ___sys_sendmsg (net/socket.c:2686) [ 62.298411][ T646] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 62.298609][ T646] ? __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) [ 62.298866][ T646] ? copy_msghdr_from_user (net/socket.c:2673) [ 62.299060][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.299252][ T646] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 62.299464][ T646] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 62.299656][ T646] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 62.299859][ T646] ? __lock_release (kernel/locking/lockdep.c:5536) [ 62.300055][ T646] __sys_sendmsg (net/socket.c:2716) [ 62.300247][ T646] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 62.300489][ T646] ? __sys_sendmsg_sock (net/socket.c:2701) [ 62.300681][ T646] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 62.300880][ T646] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 62.301086][ T646] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 62.301326][ T646] RIP: 0033:0x7ff2a02461d7 [ 62.301528][ T646] 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) [ 62.302228][ T646] RSP: 002b:00007ffd22c51fd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 62.302534][ T646] RAX: ffffffffffffffda RBX: 00007ffd22c52700 RCX: 00007ff2a02461d7 [ 62.302825][ T646] RDX: 0000000000000000 RSI: 00007ffd22c52040 RDI: 0000000000000005 [ 62.303106][ T646] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 62.303393][ T646] R10: 00007ff2a0142f60 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