==================================================================
BUG: KFENCE: use-after-free read in __xfrm_state_lookup+0x319/0x8d0

Use-after-free read at 0xffff888136580142 (in kfence-#191):
 __xfrm_state_lookup+0x319/0x8d0
 xfrm_state_add+0x27d/0xc40
 pfkey_add+0x1edd/0x2e00
 pfkey_sendmsg+0xbfe/0x1090
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x505/0x830
 ___sys_sendmsg+0x21f/0x2a0
 __x64_sys_sendmsg+0x19b/0x260
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

kfence-#191: 0xffff888136580000-0xffff8881365800ef, size=240, cache=skbuff_head_cache

allocated by task 0 on cpu 0 at 341.504957s (4.017928s ago):
 __alloc_skb+0x112/0x2d0
 __netdev_alloc_skb+0x108/0x970
 __ieee80211_beacon_get+0xc06/0x1880
 ieee80211_beacon_get_tim+0xb4/0x2b0
 mac80211_hwsim_beacon_tx+0x3ce/0x860
 __iterate_interfaces+0x2ab/0x590
 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180
 mac80211_hwsim_beacon+0xbb/0x1c0
 __hrtimer_run_queues+0x52c/0xc60
 hrtimer_run_softirq+0x187/0x2b0
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
 pv_native_safe_halt+0x13/0x20
 default_idle+0x13/0x20
 default_idle_call+0x74/0xb0
 do_idle+0x1e8/0x510
 cpu_startup_entry+0x44/0x60
 rest_init+0x2de/0x300
 start_kernel+0x3a9/0x410
 x86_64_start_reservations+0x24/0x30
 x86_64_start_kernel+0x143/0x1c0
 common_startup_64+0x13e/0x147

freed by task 0 on cpu 0 at 341.505037s (4.067978s ago):
 mac80211_hwsim_beacon_tx+0x3f0/0x860
 __iterate_interfaces+0x2ab/0x590
 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180
 mac80211_hwsim_beacon+0xbb/0x1c0
 __hrtimer_run_queues+0x52c/0xc60
 hrtimer_run_softirq+0x187/0x2b0
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
 pv_native_safe_halt+0x13/0x20
 default_idle+0x13/0x20
 default_idle_call+0x74/0xb0
 do_idle+0x1e8/0x510
 cpu_startup_entry+0x44/0x60
 rest_init+0x2de/0x300
 start_kernel+0x3a9/0x410
 x86_64_start_reservations+0x24/0x30
 x86_64_start_kernel+0x143/0x1c0
 common_startup_64+0x13e/0x147

CPU: 0 UID: 0 PID: 18174 Comm: syz.1.3346 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:__xfrm_state_lookup+0x319/0x8d0
Code: 30 48 89 4c 24 38 48 c1 e9 03 48 89 4c 24 50 4c 8d b3 42 01 00 00 4c 89 f0 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 7c 03 00 00 <45> 0f b7 36 44 89 f7 44 89 ee e8 f8 78 9d f7 66 45 39 ee 0f 85 2f
RSP: 0018:ffffc900033cf480 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff888136580000 RCX: 1ffff11005f22497
RDX: ffff888028b65640 RSI: 0000000000000002 RDI: 000000000000000a
RBP: ffffc900033cf578 R08: ffff888028b65640 R09: 0000000000000002
R10: 000000000000000a R11: 0000000000000002 R12: dffffc0000000000
R13: 0000000000000002 R14: ffff888136580142 R15: 00000000d5040000
FS:  00007f9ee93856c0(0000) GS:ffff8880b8613000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff888136580142 CR3: 0000000038922000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 xfrm_state_add+0x27d/0xc40
 pfkey_add+0x1edd/0x2e00
 pfkey_sendmsg+0xbfe/0x1090
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x505/0x830
 ___sys_sendmsg+0x21f/0x2a0
 __x64_sys_sendmsg+0x19b/0x260
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9ee858eba9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9ee9385038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f9ee87d5fa0 RCX: 00007f9ee858eba9
RDX: 0000000000000000 RSI: 0000200000000040 RDI: 000000000000000a
RBP: 00007f9ee8611e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9ee87d6038 R14: 00007f9ee87d5fa0 R15: 00007fff0add7788
 </TASK>
==================================================================
