configfs-gadget.g1 gadget.0: uvc: Unable to allocate streaming EP ================================================================== BUG: KASAN: slab-out-of-bounds in list_empty include/linux/list.h:292 [inline] BUG: KASAN: slab-out-of-bounds in dummy_free_request+0x44/0x84 drivers/usb/gadget/udc/dummy_hcd.c:690 Read of size 8 at addr ffff0000f515e5f0 by task syz.2.172/5274 CPU: 1 PID: 5274 Comm: syz.2.172 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+0xa8/0xfc mm/kasan/report.c:524 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 list_empty include/linux/list.h:292 [inline] dummy_free_request+0x44/0x84 drivers/usb/gadget/udc/dummy_hcd.c:690 usb_ep_free_request+0x138/0x34c drivers/usb/gadget/udc/core.c:221 uvc_function_bind+0x8b0/0xfe8 drivers/usb/gadget/function/f_uvc.c:789 usb_add_function+0x234/0x7a8 drivers/usb/gadget/composite.c:337 configfs_composite_bind+0x7e0/0xce4 drivers/usb/gadget/configfs.c:1409 gadget_bind_driver+0x26c/0x684 drivers/usb/gadget/udc/core.c:1651 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x3a0/0xac4 drivers/base/dd.c:638 __driver_probe_device+0x1c8/0x368 drivers/base/dd.c:804 driver_probe_device+0x78/0x324 drivers/base/dd.c:834 __driver_attach+0x3bc/0x614 drivers/base/dd.c:1220 bus_for_each_dev+0x148/0x1d0 drivers/base/bus.c:303 driver_attach+0x50/0x60 drivers/base/dd.c:1237 bus_add_driver+0x2c0/0x518 drivers/base/bus.c:620 driver_register+0x200/0x37c drivers/base/driver.c:246 usb_gadget_register_driver_owner+0xf0/0x25c drivers/usb/gadget/udc/core.c:1730 gadget_dev_desc_UDC_store+0x168/0x268 drivers/usb/gadget/configfs.c:290 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 3940: 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+0xd8/0x180 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] tomoyo_encode2 security/tomoyo/realpath.c:45 [inline] tomoyo_encode+0x260/0x484 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x4b4/0x508 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x19c/0x35c security/tomoyo/file.c:771 tomoyo_file_open+0x128/0x198 security/tomoyo/tomoyo.c:320 security_file_open+0x6c/0xac security/security.c:1682 do_dentry_open+0x294/0xf8c fs/open.c:869 vfs_open+0x7c/0x90 fs/open.c:1015 do_open fs/namei.c:3634 [inline] path_openat+0x1fc0/0x27a0 fs/namei.c:3791 do_filp_open+0x198/0x38c fs/namei.c:3818 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __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 Freed by task 3940: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:53 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237 __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 tomoyo_check_open_permission+0x274/0x35c security/tomoyo/file.c:786 tomoyo_file_open+0x128/0x198 security/tomoyo/tomoyo.c:320 security_file_open+0x6c/0xac security/security.c:1682 do_dentry_open+0x294/0xf8c fs/open.c:869 vfs_open+0x7c/0x90 fs/open.c:1015 do_open fs/namei.c:3634 [inline] path_openat+0x1fc0/0x27a0 fs/namei.c:3791 do_filp_open+0x198/0x38c fs/namei.c:3818 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __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 The buggy address belongs to the object at ffff0000f515e500 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 112 bytes to the right of 128-byte region [ffff0000f515e500, ffff0000f515e580) The buggy address belongs to the physical page: page:000000007d9e88ef refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13515e flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 0000000000000000 dead000000000001 ffff0000c0002300 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f515e480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000f515e500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000f515e580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000f515e600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000f515e680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5274 at drivers/usb/gadget/udc/dummy_hcd.c:690 dummy_free_request+0x7c/0x84 drivers/usb/gadget/udc/dummy_hcd.c:690 Modules linked in: CPU: 0 PID: 5274 Comm: syz.2.172 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/2026 pstate: 82400005 (Nzcv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : dummy_free_request+0x7c/0x84 drivers/usb/gadget/udc/dummy_hcd.c:690 lr : dummy_free_request+0x7c/0x84 drivers/usb/gadget/udc/dummy_hcd.c:690 sp : ffff800021a974d0 x29: ffff800021a974d0 x28: ffff0000f3eb94a0 x27: 1fffe0001e7d7294 x26: ffff0000f4e48150 x25: dfff800000000000 x24: 0000000000000003 x23: dfff800000000000 x22: ffff80001537d160 x21: ffff800013110c00 x20: ffff0000d22c0068 x19: ffff0000f515e5f0 x18: 1fffe00033e7277e x17: 0000000000000000 x16: ffff800011b90080 x15: 0000000000000002 x14: 0000000000000001 x13: 1ffff00002ff016c x12: 0000000000080000 x11: 0000000000034729 x10: ffff800027279000 x9 : ffff80000dcedb00 x8 : 000000000003472a x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff800021a96eb8 x4 : ffff800015464e80 x3 : ffff800008195a38 x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: dummy_free_request+0x7c/0x84 drivers/usb/gadget/udc/dummy_hcd.c:690 usb_ep_free_request+0x138/0x34c drivers/usb/gadget/udc/core.c:221 uvc_function_bind+0x8b0/0xfe8 drivers/usb/gadget/function/f_uvc.c:789 usb_add_function+0x234/0x7a8 drivers/usb/gadget/composite.c:337 configfs_composite_bind+0x7e0/0xce4 drivers/usb/gadget/configfs.c:1409 gadget_bind_driver+0x26c/0x684 drivers/usb/gadget/udc/core.c:1651 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x3a0/0xac4 drivers/base/dd.c:638 __driver_probe_device+0x1c8/0x368 drivers/base/dd.c:804 driver_probe_device+0x78/0x324 drivers/base/dd.c:834 __driver_attach+0x3bc/0x614 drivers/base/dd.c:1220 bus_for_each_dev+0x148/0x1d0 drivers/base/bus.c:303 driver_attach+0x50/0x60 drivers/base/dd.c:1237 bus_add_driver+0x2c0/0x518 drivers/base/bus.c:620 driver_register+0x200/0x37c drivers/base/driver.c:246 usb_gadget_register_driver_owner+0xf0/0x25c drivers/usb/gadget/udc/core.c:1730 gadget_dev_desc_UDC_store+0x168/0x268 drivers/usb/gadget/configfs.c:290 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 irq event stamp: 1659 hardirqs last enabled at (1659): [] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:84 [inline] hardirqs last enabled at (1659): [] exit_to_kernel_mode+0xcc/0xfc arch/arm64/kernel/entry-common.c:94 hardirqs last disabled at (1658): [] __el1_irq arch/arm64/kernel/entry-common.c:468 [inline] hardirqs last disabled at (1658): [] el1_interrupt+0x24/0x54 arch/arm64/kernel/entry-common.c:486 softirqs last enabled at (1308): [] softirq_handle_end kernel/softirq.c:439 [inline] softirqs last enabled at (1308): [] handle_softirqs+0xb1c/0xc90 kernel/softirq.c:624 softirqs last disabled at (1301): [] __do_softirq+0x14/0x20 kernel/softirq.c:630 ---[ end trace 0000000000000000 ]--- udc dummy_udc.0: failed to start g1: -22 configfs-gadget.g1: probe of gadget.0 failed with error -22 UDC core: g1: couldn't find an available UDC or it's busy