BUG: KASAN: invalid-free in f_uac2_opts_p_srate_store+0x224/0x2b0 drivers/usb/gadget/function/f_uac2.c:2087 Free of addr ffff88810b69b681 by task syz-executor267/312 CPU: 0 UID: 0 PID: 312 Comm: syz-executor267 Not tainted syzkaller #0 053bc84e93bdef9c6c9615cbace6655003d8d143 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:94 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120 print_address_description+0x71/0x210 mm/kasan/report.c:377 print_report+0x4a/0x70 mm/kasan/report.c:481 kasan_report_invalid_free+0x11e/0x160 mm/kasan/report.c:556 check_slab_allocation+0xdf/0xf0 include/linux/page-flags.h:-1 __kasan_slab_pre_free+0x36/0x50 mm/kasan/common.c:257 kasan_slab_pre_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:2390 [inline] slab_free mm/slub.c:4714 [inline] kfree+0xf8/0x440 mm/slub.c:4875 f_uac2_opts_p_srate_store+0x224/0x2b0 drivers/usb/gadget/function/f_uac2.c:2087 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x32c/0x490 fs/configfs/file.c:229 do_iter_readv_writev+0x629/0x820 fs/read_write.c:-1 vfs_writev+0x4a5/0xe90 fs/read_write.c:1076 do_pwritev fs/read_write.c:1177 [inline] __do_sys_pwritev fs/read_write.c:1224 [inline] __se_sys_pwritev fs/read_write.c:1219 [inline] __x64_sys_pwritev+0x19f/0x2c0 fs/read_write.c:1219 x64_sys_call+0x29bc/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:297 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fe17fedccf9 Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe9a201cc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000128 RAX: ffffffffffffffda RBX: d7ceab0f2931992c RCX: 00007fe17fedccf9 RDX: 0000000000000001 RSI: 0000200000000040 RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000006 R09: 00007ffe9a201df8 R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffe9a201de8 R13: 0000000000000002 R14: 00007fe17ff6dca0 R15: 0000000000000002 Allocated by task 312: kasan_save_stack mm/kasan/common.c:49 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:70 kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396 kasan_kmalloc include/linux/kasan.h:261 [inline] __do_kmalloc_node mm/slub.c:4395 [inline] __kmalloc_node_track_caller_noprof+0x24e/0x4f0 mm/slub.c:4414 kstrdup+0x4d/0x130 mm/util.c:70 f_uac2_opts_p_srate_store+0x11e/0x2b0 drivers/usb/gadget/function/f_uac2.c:2087 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x32c/0x490 fs/configfs/file.c:229 do_iter_readv_writev+0x629/0x820 fs/read_write.c:-1 vfs_writev+0x4a5/0xe90 fs/read_write.c:1076 do_pwritev fs/read_write.c:1177 [inline] __do_sys_pwritev fs/read_write.c:1224 [inline] __se_sys_pwritev fs/read_write.c:1219 [inline] __x64_sys_pwritev+0x19f/0x2c0 fs/read_write.c:1219 x64_sys_call+0x29bc/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:297 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff88810b69b680 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 1 bytes inside of 10-byte region [ffff88810b69b680, ffff88810b69b68a) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b69b anon flags: 0x4000000000000000(zone=1) page_type: f5(slab) raw: 4000000000000000 ffff888100041640 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080800080 00000001f5000000 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 13, tgid 13 (kworker/u8:1), ts 2583057062, free_ts 0 create_dummy_stack mm/page_owner.c:93 [inline] register_dummy_stack+0x99/0x110 mm/page_owner.c:99 init_page_owner+0x36/0x840 mm/page_owner.c:117 invoke_init_callbacks mm/page_ext.c:152 [inline] page_ext_init+0x3f8/0x44b mm/page_ext.c:501 mm_core_init+0x4b/0x7b mm/mm_init.c:2670 page_owner free stack trace missing Memory state around the buggy address: ffff88810b69b580: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc ffff88810b69b600: fa fb fc fc fa fb fc fc 00 01 fc fc fa fb fc fc >ffff88810b69b680: 00 02 fc fc fa fb fc fc fa fb fc fc fa fb fc fc ^ ffff88810b69b700: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc