==================================================================
BUG: KASAN: use-after-free in __xfrm_state_delete+0x696/0xca0
Write of size 8 at addr ffff8881181e8930 by task syz.1.1061/9556

CPU: 0 UID: 0 PID: 9556 Comm: syz.1.1061 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
Call Trace:
 <IRQ>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 __xfrm_state_delete+0x696/0xca0
 xfrm_timer_handler+0x18f/0xa00
 __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
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:stack_trace_consume_entry+0x0/0x280
Code: 75 0e 48 8d 65 f0 5b 41 5e 5d c3 cc cc cc cc cc e8 f5 be cd 09 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 55 41 57 41 56 41 55 41 54 53 48 83 ec 18 48 ba 00 00
RSP: 0018:ffffc9000290f6c0 EFLAGS: 00000286
RAX: ffffffff81832318 RBX: ffffc9000290f780 RCX: 1278da88d7330a00
RDX: ffffc9000290f701 RSI: ffffffff81832318 RDI: ffffc9000290f780
RBP: ffffc9000290f750 R08: ffffc9000290fdd0 R09: 0000000000000000
R10: ffffc9000290f718 R11: ffffffff81ac3810 R12: ffff8880350c1cc0
R13: 0000000000000dc0 R14: ffffffff81ac3810 R15: ffffc9000290f6c8
 arch_stack_walk+0x110/0x150
 stack_trace_save+0x9c/0xe0
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kvmalloc_node_noprof+0x30d/0x5f0
 rhashtable_init_noprof+0x4ee/0xbb0
 seg6_net_init+0xff/0x160
 ops_init+0x35c/0x5c0
 setup_net+0x10c/0x320
 copy_net_ns+0x31b/0x4d0
 create_new_namespaces+0x3f3/0x720
 unshare_nsproxy_namespaces+0x11c/0x170
 ksys_unshare+0x4c8/0x8c0
 __x64_sys_unshare+0x38/0x50
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8a5178ebe9
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:00007f8a525e7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f8a519b6090 RCX: 00007f8a5178ebe9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000006a040000
RBP: 00007f8a51811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8a519b6128 R14: 00007f8a519b6090 R15: 00007fff92c796c8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8881181e8800 pfn:0x1181e8
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 057ff00000000000 ffffea0004289e08 ffffea0004222208 0000000000000000
raw: ffff8881181e8800 0000000000000002 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8977, tgid 8976 (syz.1.888), ts 90813129301, free_ts 93632397005
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x8a/0x370
 ___slab_alloc+0xbeb/0x1410
 __kmalloc_node_track_caller_noprof+0x2f8/0x4e0
 krealloc_noprof+0x124/0x340
 copy_array+0x63/0xf0
 copy_verifier_state+0xaf/0xf10
 push_stack+0x19d/0x390
 check_cond_jmp_op+0x1469/0x2910
 do_check+0x6751/0xe520
 do_check_common+0x1949/0x24f0
 bpf_check+0x1746a/0x1d2d0
 bpf_prog_load+0x1318/0x1930
page last free pid 9212 tgid 9211 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 __slab_free+0x303/0x3c0
 qlist_free_all+0x97/0x140
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 kmem_cache_alloc_node_noprof+0x1bb/0x3c0
 __alloc_skb+0x112/0x2d0
 netlink_ack+0x146/0xa50
 netlink_rcv_skb+0x28c/0x470
 netlink_unicast+0x82f/0x9e0
 netlink_sendmsg+0x805/0xb30
 __sock_sendmsg+0x21c/0x270
 ____sys_sendmsg+0x505/0x830
 ___sys_sendmsg+0x21f/0x2a0
 __x64_sys_sendmsg+0x19b/0x260
 do_syscall_64+0xfa/0x3b0

Memory state around the buggy address:
 ffff8881181e8800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881181e8880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881181e8900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                     ^
 ffff8881181e8980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881181e8a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
