program:
r0 = openat$kvm(0xffffffffffffff9c, &(0x7f0000000140), 0x101100, 0x0)
r1 = ioctl$KVM_CREATE_VM(r0, 0xae01, 0x0)
r2 = ioctl$KVM_CREATE_VCPU(r1, 0xae41, 0x2)
ioctl$KVM_GET_ONE_REG(r2, 0x4010aeab, &(0x7f0000000040)=@riscv64_timer={0x8030000004000000, 0x0})
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./myconfig\x00', 0x1ff)
r3 = openat(0xffffffffffffff9c, &(0x7f00000000e0)='./sec/tomoyo/profile\x00', 0x1, 0x0)
write(r3, &(0x7f0000000040)="3c2d5c3ecd45036a2762bb626c65640a", 0x10)
write$binfmt_register(r3, &(0x7f0000000000)={0x3a, 'syz2', 0x3a, 'M', 0x3a, 0x1, 0x3a, 'configfs\x00', 0x3a, 'configfs\x00', 0x3a, './myconfig/usb_gadget/g1/configs/c.1', 0x3a, [0x4f, 0x43, 0x43]}, 0x59)
mount(0x0, &(0x7f0000000280)='./myconfig\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
accept$inet6(0xffffffffffffffff, 0x0, 0x0)
r4 = io_uring_setup(0x21c5, &(0x7f0000000040)={0x0, 0xe007, 0x2, 0x3, 0x87})
io_uring_register$IORING_REGISTER_EVENTFD(r4, 0x4, 0x0, 0x7ffffffe)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./myconfig/usb_gadget/g1\x00', 0x1ff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000440)='./myconfig/usb_gadget/g1/configs/c.1\x00', 0x1ff)
r5 = openat$iommufd(0xffffffffffffff9c, &(0x7f0000000480), 0x2, 0x0)
ioctl(r5, 0x3b8e, &(0x7f0000000580)="10")
socket$inet6_tcp(0xa, 0x1, 0x0)
socket(0x10, 0x3, 0x0)
socket$vsock_stream(0x28, 0x1, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000050)='./sys\x00', 0x1ed)
mount(0x0, &(0x7f0000000060)='./sys\x00', &(0x7f0000000070)='sysfs\x00', 0x0, 0x0)
openat(0xffffffffffffff9c, &(0x7f0000000000)='./sys/bus/platform/devices/pcspkr/driver_override\x00', 0x1, 0x0)
openat(0xffffffffffffff9c, &(0x7f0000000200)='./sys/bus/platform/drivers/usbip-vudc/bind\x00', 0x1, 0x0)
pselect6(0x40, &(0x7f00000001c0)={0x0, 0x0, 0x3, 0xfffffffffffffffd}, 0x0, &(0x7f00000002c0)={0x3ff, 0xfffffffffffffffe, 0x0, 0x9, 0x0, 0x0, 0x7fffffff}, 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000480)='./myconfig/usb_gadget/g1/functions/uac2.usb0\x00', 0x1ff)
r6 = openat(0xffffffffffffff9c, &(0x7f00000004c0)='./myconfig/usb_gadget/g1/functions/uac2.usb0/p_srate\x00', 0x1, 0x0)
write(r6, &(0x7f00000006c0)="34342ccb81862c39", 0x8)
symlinkat(&(0x7f00000005c0)='./myconfig/usb_gadget/g1/functions/uac2.usb0\x00', 0xffffffffffffff9c, &(0x7f0000000600)='./myconfig/usb_gadget/g1/configs/c.1/uac2.usb0\x00')
r7 = openat(0xffffffffffffff9c, &(0x7f0000000640)='./myconfig/usb_gadget/g1/UDC\x00', 0x1, 0x0)
write(r7, &(0x7f0000000680)='usbip-vudc.0', 0xc)
[ 92.625151][ T803] cfg80211: failed to load regulatory.db
[ 92.689571][ T5273] Bluetooth: hci0: command tx timeout
[ 92.812132][ T5317] ==================================================================
[ 92.814945][ T5317] BUG: KASAN: invalid-free in f_uac2_opts_p_srate_store+0x225/0x2b0
[ 92.817713][ T5317] Free of addr ffff888012bdf2c7 by task syz.0.0/5317
[ 92.819963][ T5317]
[ 92.820794][ T5317] CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
[ 92.820805][ T5317] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 92.820810][ T5317] Call Trace:
[ 92.820816][ T5317]
[ 92.820821][ T5317] dump_stack_lvl+0xe8/0x150
[ 92.820840][ T5317] print_address_description+0x55/0x1e0
[ 92.820856][ T5317] print_report+0x58/0x70
[ 92.820865][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 92.820873][ T5317] kasan_report_invalid_free+0xea/0x110
[ 92.820883][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 92.820890][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 92.820898][ T5317] __kasan_slab_pre_free+0x104/0x120
[ 92.820906][ T5317] kfree+0x173/0x640
[ 92.820912][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 92.820920][ T5317] f_uac2_opts_p_srate_store+0x225/0x2b0
[ 92.820929][ T5317] ? __pfx_f_uac2_opts_p_srate_store+0x10/0x10
[ 92.820943][ T5317] ? down_read+0x2be/0x330
[ 92.820952][ T5317] ? __pfx_f_uac2_opts_p_srate_store+0x10/0x10
[ 92.820959][ T5317] configfs_write_iter+0x337/0x430
[ 92.820968][ T5317] vfs_write+0x612/0xba0
[ 92.820981][ T5317] ? __pfx_vfs_write+0x10/0x10
[ 92.820992][ T5317] ? __fget_files+0x2a/0x420
[ 92.821004][ T5317] ksys_write+0x150/0x270
[ 92.821011][ T5317] ? __pfx_ksys_write+0x10/0x10
[ 92.821024][ T5317] do_syscall_64+0x166/0x520
[ 92.821032][ T5317] ? trace_irq_disable+0x3b/0x140
[ 92.821042][ T5317] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 92.821049][ T5317] ? clear_bhb_loop+0x70/0xc0
[ 92.821055][ T5317] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 92.821062][ T5317] RIP: 0033:0x7f668b79e0d9
[ 92.821070][ T5317] 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
[ 92.821076][ T5317] RSP: 002b:00007f6687bd3fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 92.821085][ T5317] RAX: ffffffffffffffda RBX: 00007f668ba26090 RCX: 00007f668b79e0d9
[ 92.821090][ T5317] RDX: 0000000000000008 RSI: 00002000000006c0 RDI: 000000000000000e
[ 92.821095][ T5317] RBP: 00007f668b835024 R08: 0000000000000000 R09: 0000000000000000
[ 92.821100][ T5317] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 92.821104][ T5317] R13: 00007f668ba26128 R14: 00007f668ba26090 R15: 00007ffe0a5c4648
[ 92.821112][ T5317]
[ 92.821114][ T5317]
[ 92.915822][ T5317] Allocated by task 5317:
[ 92.917592][ T5317] kasan_save_track+0x3e/0x80
[ 92.919655][ T5317] __kasan_kmalloc+0x93/0xb0
[ 92.921767][ T5317] __kmalloc_node_track_caller_noprof+0x4c7/0x740
[ 92.924566][ T5317] kstrdup+0x42/0x100
[ 92.926299][ T5317] f_uac2_opts_p_srate_store+0x11f/0x2b0
[ 92.928737][ T5317] configfs_write_iter+0x337/0x430
[ 92.930963][ T5317] vfs_write+0x612/0xba0
[ 92.932864][ T5317] ksys_write+0x150/0x270
[ 92.934769][ T5317] do_syscall_64+0x166/0x520
[ 92.936768][ T5317] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 92.939339][ T5317]
[ 92.940417][ T5317] The buggy address belongs to the object at ffff888012bdf2c0
[ 92.940417][ T5317] which belongs to the cache kmalloc-16 of size 16
[ 92.946229][ T5317] The buggy address is located 7 bytes inside of
[ 92.946229][ T5317] 9-byte region [ffff888012bdf2c0, ffff888012bdf2c9)
[ 92.951765][ T5317]
[ 92.952849][ T5317] The buggy address belongs to the physical page:
[ 92.955640][ T5317] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888012bdf900 pfn:0x12bdf
[ 92.959927][ T5317] flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
[ 92.963113][ T5317] page_type: f5(slab)
[ 92.964701][ T5317] raw: 00fff00000000200 ffff88801b041640 ffff88801b040408 ffff88801b040408
[ 92.968252][ T5317] raw: ffff888012bdf900 0000000800800048 00000000f5000000 0000000000000000
[ 92.971868][ T5317] page dumped because: kasan: bad access detected
[ 92.975108][ T5317] page_owner tracks the page as allocated
[ 92.978179][ T5317] page last allocated via order 0, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5272, tgid 5272 (syz-executor), ts 90870893015
[ 92.986292][ T5317] post_alloc_hook+0x1f9/0x250
[ 92.988442][ T5317] get_page_from_freelist+0x2209/0x2280
[ 92.990864][ T5317] __alloc_frozen_pages_noprof+0x217/0x5a0
[ 92.993419][ T5317] allocate_slab+0x7c/0x5e0
[ 92.995383][ T5317] ___slab_alloc+0x16a/0x950
[ 92.997397][ T5317] __kmalloc_cache_node_noprof+0x1d7/0x630
[ 93.000080][ T5317] hugetlb_cgroup_css_alloc+0x175/0xb20
[ 93.002901][ T5317] cgroup_apply_control_enable+0x5bb/0xda0
[ 93.005548][ T5317] cgroup_mkdir+0xd2c/0xf90
[ 93.007569][ T5317] kernfs_iop_mkdir+0x213/0x360
[ 93.009753][ T5317] vfs_mkdir+0x40c/0x620
[ 93.011641][ T5317] filename_mkdirat+0x285/0x510
[ 93.013809][ T5317] __se_sys_mkdirat+0x35/0x150
[ 93.015954][ T5317] do_syscall_64+0x166/0x520
[ 93.018069][ T5317] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 93.020686][ T5317] page last free pid 5293 tgid 5293 ts 90836411834 stack trace:
[ 93.023640][ T5317] __free_frozen_pages+0xc93/0xd90
[ 93.025825][ T5317] __slab_free+0x274/0x2c0
[ 93.027815][ T5317] qlist_free_all+0x99/0x100
[ 93.029874][ T5317] kasan_quarantine_reduce+0x148/0x160
[ 93.032255][ T5317] __kasan_slab_alloc+0x22/0x80
[ 93.034380][ T5317] kmem_cache_alloc_node_noprof+0x359/0x620
[ 93.036912][ T5317] __alloc_skb+0x1db/0x7a0
[ 93.038891][ T5317] mld_newpack+0x165/0xcb0
[ 93.040781][ T5317] add_grec+0x119f/0x19d0
[ 93.042711][ T5317] mld_ifc_work+0x6f1/0xd60
[ 93.044778][ T5317] process_scheduled_works+0xc3d/0x1630
[ 93.047161][ T5317] worker_thread+0xa47/0xfb0
[ 93.049170][ T5317] kthread+0x38b/0x480
[ 93.051052][ T5317] ret_from_fork+0x514/0xb70
[ 93.053138][ T5317] ret_from_fork_asm+0x1a/0x30
[ 93.054846][ T5317]
[ 93.055743][ T5317] Memory state around the buggy address:
[ 93.057792][ T5317] ffff888012bdf180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[ 93.060531][ T5317] ffff888012bdf200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[ 93.063283][ T5317] >ffff888012bdf280: fc fc fc fc fc fc fc fc 00 01 fc fc 00 00 fc fc
[ 93.065967][ T5317] ^
[ 93.068061][ T5317] ffff888012bdf300: 00 00 fc fc fa fb fc fc 00 00 fc fc 00 00 fc fc
[ 93.070790][ T5317] ffff888012bdf380: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc
[ 93.073517][ T5317] ==================================================================
[ 93.120451][ T5317] Kernel panic - not syncing: KASAN: panic_on_warn set ...
[ 93.123096][ T5317] CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
[ 93.126254][ T5317] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 93.129762][ T5317] Call Trace:
[ 93.130977][ T5317]
[ 93.132043][ T5317] vpanic+0x56d/0xa60
[ 93.133444][ T5317] ? __pfx_vpanic+0x10/0x10
[ 93.135043][ T5317] ? __pfx___schedule+0x10/0x10
[ 93.136931][ T5317] panic+0xc5/0xd0
[ 93.138587][ T5317] ? __pfx_panic+0x10/0x10
[ 93.140566][ T5317] ? preempt_schedule_common+0x7f/0xd0
[ 93.142992][ T5317] check_panic_on_warn+0x89/0xb0
[ 93.145173][ T5317] end_report+0x73/0x170
[ 93.146993][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 93.149485][ T5317] kasan_report_invalid_free+0xfa/0x110
[ 93.151929][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 93.154503][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 93.157000][ T5317] __kasan_slab_pre_free+0x104/0x120
[ 93.159282][ T5317] kfree+0x173/0x640
[ 93.160984][ T5317] ? f_uac2_opts_p_srate_store+0x225/0x2b0
[ 93.163563][ T5317] f_uac2_opts_p_srate_store+0x225/0x2b0
[ 93.166008][ T5317] ? __pfx_f_uac2_opts_p_srate_store+0x10/0x10
[ 93.168682][ T5317] ? down_read+0x2be/0x330
[ 93.170596][ T5317] ? __pfx_f_uac2_opts_p_srate_store+0x10/0x10
[ 93.173263][ T5317] configfs_write_iter+0x337/0x430
[ 93.175474][ T5317] vfs_write+0x612/0xba0
[ 93.177368][ T5317] ? __pfx_vfs_write+0x10/0x10
[ 93.179509][ T5317] ? __fget_files+0x2a/0x420
[ 93.181494][ T5317] ksys_write+0x150/0x270
[ 93.183382][ T5317] ? __pfx_ksys_write+0x10/0x10
[ 93.185570][ T5317] do_syscall_64+0x166/0x520
[ 93.187650][ T5317] ? trace_irq_disable+0x3b/0x140
[ 93.189932][ T5317] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 93.192695][ T5317] ? clear_bhb_loop+0x70/0xc0
[ 93.194813][ T5317] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 93.197489][ T5317] RIP: 0033:0x7f668b79e0d9
[ 93.199470][ T5317] 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
[ 93.207821][ T5317] RSP: 002b:00007f6687bd3fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 93.211274][ T5317] RAX: ffffffffffffffda RBX: 00007f668ba26090 RCX: 00007f668b79e0d9
[ 93.214841][ T5317] RDX: 0000000000000008 RSI: 00002000000006c0 RDI: 000000000000000e
[ 93.218312][ T5317] RBP: 00007f668b835024 R08: 0000000000000000 R09: 0000000000000000
[ 93.221587][ T5317] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 93.224931][ T5317] R13: 00007f668ba26128 R14: 00007f668ba26090 R15: 00007ffe0a5c4648
[ 93.228399][ T5317]
[ 93.230160][ T5317] Kernel Offset: disabled
[ 93.232024][ T5317] Rebooting in 86400 seconds..