Hello,
syzbot found the following issue on:
HEAD commit: e4f7d8be268e Linux 6.1.182
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=17bed6c6580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=872c04466179833f
dashboard link:
https://syzkaller.appspot.com/bug?extid=07886e96db1f4cfc196d
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/7cd9b1875376/disk-e4f7d8be.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/4b5d35d18c31/vmlinux-e4f7d8be.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/d5ee64c2af77/Image-e4f7d8be.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+07886e...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-out-of-bounds in gether_get_ifname+0xf0/0x110 drivers/usb/gadget/function/u_ether.c:1046
Read of size 1 at addr ffff0000d6104e02 by task syz.0.70/4604
CPU: 1 PID: 4604 Comm: syz.0.70 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_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348
gether_get_ifname+0xf0/0x110 drivers/usb/gadget/function/u_ether.c:1046
f_phonet_ifname_show+0x4c/0x60 drivers/usb/gadget/function/f_phonet.c:603
fill_read_buffer fs/configfs/file.c:68 [inline]
configfs_read_iter+0x210/0x4a8 fs/configfs/file.c:88
call_read_iter include/linux/fs.h:2259 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x3cc/0x7b8 fs/read_write.c:470
ksys_read+0x12c/0x228 fs/read_write.c:613
__do_sys_read fs/read_write.c:623 [inline]
__se_sys_read fs/read_write.c:621 [inline]
__arm64_sys_read+0x7c/0x90 fs/read_write.c:621
__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 4604:
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+0xdc/0x184 mm/slab_common.c:943
kmalloc_node include/linux/slab.h:589 [inline]
kvmalloc_node+0x88/0x1d4 mm/util.c:581
kvmalloc include/linux/slab.h:716 [inline]
kvzalloc include/linux/slab.h:724 [inline]
alloc_netdev_mqs+0x94/0xc44 net/core/dev.c:10770
gphonet_setup_default drivers/usb/gadget/function/f_phonet.c:706 [inline]
phonet_alloc_inst+0xa4/0x170 drivers/usb/gadget/function/f_phonet.c:640
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xe8/0x2dc drivers/usb/gadget/functions.c:44
function_make+0x108/0x2f8 drivers/usb/gadget/configfs.c:615
configfs_mkdir+0x3e0/0x884 fs/configfs/dir.c:1360
vfs_mkdir+0x314/0x4d8 fs/namei.c:4114
do_mkdirat+0x1b8/0x3ec fs/namei.c:4139
__do_sys_mkdirat fs/namei.c:4154 [inline]
__se_sys_mkdirat fs/namei.c:4152 [inline]
__arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4152
__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 ffff0000d6104000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 3586 bytes inside of
4096-byte region [ffff0000d6104000, ffff0000d6105000)
The buggy address belongs to the physical page:
page:00000000ec97c1ea refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116100
head:00000000ec97c1ea order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff0000f475d701
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 dead000000000001 ffff0000c0003500
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff0000f475d701
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000d6104d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000d6104d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000d6104e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff0000d6104e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000d6104f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup