==================================================================
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irq+0x3d/0x50
Read of size 1 at addr ffff8881bc21d018 by task syz.2.695/7580

CPU: 0 UID: 0 PID: 7580 Comm: syz.2.695 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+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 __kasan_check_byte+0x2a/0x40
 lock_acquire+0x7d/0x350
 _raw_spin_lock_irq+0x3d/0x50
 gadget_dev_open+0x4b/0x1b0
 do_dentry_open+0x816/0x1380
 vfs_open+0x3b/0x340
 path_openat+0x1443/0x1d60
 do_file_open+0x23e/0x4a0
 do_sys_openat2+0x115/0x200
 __x64_sys_openat+0x138/0x170
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa64d19fb19
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa64e077028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fa64d425fa0 RCX: 00007fa64d19fb19
RDX: 0000000000000802 RSI: 00002000000000c0 RDI: ffffffffffffff9c
RBP: 00007fa64d237b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa64d426038 R14: 00007fa64d425fa0 R15: 00007ffdcc1aeb28
 </TASK>

Allocated by task 1109:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_noprof+0x36b/0x720
 ieee802_11_parse_elems_full+0x14b/0x2de0
 ieee80211_ibss_rx_queued_mgmt+0x509/0x2c40
 ieee80211_iface_work+0x78a/0x1010
 cfg80211_wiphy_work+0x29e/0x420
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 1109:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x650
 ieee80211_ibss_rx_queued_mgmt+0x1ea1/0x2c40
 ieee80211_iface_work+0x78a/0x1010
 cfg80211_wiphy_work+0x29e/0x420
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff8881bc21d000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 24 bytes inside of
 freed 1024-byte region [ffff8881bc21d000, ffff8881bc21d400)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1bc218
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff888100041dc0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff888100041dc0 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5340, tgid 5340 (dhcpcd), ts 26151388831
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2209/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_node_noprof+0x54d/0x720
 qdisc_alloc+0x92/0x9d0
 qdisc_create_dflt+0x8e/0x4e0
 dev_activate+0x37a/0x1150
 __dev_open+0x699/0x850
 __dev_change_flags+0x329/0x820
 netif_change_flags+0x7c/0x1b0
 dev_change_flags+0x128/0x260
 devinet_ioctl+0x966/0x1c50
 inet_ioctl+0x42a/0x560
page last free pid 5052 tgid 5052 ts 23907487893 stack trace:
 __free_frozen_pages+0xc93/0xd90
 __slab_free+0x274/0x2c0
 qlist_free_all+0x99/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_noprof+0x307/0x720
 tomoyo_realpath_from_path+0xef/0x640
 tomoyo_path_number_perm+0x246/0x5f0
 security_path_chown+0x139/0x340
 chown_common+0x3c0/0x630
 do_fchownat+0x14c/0x250
 __x64_sys_chown+0x82/0xa0
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881bc21cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881bc21cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881bc21d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff8881bc21d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881bc21d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
