Hello,
syzbot found the following issue on:
HEAD commit: dc5c83b7f5f8 Linux 6.1.178
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1540dca9580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=872c04466179833f
dashboard link:
https://syzkaller.appspot.com/bug?extid=e024d7c98824bafa72eb
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/96393e4697a3/disk-dc5c83b7.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/0d4afce44fab/vmlinux-dc5c83b7.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/4787e310d875/Image-dc5c83b7.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+e024d7...@syzkaller.appspotmail.com
configfs-gadget.g1 gadget.0: uvc: uvc_function_bind()
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 ffff0000f4007cf0 by task syz.0.648/6098
CPU: 1 PID: 6098 Comm: syz.0.648 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/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 4328:
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]
kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
sctp_inet6addr_event+0x2f8/0x610 net/sctp/ipv6.c:86
notifier_call_chain kernel/notifier.c:87 [inline]
atomic_notifier_call_chain+0x178/0x2a4 kernel/notifier.c:225
inet6addr_notifier_call_chain+0x30/0x40 net/ipv6/addrconf_core.c:109
ipv6_add_addr+0xa90/0xd74 net/ipv6/addrconf.c:1181
addrconf_add_linklocal+0x23c/0x60c net/ipv6/addrconf.c:3264
addrconf_addr_gen+0x3ec/0x500 net/ipv6/addrconf.c:3395
addrconf_init_auto_addrs+0x5a8/0x91c net/ipv6/addrconf.c:-1
addrconf_notify+0x8cc/0xc98 net/ipv6/addrconf.c:3692
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xd8/0x168 kernel/notifier.c:455
call_netdevice_notifiers_info net/core/dev.c:2014 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2052 [inline]
call_netdevice_notifiers net/core/dev.c:2066 [inline]
__dev_notify_flags+0x260/0x490 net/core/dev.c:8715
dev_change_flags+0xd0/0x15c net/core/dev.c:8753
do_setlink+0x9d0/0x2158 net/core/rtnetlink.c:2845
__rtnl_newlink net/core/rtnetlink.c:3622 [inline]
rtnl_newlink+0x142c/0x1af0 net/core/rtnetlink.c:3669
rtnetlink_rcv_msg+0x694/0xcc4 net/core/rtnetlink.c:6166
netlink_rcv_skb+0x220/0x3ec net/netlink/af_netlink.c:2516
rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6184
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x5fc/0x80c net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f0/0x9d8 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
__sys_sendto+0x324/0x440 net/socket.c:2153
__do_sys_sendto net/socket.c:2165 [inline]
__se_sys_sendto net/socket.c:2161 [inline]
__arm64_sys_sendto+0xe4/0x104 net/socket.c:2161
__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 ffff0000f4007c00
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 112 bytes to the right of
128-byte region [ffff0000f4007c00, ffff0000f4007c80)
The buggy address belongs to the physical page:
page:00000000e7d56655 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x134007
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 dead000000000100 dead000000000122 ffff0000c0002300
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000f4007b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000f4007c00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff0000f4007c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff0000f4007d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000f4007d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
------------[ cut here ]------------
WARNING: CPU: 0 PID: 6098 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: 6098 Comm: syz.0.648 Tainted: G B syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/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 : ffff8000219374d0
x29: ffff8000219374d0 x28: ffff0000f5f424a0 x27: 1fffe0001ebe8494
x26: ffff0000f5f57150 x25: dfff800000000000 x24: 0000000000000003
x23: dfff800000000000 x22: ffff80001537d160 x21: ffff800013110c00
x20: ffff0000cff0c068 x19: ffff0000f4007cf0 x18: 1fffe00033e7277e
x17: ffff80001537d000 x16: ffff800011b90540 x15: 0000000040000000
x14: 0000000000000001 x13: 1ffff00002ff016c x12: 0000000000080000
x11: 000000000002da07 x10: ffff80002239b000 x9 : ffff80000dcedfc0
x8 : 000000000002da08 x7 : ffff800011cec160 x6 : ffff80000825ab4c
x5 : 0000000000000000 x4 : 0000000000000001 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: 1033
hardirqs last enabled at (1033): [<ffff80000825abe0>] raw_spin_rq_unlock_irq kernel/sched/sched.h:1374 [inline]
hardirqs last enabled at (1033): [<ffff80000825abe0>] finish_lock_switch+0xb0/0x1c8 kernel/sched/core.c:5005
hardirqs last disabled at (1032): [<ffff800011c635b8>] __schedule+0x294/0x1a6c kernel/sched/core.c:6461
softirqs last enabled at (716): [<ffff800008031254>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (714): [<ffff800008031220>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ 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