==================================================================
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x40/0x60
Read of size 1 at addr ffff88810f516020 by task syz.4.2512/12522

CPU: 1 UID: 0 PID: 12522 Comm: syz.4.2512 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_irqsave+0x40/0x60
 __mutex_lock+0x3c6/0x1550
 ep_open+0x4e/0x270
 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:0x7f807339e199
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:00007f807428a028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f8073626090 RCX: 00007f807339e199
RDX: 0000000000000002 RSI: 0000200000000600 RDI: ffffffffffffff9c
RBP: 00007f80734350b8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8073626128 R14: 00007f8073626090 R15: 00007ffc05d36888
 </TASK>

Allocated by task 12521:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x33e/0x630
 gadgetfs_bind+0x288/0xb50
 gadget_bind_driver+0x2ca/0x9e0
 really_probe+0x254/0xae0
 __driver_probe_device+0x1e8/0x360
 driver_probe_device+0x4f/0x240
 __driver_attach+0x339/0x600
 bus_for_each_dev+0x23b/0x2c0
 bus_add_driver+0x38c/0x740
 driver_register+0x23a/0x320
 usb_gadget_register_driver_owner+0xf9/0x270
 dev_config+0xc3f/0x1030
 vfs_write+0x296/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 12521:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x204/0x6e0
 destroy_ep_files+0x29f/0x330
 gadgetfs_unbind+0x109/0x2b0
 gadget_unbind_driver+0x1cb/0x410
 device_release_driver_internal+0x48b/0x880
 driver_detach+0x1f3/0x2d0
 bus_remove_driver+0x226/0x320
 usb_gadget_unregister_driver+0x4e/0x70
 dev_release+0x83/0x200
 __fput+0x418/0xa50
 task_work_run+0x1d9/0x270
 exit_to_user_mode_loop+0x204/0x770
 do_syscall_64+0x328/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88810f516000
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 32 bytes inside of
 freed 512-byte region [ffff88810f516000, ffff88810f516200)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88810f514000 pfn:0x10f514
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88810f514211
flags: 0x17ff00000000240(workingset|head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000240 ffff888100041c80 ffffea0004474a10 ffffea00047dbe10
raw: ffff88810f514000 000000010010000f 00000000f5000000 ffff88810f514211
head: 017ff00000000240 ffff888100041c80 ffffea0004474a10 ffffea00047dbe10
head: ffff88810f514000 000000010010000f 00000000f5000000 ffff88810f514211
head: 017ff00000000002 ffffffffffffff01 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5980, tgid 5980 (syz-executor), ts 104055155803
 post_alloc_hook+0x22e/0x270
 get_page_from_freelist+0x220f/0x2280
 __alloc_frozen_pages_noprof+0x1fc/0x400
 alloc_slab_page+0x44/0x1d0
 allocate_slab+0x71/0x530
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_cache_noprof+0x3bc/0x630
 kernfs_fop_open+0x3cc/0xef0
 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
page last free pid 12 tgid 12 ts 102609023027 stack trace:
 __free_frozen_pages+0xca3/0xda0
 stack_depot_save_flags+0x427/0x870
 ref_tracker_free+0x12d/0x830
 neigh_destroy+0x37f/0x5f0
 neigh_remove_one+0x44c/0x4a0
 ___neigh_create+0x47f/0x23c0
 ip6_finish_output2+0xe0f/0x1460
 ip6_output+0x337/0x540
 ndisc_send_skb+0xcb2/0x1650
 ndisc_send_ns+0xd7/0x160
 addrconf_dad_work+0xa8d/0x15c0
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff88810f515f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88810f515f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810f516000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff88810f516080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810f516100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
