==================================================================
BUG: KASAN: slab-out-of-bounds in xfrm_alloc_spi+0x51c/0xf30
Read of size 8 at addr ffff888108131fa8 by task syz.5.10792/32640

CPU: 1 UID: 0 PID: 32640 Comm: syz.5.10792 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:
 <TASK>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 xfrm_alloc_spi+0x51c/0xf30
 xfrm_alloc_userspi+0x70b/0xc90
 xfrm_user_rcv_msg+0x7a3/0xab0
 netlink_rcv_skb+0x208/0x470
 xfrm_netlink_rcv+0x79/0x90
 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
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3b9a78eba9
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:00007f3b9b5a3038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f3b9a9d5fa0 RCX: 00007f3b9a78eba9
RDX: 0000000000000000 RSI: 0000200000000280 RDI: 0000000000000005
RBP: 00007f3b9a811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3b9a9d6038 R14: 00007f3b9a9d5fa0 R15: 00007fff92da7e28
 </TASK>

Allocated by task 14046:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_noprof+0x27a/0x4f0
 fib6_info_alloc+0x30/0xf0
 ip6_route_info_create+0x142/0x860
 addrconf_f6i_alloc+0x1d2/0x450
 ipv6_add_addr+0x56e/0x1090
 addrconf_add_linklocal+0x28c/0x6c0
 addrconf_addr_gen+0x490/0x580
 addrconf_init_auto_addrs+0x62d/0xa30
 addrconf_notify+0xacc/0x1010
 notifier_call_chain+0x1b6/0x3e0
 netif_state_change+0x284/0x3a0
 linkwatch_do_dev+0x117/0x170
 __linkwatch_run_queue+0x56a/0x7e0
 linkwatch_event+0x4c/0x60
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff888108131c00
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 632 bytes to the right of
 allocated 304-byte region [ffff888108131c00, ffff888108131d30)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888108133c00 pfn:0x108130
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000240(workingset|head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000240 ffff88801a441c80 ffffea00041d7610 ffffea0004202c10
raw: ffff888108133c00 000000000010000f 00000000f5000000 0000000000000000
head: 057ff00000000240 ffff88801a441c80 ffffea00041d7610 ffffea0004202c10
head: ffff888108133c00 000000000010000f 00000000f5000000 0000000000000000
head: 057ff00000000002 ffffea0004204c01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x352800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 31809, tgid 31809 (syz-executor), ts 1015335516843, free_ts 1015322732431
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 allocate_slab+0x65/0x370
 ___slab_alloc+0xbeb/0x1420
 __kmalloc_node_noprof+0x2fd/0x4e0
 allocate_slab+0x16a/0x370
 ___slab_alloc+0xbeb/0x1420
 kmem_cache_alloc_noprof+0x283/0x3c0
 fib_table_insert+0x4a7/0x1b50
 fib_magic+0x2c4/0x390
 fib_add_ifaddr+0x38d/0x5f0
 fib_netdev_event+0x382/0x490
 notifier_call_chain+0x1b6/0x3e0
 __dev_notify_flags+0x18d/0x2e0
 netif_change_flags+0xe8/0x1a0
page last free pid 31809 tgid 31809 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 stack_depot_save_flags+0x436/0x860
 kasan_save_track+0x4f/0x80
 __kasan_slab_alloc+0x6c/0x80
 kmem_cache_alloc_node_noprof+0x1bb/0x3c0
 __alloc_skb+0x112/0x2d0
 __netdev_alloc_skb+0x108/0x970
 ieee80211_beacon_get_ap+0x5ad/0x1f30
 __ieee80211_beacon_get+0x118e/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

Memory state around the buggy address:
 ffff888108131e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888108131f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888108131f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                  ^
 ffff888108132000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888108132080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
