configfs-gadget gadget: uvc: uvc_function_bind() configfs-gadget gadget: uvc: Unable to allocate streaming EP ================================================================== BUG: KASAN: slab-out-of-bounds in list_empty include/linux/list.h:290 [inline] BUG: KASAN: slab-out-of-bounds in dummy_free_request+0x3b/0x70 drivers/usb/gadget/udc/dummy_hcd.c:687 Read of size 8 at addr ffff888025deaef0 by task syz.3.829/7789 CPU: 1 PID: 7789 Comm: syz.3.829 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 list_empty include/linux/list.h:290 [inline] dummy_free_request+0x3b/0x70 drivers/usb/gadget/udc/dummy_hcd.c:687 uvc_function_bind+0xe24/0x12d0 drivers/usb/gadget/function/f_uvc.c:785 usb_add_function+0x2d9/0x980 drivers/usb/gadget/composite.c:324 configfs_composite_bind+0xa02/0xf60 drivers/usb/gadget/configfs.c:1417 udc_bind_to_driver+0x203/0x5f0 drivers/usb/gadget/udc/core.c:1574 usb_gadget_probe_driver+0x1fb/0x380 drivers/usb/gadget/udc/core.c:1637 gadget_dev_desc_UDC_store+0x1ba/0x2e0 drivers/usb/gadget/configfs.c:289 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x30b/0x400 fs/configfs/file.c:229 call_write_iter include/linux/fs.h:2173 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fde5bd6e0d9 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 RSP: 002b:00007fde59fc6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fde5bff5fa0 RCX: 00007fde5bd6e0d9 RDX: 000000000000000b RSI: 0000200000000380 RDI: 0000000000000005 RBP: 00007fde5be05024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fde5bff6038 R14: 00007fde5bff5fa0 R15: 00007fffc3eb5c98 Allocated by task 7032: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] tipc_service_create net/tipc/name_table.c:264 [inline] tipc_nametbl_insert_publ+0x437/0x1380 net/tipc/name_table.c:492 tipc_nametbl_publish+0xb9/0x1e0 net/tipc/name_table.c:778 tipc_sk_publish+0x1c8/0x420 net/tipc/socket.c:2921 __tipc_bind net/tipc/socket.c:702 [inline] tipc_sk_bind+0x1ea/0x2f0 net/tipc/socket.c:710 tipc_topsrv_create_listener net/tipc/topsrv.c:537 [inline] tipc_topsrv_start net/tipc/topsrv.c:678 [inline] tipc_topsrv_init_net+0x540/0x7f0 net/tipc/topsrv.c:722 ops_init+0x360/0x5f0 net/core/net_namespace.c:138 setup_net+0x39e/0xa10 net/core/net_namespace.c:333 copy_net_ns+0x33e/0x5b0 net/core/net_namespace.c:503 create_new_namespaces+0x3ce/0x700 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x116/0x160 kernel/nsproxy.c:226 ksys_unshare+0x4f6/0x8e0 kernel/fork.c:3177 __do_sys_unshare kernel/fork.c:3254 [inline] __se_sys_unshare kernel/fork.c:3252 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3252 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888025deae00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 112 bytes to the right of 128-byte region [ffff888025deae00, ffff888025deae80) The buggy address belongs to the page: page:ffffea0000977a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25dea flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 0000000800000001 ffff888016c418c0 raw: 0000000000000000 0000000000100010 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4356, ts 131485804001, free_ts 131053758077 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc_trace+0xf9/0x290 mm/slub.c:3250 kmalloc include/linux/slab.h:607 [inline] kernfs_get_open_node fs/kernfs/file.c:552 [inline] kernfs_fop_open+0x887/0xba0 fs/kernfs/file.c:698 do_dentry_open+0x7f7/0xf90 fs/open.c:826 do_open fs/namei.c:3616 [inline] path_openat+0x2718/0x2fb0 fs/namei.c:3750 do_filp_open+0x1df/0x400 fs/namei.c:3777 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 put_page include/linux/mm.h:1258 [inline] af_alg_free_areq_sgls crypto/af_alg.c:660 [inline] af_alg_free_resources+0x3cd/0x650 crypto/af_alg.c:1000 _skcipher_recvmsg crypto/algif_skcipher.c:131 [inline] skcipher_recvmsg+0x7aa/0x9d0 crypto/algif_skcipher.c:144 ____sys_recvmsg+0x2ca/0x5b0 net/socket.c:-1 ___sys_recvmsg+0x213/0x5c0 net/socket.c:2707 __sys_recvmsg net/socket.c:2737 [inline] __do_sys_recvmsg net/socket.c:2747 [inline] __se_sys_recvmsg net/socket.c:2744 [inline] __x64_sys_recvmsg+0x201/0x2d0 net/socket.c:2744 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888025dead80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888025deae00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888025deae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888025deaf00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888025deaf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================