From: syzbot <syzbot+eaa106d192c9daf37f95@syzkaller.appspotmail.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [usb?] memory leak in try_get_usb_function_instance
Date: Thu, 30 Jul 2026 05:26:21 -0700 [thread overview]
Message-ID: <6a6b42ed.86abc875.e5c3d.006a.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: 3dab139d4795 Merge tag 'rust-fixes-7.2-2' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=163a388e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=ba7c2d1679fb08a2
dashboard link: https://syzkaller.appspot.com/bug?extid=eaa106d192c9daf37f95
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=111c11b9580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12b5909e580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8c49d395f8d0/disk-3dab139d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/deff2ace5e6a/vmlinux-3dab139d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2c90a783f940/bzImage-3dab139d.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+eaa106d192c9daf37f95@syzkaller.appspotmail.com
2026/07/26 12:12:48 executed programs: 5
BUG: memory leak
unreferenced object 0xffff888112a69c00 (size 512):
comm "syz.0.19", pid 5954, jiffies 4294946869
hex dump (first 32 bytes):
08 9c a6 12 81 88 ff ff 65 70 2e 30 00 00 00 00 ........ep.0....
00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ................
backtrace (crc 56e62c00):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4597 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
__kmalloc_cache_noprof+0x356/0x440 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
f_midi2_ep_opts_create drivers/usb/gadget/function/f_midi2.c:2504 [inline]
f_midi2_alloc_inst+0xa0/0x250 drivers/usb/gadget/function/f_midi2.c:2666
try_get_usb_function_instance+0xb8/0x100 drivers/usb/gadget/functions.c:28
usb_get_function_instance+0x16/0x70 drivers/usb/gadget/functions.c:44
function_make+0xf5/0x240 drivers/usb/gadget/configfs.c:626
configfs_mkdir+0x2e9/0x6f0 fs/configfs/dir.c:1360
vfs_mkdir+0x16c/0x3a0 fs/namei.c:5276
filename_mkdirat+0x27c/0x300 fs/namei.c:5309
__do_sys_mkdirat fs/namei.c:5330 [inline]
__se_sys_mkdirat fs/namei.c:5327 [inline]
__x64_sys_mkdirat+0x39/0x60 fs/namei.c:5327
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf8/0x610 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
BUG: memory leak
unreferenced object 0xffff8881105a3f00 (size 256):
comm "syz.0.19", pid 5954, jiffies 4294946869
hex dump (first 32 bytes):
08 3f 5a 10 81 88 ff ff 62 6c 6f 63 6b 2e 30 00 .?Z.....block.0.
00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ................
backtrace (crc f7f284e3):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4597 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
__kmalloc_cache_noprof+0x356/0x440 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
f_midi2_block_opts_create+0x82/0x120 drivers/usb/gadget/function/f_midi2.c:2342
f_midi2_alloc_inst+0xe9/0x250 drivers/usb/gadget/function/f_midi2.c:2673
try_get_usb_function_instance+0xb8/0x100 drivers/usb/gadget/functions.c:28
usb_get_function_instance+0x16/0x70 drivers/usb/gadget/functions.c:44
function_make+0xf5/0x240 drivers/usb/gadget/configfs.c:626
configfs_mkdir+0x2e9/0x6f0 fs/configfs/dir.c:1360
vfs_mkdir+0x16c/0x3a0 fs/namei.c:5276
filename_mkdirat+0x27c/0x300 fs/namei.c:5309
__do_sys_mkdirat fs/namei.c:5330 [inline]
__se_sys_mkdirat fs/namei.c:5327 [inline]
__x64_sys_mkdirat+0x39/0x60 fs/namei.c:5327
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf8/0x610 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
connection error: failed to recv *flatrpc.ExecutorMessageRawT: EOF
---
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 syzkaller@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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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
reply other threads:[~2026-07-30 12:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a6b42ed.86abc875.e5c3d.006a.GAE@google.com \
--to=syzbot+eaa106d192c9daf37f95@syzkaller.appspotmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox