KASAN: invalid-free in f_uac2_opts_p_srate_store

Status: upstream: reported C repro on 2026/08/13 09:55
Reported-by: syzbot+1d3a0ce016764453da97@syzkaller.appspotmail.com
First crash: 9d17h, last: 4d10h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: invalid-free in f_uac2_opts_p_srate_store usb prio:normal 24 syz, C error 131 2h53m 24d 0/29 upstream: reported C repro on 2026/07/30 00:09
android-6-12 KASAN: invalid-free in f_uac2_opts_p_srate_store 24 syz, C 6 4d13h 26d 0/1 premoderation: reported C repro on 2026/07/28 00:18
android-6-1 KASAN: invalid-free in f_uac2_opts_p_srate_store origin:upstream 24 syz, C 9 1d12h 21d 0/2 upstream: reported C repro on 2026/08/01 22:27

Sample crash report:
==================================================================
BUG: KASAN: invalid-free in slab_free mm/slub.c:3687 [inline]
BUG: KASAN: invalid-free in __kmem_cache_free+0xbc/0x21c mm/slub.c:3700
Free of addr ffff0000c3f9b712 by task syz.0.17/4513

CPU: 0 PID: 4513 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/2026
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 print_address_description+0x88/0x218 mm/kasan/report.c:316
 print_report+0x50/0x68 mm/kasan/report.c:420
 kasan_report_invalid_free+0x98/0xe4 mm/kasan/report.c:489
 ____kasan_slab_free+0x168/0x1b0 mm/kasan/common.c:-1
 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:245
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 __kmem_cache_free+0xbc/0x21c mm/slub.c:3700
 kfree+0xd0/0x1a8 mm/slab_common.c:988
 f_uac2_opts_p_srate_store+0xe4/0x27c drivers/usb/gadget/function/f_uac2.c:2078
 flush_write_buffer fs/configfs/file.c:207 [inline]
 configfs_write_iter+0x260/0x338 fs/configfs/file.c:229
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x3c8/0x7c8 fs/read_write.c:584
 ksys_write+0x12c/0x228 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:646
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Allocated by task 4513:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:936 [inline]
 __kmalloc_node_track_caller+0xcc/0x174 mm/slab_common.c:956
 kstrdup+0x68/0xb0 mm/util.c:61
 f_uac2_opts_p_srate_store+0x168/0x27c drivers/usb/gadget/function/f_uac2.c:2078
 flush_write_buffer fs/configfs/file.c:207 [inline]
 configfs_write_iter+0x260/0x338 fs/configfs/file.c:229
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x3c8/0x7c8 fs/read_write.c:584
 ksys_write+0x12c/0x228 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:646
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Last potentially related work creation:
 kasan_save_stack+0x40/0x70 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486
 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
 kvfree_call_rcu+0xb4/0x6f0 kernel/rcu/tree.c:3405
 kernfs_unlink_open_file+0x370/0x41c fs/kernfs/file.c:653
 kernfs_fop_release+0x128/0x194 fs/kernfs/file.c:825
 __fput+0x1b4/0x7b0 fs/file_table.c:320
 ____fput+0x20/0x30 fs/file_table.c:348
 task_work_run+0x1f4/0x280 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151
 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
 exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
 el0_svc+0x98/0x128 arch/arm64/kernel/entry-common.c:638
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

The buggy address belongs to the object at ffff0000c3f9b700
 which belongs to the cache kmalloc-128 of size 128
The buggy address is located 18 bytes inside of
 128-byte region [ffff0000c3f9b700, ffff0000c3f9b780)

The buggy address belongs to the physical page:
page:000000008c185d88 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f9b
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 fffffc000339f700 dead000000000003 ffff0000c0002300
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000c3f9b600: 00 01 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff0000c3f9b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000c3f9b700: 00 00 00 00 00 07 fc fc fc fc fc fc fc fc fc fc
                         ^
 ffff0000c3f9b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff0000c3f9b800: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/13 13:40 linux-6.1.y e4f7d8be268e 359b2492 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: invalid-free in f_uac2_opts_p_srate_store
2026/08/13 12:43 linux-6.1.y e4f7d8be268e 359b2492 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: invalid-free in f_uac2_opts_p_srate_store
2026/08/13 11:46 linux-6.1.y e4f7d8be268e 359b2492 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: invalid-free in f_uac2_opts_p_srate_store
2026/08/13 10:48 linux-6.1.y e4f7d8be268e 359b2492 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: invalid-free in f_uac2_opts_p_srate_store
2026/08/18 16:39 linux-6.1.y e4f7d8be268e 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: invalid-free in f_uac2_opts_p_srate_store
2026/08/13 09:54 linux-6.1.y e4f7d8be268e 359b2492 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: invalid-free in f_uac2_opts_p_srate_store
* Struck through repros no longer work on HEAD.