==================================================================
BUG: KASAN: slab-use-after-free in string+0x216/0x2d0
Read of size 1 at addr ffff88810c0b9500 by task syz.0.1751/10072

CPU: 1 UID: 0 PID: 10072 Comm: syz.0.1751 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
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
 string+0x216/0x2d0
 vsnprintf+0x74a/0xef0
 snprintf+0xe8/0x140
 dev_vprintk_emit+0x30f/0x400
 dev_printk_emit+0xee/0x140
 _dev_err+0x11e/0x180
 raw_process_ep0_io+0x580/0x9f0
 raw_ioctl+0x254f/0x41c0
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbd3f19dd6b
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007fbd3ff87f50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbd3f19dd6b
RDX: 00007fbd3ff87fd0 RSI: 0000000040085503 RDI: 0000000000000003
RBP: 00007fbd3ff87fd0 R08: 0000000000000002 R09: 000000000000000c
R10: 0000000000000003 R11: 0000000000000246 R12: 00007fbd3ff87fd8
R13: 0000000000000000 R14: 00007fbd3f425fa0 R15: 00007ffce45ef388
 </TASK>

Allocated by task 1:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_node_track_caller_noprof+0x4c3/0x730
 kvasprintf+0xeb/0x1a0
 kobject_set_name_vargs+0x61/0x110
 dev_set_name+0xe2/0x140
 usb_add_gadget+0x475/0x700
 usb_add_gadget_udc_release+0x19c/0x1f0
 dummy_udc_probe+0x6b1/0x7b0
 platform_probe+0xf9/0x190
 really_probe+0x254/0xae0
 __driver_probe_device+0x1e8/0x360
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x270/0x410
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c4/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7d7/0xb80
 platform_device_add+0x4bd/0x860
 dummy_hcd_init+0x966/0xd00
 do_one_initcall+0x250/0x870
 do_initcall_level+0x10a/0x1a0
 do_initcalls+0x59/0xa0
 kernel_init_freeable+0x29d/0x3e0
 kernel_init+0x1d/0x1d0
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 10101:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x640
 kobject_put+0x267/0x550
 device_release_driver_internal+0x48b/0x880
 unbind_store+0x1a1/0x1d0
 kernfs_fop_write_iter+0x3a4/0x540
 vfs_write+0x612/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88810c0b9500
 which belongs to the cache kmalloc-16 of size 16
The buggy address is located 0 bytes inside of
 freed 16-byte region [ffff88810c0b9500, ffff88810c0b9510)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c0b9
flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000000 ffff888100041640 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800800080 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 8612008413
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2205/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7c/0x5e0
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2bf/0x6b0
 __kmalloc_node_track_caller_noprof+0x557/0x730
 kstrdup+0x42/0x100
 __kernfs_new_node+0xa9/0x980
 kernfs_new_node+0xea/0x140
 kernfs_create_link+0xa7/0x200
 sysfs_do_create_link_sd+0x83/0x110
 device_add_class_symlinks+0x1cf/0x240
 device_add+0x467/0xb80
 device_create+0x269/0x300
 mon_bin_add+0xb6/0x130
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810c0b9400: 00 04 fc fc 00 04 fc fc 00 04 fc fc 00 04 fc fc
 ffff88810c0b9480: 00 00 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
>ffff88810c0b9500: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc
                   ^
 ffff88810c0b9580: fa fb fc fc 00 04 fc fc 00 04 fc fc 00 00 fc fc
 ffff88810c0b9600: 00 04 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc
==================================================================
