================================================================== BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:631 Read of size 1 at addr ffff888113eac03c by task syz.9.1197/4524 CPU: 1 PID: 4524 Comm: syz.9.1197 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348 kobject_get+0x113/0x120 lib/kobject.c:631 get_device drivers/base/core.c:3794 [inline] device_add+0x2f0/0xec0 drivers/base/core.c:3618 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 Allocated by task 3932: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x72/0x80 mm/kasan/common.c:334 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768 slab_alloc_node mm/slub.c:3382 [inline] slab_alloc mm/slub.c:3392 [inline] __kmem_cache_alloc_lru mm/slub.c:3399 [inline] kmem_cache_alloc+0x166/0x320 mm/slub.c:3408 mt_alloc_one lib/maple_tree.c:157 [inline] mas_alloc_nodes+0x2d8/0x850 lib/maple_tree.c:1284 mas_node_count_gfp lib/maple_tree.c:1366 [inline] mas_preallocate+0xe3d/0x1430 lib/maple_tree.c:5664 __mmap_region mm/mmap.c:2874 [inline] mmap_region+0x109b/0x2130 mm/mmap.c:3030 do_mmap+0x858/0xdd0 mm/mmap.c:1491 vm_mmap_pgoff+0x206/0x3f0 mm/util.c:525 ksys_mmap_pgoff+0xf6/0x1d0 mm/mmap.c:1537 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x8fd/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 3932: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:250 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1750 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776 slab_free mm/slub.c:3712 [inline] kmem_cache_free+0x12d/0x300 mm/slub.c:3737 mt_free_one lib/maple_tree.c:167 [inline] mas_destroy+0x30e9/0x3a90 lib/maple_tree.c:5722 mas_store_prealloc+0x241/0x3c0 lib/maple_tree.c:5601 __mmap_region mm/mmap.c:2942 [inline] mmap_region+0x1564/0x2130 mm/mmap.c:3030 do_mmap+0x858/0xdd0 mm/mmap.c:1491 vm_mmap_pgoff+0x206/0x3f0 mm/util.c:525 ksys_mmap_pgoff+0xf6/0x1d0 mm/mmap.c:1537 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x8fd/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888113eac000 which belongs to the cache maple_node of size 256 The buggy address is located 60 bytes inside of 256-byte region [ffff888113eac000, ffff888113eac100) The buggy address belongs to the physical page: page:ffffea00044fab00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113eac head:ffffea00044fab00 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 dead000000000122 ffff88810004d080 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3759, tgid 3759 (syz-executor), ts 127147559972, free_ts 122704144316 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672 prep_new_page+0x1c/0x110 mm/page_alloc.c:2679 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1967 [inline] new_slab+0x98/0x3e0 mm/slub.c:2020 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177 kmem_cache_alloc_bulk+0x165/0x3c0 mm/slub.c:3884 mt_alloc_bulk lib/maple_tree.c:162 [inline] mas_dup_alloc lib/maple_tree.c:6639 [inline] mas_dup_build+0xa7c/0x17f0 lib/maple_tree.c:6703 __mt_dup+0x154/0x240 lib/maple_tree.c:6767 dup_mmap kernel/fork.c:690 [inline] dup_mm kernel/fork.c:1670 [inline] copy_mm+0x769/0x1ad0 kernel/fork.c:1722 copy_process+0x12d8/0x3500 kernel/fork.c:2485 kernel_clone+0x22f/0x7f0 kernel/fork.c:2900 __do_sys_clone kernel/fork.c:3043 [inline] __se_sys_clone kernel/fork.c:3027 [inline] __x64_sys_clone+0x193/0x200 kernel/fork.c:3027 x64_sys_call+0x990/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1580 [inline] free_pcp_prepare mm/page_alloc.c:1654 [inline] free_unref_page_prepare+0x80c/0x820 mm/page_alloc.c:3621 free_unref_page+0x93/0x530 mm/page_alloc.c:3719 free_the_page mm/page_alloc.c:863 [inline] __free_pages+0x67/0x100 mm/page_alloc.c:6020 __vunmap+0xa3c/0xc00 mm/vmalloc.c:2739 __vfree mm/vmalloc.c:2788 [inline] vfree+0x61/0x90 mm/vmalloc.c:2819 htable_put+0x5fb/0x650 net/netfilter/xt_hashlimit.c:432 hashlimit_mt_destroy+0x5c/0x70 net/netfilter/xt_hashlimit.c:977 cleanup_match net/ipv6/netfilter/ip6_tables.c:479 [inline] cleanup_entry+0x165/0x370 net/ipv6/netfilter/ip6_tables.c:663 translate_table+0x1e17/0x2030 net/ipv6/netfilter/ip6_tables.c:746 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0x9e9/0xe00 net/ipv6/netfilter/ip6_tables.c:1646 nf_setsockopt+0x284/0x2b0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x170/0x1a0 net/ipv6/ipv6_sockglue.c:1030 tcp_setsockopt+0xeb/0x100 net/ipv4/tcp.c:3860 sock_common_setsockopt+0xb1/0xc0 net/core/sock.c:3707 __sys_setsockopt+0x2ff/0x4e0 net/socket.c:2277 __do_sys_setsockopt net/socket.c:2288 [inline] __se_sys_setsockopt net/socket.c:2285 [inline] __x64_sys_setsockopt+0xbf/0xd0 net/socket.c:2285 Memory state around the buggy address: ffff888113eabf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888113eabf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888113eac000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888113eac080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888113eac100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ kobject: '' (ffff888113eac000): is not initialized, yet kobject_get() is being called. WARNING: CPU: 1 PID: 4524 at lib/kobject.c:634 kobject_get+0x7c/0x120 lib/kobject.c:632 Modules linked in: CPU: 1 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:kobject_get+0x7c/0x120 lib/kobject.c:632 Code: 83 fc 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 a6 79 c9 fc 48 8b 33 48 c7 c7 60 02 0b 86 48 89 da e8 84 7d 54 fc <0f> 0b eb 0c e8 db ee 83 fc eb 4c e8 d4 ee 83 fc 4c 8d 73 38 4c 89 RSP: 0018:ffffc90000d27a38 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: ffff888113eac000 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d27a50 R08: ffffc90000d27627 R09: 1ffff920001a4ec4 R10: dffffc0000000000 R11: fffff520001a4ec5 R12: 1ffff11023509b0e R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa8d7b1eff8 CR3: 000000011f03f000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 000000000000000f DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: get_device drivers/base/core.c:3794 [inline] device_add+0x2f0/0xec0 drivers/base/core.c:3618 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 1 PID: 4524 at lib/refcount.c:25 refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Modules linked in: CPU: 1 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Code: 05 01 48 c7 c7 40 0d ca 85 e8 d8 28 d9 fe 0f 0b eb df e8 2f 9a 08 ff c6 05 0f ca 26 05 01 48 c7 c7 80 0c ca 85 e8 bc 28 d9 fe <0f> 0b eb c3 e8 13 9a 08 ff c6 05 f4 c9 26 05 01 48 c7 c7 e0 0c ca RSP: 0018:ffffc90000d27a18 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: 0000000000000002 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d27a28 R08: ffffc90000d27727 R09: 1ffff920001a4ee4 R10: dffffc0000000000 R11: fffff520001a4ee5 R12: 1ffff11023509b0e R13: dffffc0000000000 R14: 0000000000000002 R15: 0000000000000000 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa8d7b1eff8 CR3: 000000011f03f000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 000000000000000f DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] kref_get include/linux/kref.h:45 [inline] kobject_get+0xfb/0x120 lib/kobject.c:635 get_device drivers/base/core.c:3794 [inline] device_add+0x2f0/0xec0 drivers/base/core.c:3618 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ kobject: '' (ffff888113eac000): is not initialized, yet kobject_get() is being called. WARNING: CPU: 1 PID: 4524 at lib/kobject.c:634 kobject_get lib/kobject.c:632 [inline] WARNING: CPU: 1 PID: 4524 at lib/kobject.c:634 kobject_add_internal+0x110/0xc20 lib/kobject.c:216 Modules linked in: CPU: 1 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:kobject_get lib/kobject.c:632 [inline] RIP: 0010:kobject_add_internal+0x110/0xc20 lib/kobject.c:216 Code: 75 d0 4c 89 f0 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 f7 e8 42 62 c9 fc 49 8b 36 48 c7 c7 60 02 0b 86 4c 89 f2 e8 20 66 54 fc <0f> 0b e9 f8 00 00 00 e8 74 d7 83 fc b8 fe ff ff ff e9 31 08 00 00 RSP: 0018:ffffc90000d278f8 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: ffff88811a84d800 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d27950 R08: ffffc90000d27607 R09: 1ffff920001a4ec0 R10: dffffc0000000000 R11: fffff520001a4ec1 R12: dffffc0000000000 R13: ffff88811a84d818 R14: ffff888113eac000 R15: 1ffff11023509b00 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa8d7b1eff8 CR3: 000000011f03f000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 000000000000000f DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x165/0x230 lib/kobject.c:418 device_add+0x398/0xec0 drivers/base/core.c:3633 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ refcount_t: saturated; leaking memory. WARNING: CPU: 0 PID: 4524 at lib/refcount.c:22 refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Modules linked in: CPU: 0 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Code: 05 01 48 c7 c7 20 0c ca 85 e8 84 28 d9 fe 0f 0b eb 8b e8 db 99 08 ff c6 05 ba c9 26 05 01 48 c7 c7 20 0c ca 85 e8 68 28 d9 fe <0f> 0b e9 6c ff ff ff e8 bc 99 08 ff c6 05 9f c9 26 05 01 48 c7 c7 RSP: 0018:ffffc90000d278d8 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d278e8 R08: ffffc90000d274c7 R09: 1ffff920001a4e98 R10: dffffc0000000000 R11: fffff520001a4e99 R12: dffffc0000000000 R13: ffff88811a84d818 R14: 0000000000000001 R15: 00000000c0000000 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f47993ed2f8 CR3: 000000011f03f000 CR4: 00000000003506b0 Call Trace: __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] kref_get include/linux/kref.h:45 [inline] kobject_get lib/kobject.c:635 [inline] kobject_add_internal+0xa81/0xc20 lib/kobject.c:216 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x165/0x230 lib/kobject.c:418 device_add+0x398/0xec0 drivers/base/core.c:3633 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ kobject: '' (ffff888113eac000): is not initialized, yet kobject_put() is being called. WARNING: CPU: 0 PID: 4524 at lib/kobject.c:728 kobject_put+0x8a/0x280 lib/kobject.c:726 Modules linked in: CPU: 0 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:kobject_put+0x8a/0x280 lib/kobject.c:726 Code: 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 68 78 c9 fc 48 8b 33 48 c7 c7 e0 02 0b 86 48 89 da e8 46 7c 54 fc <0f> 0b eb 0f e8 9d ed 83 fc e9 8f 01 00 00 e8 93 ed 83 fc 4c 8d 7b RSP: 0018:ffffc90000d278c0 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: ffff888113eac000 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d278e8 R08: ffffc90000d275c7 R09: 1ffff920001a4eb8 R10: dffffc0000000000 R11: fffff520001a4eb9 R12: dffffc0000000000 R13: ffff888113eac03c R14: 1ffff110227d5807 R15: 0000000000000000 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f47993ed2f8 CR3: 000000011f03f000 CR4: 00000000003506b0 Call Trace: kobject_add_internal+0x9a2/0xc20 lib/kobject.c:234 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x165/0x230 lib/kobject.c:418 device_add+0x398/0xec0 drivers/base/core.c:3633 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 4524 at lib/refcount.c:28 refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28 Modules linked in: CPU: 0 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28 Code: 05 01 48 c7 c7 80 0c ca 85 e8 bc 28 d9 fe 0f 0b eb c3 e8 13 9a 08 ff c6 05 f4 c9 26 05 01 48 c7 c7 e0 0c ca 85 e8 a0 28 d9 fe <0f> 0b eb a7 e8 f7 99 08 ff c6 05 d5 c9 26 05 01 48 c7 c7 20 0c ca RSP: 0018:ffffc90000d278a0 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: 0000000000000003 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d278b0 R08: ffff8881f6f2759b R09: 1ffff1103ede4eb3 R10: dffffc0000000000 R11: ffffed103ede4eb4 R12: 00000000c0000000 R13: ffff888113eac03c R14: 0000000000000003 R15: ffff888113eac038 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f47993ed2f8 CR3: 000000011f03f000 CR4: 00000000003506b0 Call Trace: __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] kref_put include/linux/kref.h:64 [inline] kobject_put+0x244/0x280 lib/kobject.c:729 kobject_add_internal+0x9a2/0xc20 lib/kobject.c:234 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x165/0x230 lib/kobject.c:418 device_add+0x398/0xec0 drivers/base/core.c:3633 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]--- kobject_add_internal failed for f_midi (error: -2 parent: ) ------------[ cut here ]------------ kobject: '' (ffff888113eac000): is not initialized, yet kobject_put() is being called. WARNING: CPU: 0 PID: 4524 at lib/kobject.c:728 kobject_put+0x8a/0x280 lib/kobject.c:726 Modules linked in: CPU: 0 PID: 4524 Comm: syz.9.1197 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 RIP: 0010:kobject_put+0x8a/0x280 lib/kobject.c:726 Code: 48 b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 68 78 c9 fc 48 8b 33 48 c7 c7 e0 02 0b 86 48 89 da e8 46 7c 54 fc <0f> 0b eb 0f e8 9d ed 83 fc e9 8f 01 00 00 e8 93 ed 83 fc 4c 8d 7b RSP: 0018:ffffc90000d27a28 EFLAGS: 00010246 RAX: 05da1ee0014ef100 RBX: ffff888113eac000 RCX: 0000000000080000 RDX: ffffc9000365a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000d27a50 R08: ffffc90000d27607 R09: 1ffff920001a4ec0 R10: dffffc0000000000 R11: fffff520001a4ec1 R12: ffff88811a84d868 R13: ffff888113eac03c R14: 1ffff110227d5807 R15: 0000000000000000 FS: 00007f0deae3f6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f47993ed2f8 CR3: 000000011f03f000 CR4: 00000000003506b0 Call Trace: put_device drivers/base/core.c:3806 [inline] device_add+0x9a1/0xec0 drivers/base/core.c:3751 device_create_groups_vargs drivers/base/core.c:4392 [inline] device_create+0x26c/0x300 drivers/base/core.c:4434 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36 create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44 function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652 configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329 vfs_mkdir+0x39c/0x580 fs/namei.c:4113 do_mkdirat+0x174/0x4d0 fs/namei.c:4138 __do_sys_mkdir fs/namei.c:4158 [inline] __se_sys_mkdir fs/namei.c:4156 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4156 x64_sys_call+0x966/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:84 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0de9f9de99 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:00007f0deae3f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0dea226090 RCX: 00007f0de9f9de99 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000200000000800 RBP: 00007f0dea033eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0dea226128 R14: 00007f0dea226090 R15: 00007fff4b977938 ---[ end trace 0000000000000000 ]---