================================================================== BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:663 Read of size 1 at addr ffff888119d9e03c by task syz.6.748/3261 CPU: 0 PID: 3261 Comm: syz.6.748 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x100/0x140 mm/kasan/report.c:452 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 kobject_get+0x113/0x120 lib/kobject.c:663 get_device drivers/base/core.c:3361 [inline] device_add+0x331/0xc00 drivers/base/core.c:3191 device_create_groups_vargs drivers/base/core.c:3960 [inline] device_create+0x26c/0x300 drivers/base/core.c:4002 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44 function_make+0x118/0x350 drivers/usb/gadget/configfs.c:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc9f15db159 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:00007fc9f0013028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc9f1863090 RCX: 00007fc9f15db159 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fc9f167203b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9f1863128 R14: 00007fc9f1863090 R15: 00007fff6da15a28 Allocated by task 1993: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc mm/kasan/common.c:509 [inline] __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x179/0x2e0 mm/slub.c:2979 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:667 [inline] device_create_groups_vargs drivers/base/core.c:3942 [inline] device_create+0x13a/0x300 drivers/base/core.c:4002 android_device_create drivers/usb/gadget/configfs.c:1789 [inline] gadgets_make+0x816/0xa70 drivers/usb/gadget/configfs.c:1886 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 3026: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kfree+0xc0/0x270 mm/slub.c:4196 skb_free_head net/core/skbuff.c:606 [inline] skb_release_data+0x53b/0x690 net/core/skbuff.c:626 skb_release_all net/core/skbuff.c:680 [inline] __kfree_skb net/core/skbuff.c:694 [inline] consume_skb+0xab/0x1f0 net/core/skbuff.c:851 netlink_broadcast_filtered+0x1247/0x12c0 net/netlink/af_netlink.c:1543 netlink_broadcast+0x3a/0x50 net/netlink/af_netlink.c:1557 nlmsg_multicast include/net/netlink.h:1033 [inline] xfrm_nlmsg_multicast net/xfrm/xfrm_user.c:1142 [inline] xfrm_send_acquire+0x662/0x1170 net/xfrm/xfrm_user.c:3102 km_query+0x6c/0xd0 net/xfrm/xfrm_state.c:2220 xfrm_state_find+0x1ee9/0x28a0 net/xfrm/xfrm_state.c:1141 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2392 [inline] xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2437 [inline] xfrm_resolve_and_create_bundle+0x6b7/0x2a20 net/xfrm/xfrm_policy.c:2730 xfrm_lookup_with_ifid+0x7fa/0x1a10 net/xfrm/xfrm_policy.c:3064 xfrm_lookup net/xfrm/xfrm_policy.c:3188 [inline] xfrm_lookup_route+0x3c/0x170 net/xfrm/xfrm_policy.c:3199 ip6_dst_lookup_flow+0x9b/0xc0 net/ipv6/ip6_output.c:1228 rawv6_sendmsg+0xbef/0x16c0 net/ipv6/raw.c:901 inet_sendmsg+0xa5/0xc0 net/ipv4/af_inet.c:830 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2377 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2431 __sys_sendmmsg+0x2ab/0x4c0 net/socket.c:2517 __do_sys_sendmmsg net/socket.c:2546 [inline] __se_sys_sendmmsg net/socket.c:2543 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2543 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888119d9e000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 60 bytes inside of 1024-byte region [ffff888119d9e000, ffff888119d9e400) The buggy address belongs to the page: page:ffffea0004676600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x119d98 head:ffffea0004676600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042f00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 1432, ts 62170819771, free_ts 62145357860 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] __kmalloc_track_caller+0x1e4/0x310 mm/slub.c:4541 __kmalloc_reserve net/core/skbuff.c:144 [inline] pskb_expand_head+0x123/0x11c0 net/core/skbuff.c:1654 netlink_trim+0x193/0x230 net/netlink/af_netlink.c:1295 netlink_unicast+0x67/0xa30 net/netlink/af_netlink.c:1330 nlmsg_unicast include/net/netlink.h:1050 [inline] genlmsg_unicast include/net/genetlink.h:355 [inline] genlmsg_reply include/net/genetlink.h:365 [inline] ctrl_getfamily+0x4ae/0x5a0 net/netlink/genetlink.c:1069 genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0xe92/0x1190 net/netlink/genetlink.c:800 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2508 genl_rcv+0x28/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x86c/0xa30 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x949/0xb70 net/netlink/af_netlink.c:1919 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] __free_pages_ok+0x80b/0x830 mm/page_alloc.c:1629 free_the_page mm/page_alloc.c:5445 [inline] __free_pages+0xd8/0x390 mm/page_alloc.c:5454 __free_slab+0xcf/0x190 mm/slub.c:1899 free_slab mm/slub.c:1914 [inline] discard_slab mm/slub.c:1920 [inline] unfreeze_partials+0x150/0x180 mm/slub.c:2415 put_cpu_partial+0xc1/0x180 mm/slub.c:2451 __slab_free+0x2c9/0x3a0 mm/slub.c:3100 do_slab_free mm/slub.c:3196 [inline] ___cache_free+0x10e/0x130 mm/slub.c:3215 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x14a/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965 anon_vma_chain_alloc mm/rmap.c:138 [inline] __anon_vma_prepare+0x51/0x410 mm/rmap.c:192 anon_vma_prepare include/linux/rmap.h:171 [inline] do_anonymous_page mm/memory.c:3961 [inline] handle_pte_fault+0x30d7/0x3910 mm/memory.c:4795 __handle_mm_fault mm/memory.c:4953 [inline] handle_mm_fault+0xf86/0x1720 mm/memory.c:5367 Memory state around the buggy address: ffff888119d9df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888119d9df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888119d9e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888119d9e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888119d9e100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ kobject: '' (ffff888119d9e000): is not initialized, yet kobject_get() is being called. WARNING: CPU: 0 PID: 3261 at lib/kobject.c:666 kobject_get+0x7c/0x120 lib/kobject.c:664 Modules linked in: CPU: 0 PID: 3261 Comm: syz.6.748 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026 RIP: 0010:kobject_get+0x7c/0x120 lib/kobject.c:664 Code: 0a ff 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 d6 3b 45 ff 48 8b 33 48 c7 c7 80 a6 41 85 48 89 da e8 04 8d 1f 02 <0f> 0b eb 0c e8 eb ba 0a ff eb 4c e8 e4 ba 0a ff 4c 8d 73 38 4c 89 RSP: 0018:ffffc90000e57970 EFLAGS: 00010246 RAX: 5a9d62bb333d2f00 RBX: ffff888119d9e000 RCX: 0000000000080000 RDX: ffffc9000194c000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000e57988 R08: ffffc90000e57307 R09: fffff520001cae94 R10: dffffc0000000000 R11: fffff520001cae61 R12: 0000000000000000 R13: ffff88812727e068 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007fc9f00136c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c293853 CR3: 000000011e8c7000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: get_device drivers/base/core.c:3361 [inline] device_add+0x331/0xc00 drivers/base/core.c:3191 device_create_groups_vargs drivers/base/core.c:3960 [inline] device_create+0x26c/0x300 drivers/base/core.c:4002 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44 function_make+0x118/0x350 drivers/usb/gadget/configfs.c:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc9f15db159 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:00007fc9f0013028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc9f1863090 RCX: 00007fc9f15db159 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fc9f167203b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9f1863128 R14: 00007fc9f1863090 R15: 00007fff6da15a28 ---[ end trace 50b7791753fb0844 ]--- ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 3261 at lib/refcount.c:25 refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 3261 Comm: syz.6.748 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026 RIP: 0010:refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Code: 04 01 48 c7 c7 00 54 40 85 e8 d8 60 3b 02 0f 0b eb df e8 bf 8e 26 ff c6 05 6d 73 82 04 01 48 c7 c7 40 53 40 85 e8 bc 60 3b 02 <0f> 0b eb c3 e8 a3 8e 26 ff c6 05 52 73 82 04 01 48 c7 c7 a0 53 40 RSP: 0018:ffffc90000e57950 EFLAGS: 00010246 RAX: 5a9d62bb333d2f00 RBX: 0000000000000002 RCX: 0000000000080000 RDX: ffffc9000194c000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000e57960 R08: ffffc90000e572e7 R09: fffff520001cae90 R10: dffffc0000000000 R11: fffff520001cae5d R12: 0000000000000000 R13: ffff88812727e068 R14: 0000000000000002 R15: 0000000000000000 FS: 00007fc9f00136c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c293853 CR3: 000000011e8c7000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 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:667 get_device drivers/base/core.c:3361 [inline] device_add+0x331/0xc00 drivers/base/core.c:3191 device_create_groups_vargs drivers/base/core.c:3960 [inline] device_create+0x26c/0x300 drivers/base/core.c:4002 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44 function_make+0x118/0x350 drivers/usb/gadget/configfs.c:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc9f15db159 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:00007fc9f0013028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc9f1863090 RCX: 00007fc9f15db159 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fc9f167203b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9f1863128 R14: 00007fc9f1863090 R15: 00007fff6da15a28 ---[ end trace 50b7791753fb0845 ]--- ------------[ cut here ]------------ kobject: '' (ffff888119d9e000): is not initialized, yet kobject_get() is being called. WARNING: CPU: 0 PID: 3261 at lib/kobject.c:666 kobject_get lib/kobject.c:664 [inline] WARNING: CPU: 0 PID: 3261 at lib/kobject.c:666 kobject_add_internal+0x12e/0xde0 lib/kobject.c:248 Modules linked in: CPU: 0 PID: 3261 Comm: syz.6.748 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026 RIP: 0010:kobject_get lib/kobject.c:664 [inline] RIP: 0010:kobject_add_internal+0x12e/0xde0 lib/kobject.c:248 Code: b9 00 00 00 00 00 fc ff df 80 3c 08 00 74 08 4c 89 e7 e8 55 23 45 ff 49 8b 34 24 48 c7 c7 80 a6 41 85 4c 89 e2 e8 82 74 1f 02 <0f> 0b e9 04 01 00 00 e8 66 a2 0a ff b8 fe ff ff ff e9 b0 09 00 00 RSP: 0018:ffffc90000e577d8 EFLAGS: 00010246 RAX: 5a9d62bb333d2f00 RBX: ffff88810b9c2d00 RCX: 0000000000080000 RDX: ffffc9000194c000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000e57830 R08: ffffc90000e57167 R09: fffff520001cae60 R10: dffffc0000000000 R11: fffff520001cae2d R12: ffff888119d9e000 R13: ffff88810b9c2d18 R14: 0000000000000000 R15: 1ffff110217385a0 FS: 00007fc9f00136c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c293853 CR3: 000000011e8c7000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kobject_add_varg lib/kobject.c:398 [inline] kobject_add+0x165/0x230 lib/kobject.c:450 class_dir_create_and_add drivers/base/core.c:2825 [inline] get_device_parent+0x3a6/0x410 drivers/base/core.c:2880 device_add+0x349/0xc00 drivers/base/core.c:3192 device_create_groups_vargs drivers/base/core.c:3960 [inline] device_create+0x26c/0x300 drivers/base/core.c:4002 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44 function_make+0x118/0x350 drivers/usb/gadget/configfs.c:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc9f15db159 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:00007fc9f0013028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc9f1863090 RCX: 00007fc9f15db159 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fc9f167203b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9f1863128 R14: 00007fc9f1863090 R15: 00007fff6da15a28 ---[ end trace 50b7791753fb0846 ]--- ------------[ cut here ]------------ refcount_t: saturated; leaking memory. WARNING: CPU: 0 PID: 3261 at lib/refcount.c:22 refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Modules linked in: CPU: 0 PID: 3261 Comm: syz.6.748 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026 RIP: 0010:refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Code: 04 01 48 c7 c7 c0 52 40 85 e8 84 60 3b 02 0f 0b eb 8b e8 6b 8e 26 ff c6 05 18 73 82 04 01 48 c7 c7 c0 52 40 85 e8 68 60 3b 02 <0f> 0b e9 6c ff ff ff e8 4c 8e 26 ff c6 05 fd 72 82 04 01 48 c7 c7 RSP: 0018:ffffc90000e577b8 EFLAGS: 00010246 RAX: 5a9d62bb333d2f00 RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc9000194c000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000e577c8 R08: ffffc90000e57147 R09: fffff520001cae5c R10: dffffc0000000000 R11: fffff520001cae29 R12: 00000000c0000000 R13: ffff88810b9c2d18 R14: 0000000000000001 R15: ffff888119d9e038 FS: 00007fc9f00136c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c293853 CR3: 000000011e8c7000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 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 lib/kobject.c:667 [inline] kobject_add_internal+0xc44/0xde0 lib/kobject.c:248 kobject_add_varg lib/kobject.c:398 [inline] kobject_add+0x165/0x230 lib/kobject.c:450 class_dir_create_and_add drivers/base/core.c:2825 [inline] get_device_parent+0x3a6/0x410 drivers/base/core.c:2880 device_add+0x349/0xc00 drivers/base/core.c:3192 device_create_groups_vargs drivers/base/core.c:3960 [inline] device_create+0x26c/0x300 drivers/base/core.c:4002 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44 function_make+0x118/0x350 drivers/usb/gadget/configfs.c:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc9f15db159 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:00007fc9f0013028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc9f1863090 RCX: 00007fc9f15db159 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fc9f167203b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9f1863128 R14: 00007fc9f1863090 R15: 00007fff6da15a28 ---[ end trace 50b7791753fb0847 ]--- general protection fault, probably for non-canonical address 0xdffffc0000200013: 0000 [#1] PREEMPT SMP KASAN KASAN: probably user-memory-access in range [0x0000000001000098-0x000000000100009f] CPU: 0 PID: 3261 Comm: syz.6.748 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/08/2026 RIP: 0010:kobj_child_ns_ops lib/kobject.c:1084 [inline] RIP: 0010:kobj_ns_ops lib/kobject.c:1092 [inline] RIP: 0010:kobject_namespace lib/kobject.c:30 [inline] RIP: 0010:create_dir lib/kobject.c:89 [inline] RIP: 0010:kobject_add_internal+0x5e3/0xde0 lib/kobject.c:263 Code: 4c 89 e7 e8 af 1e 45 ff 4d 8b 24 24 4d 85 e4 0f 84 db 00 00 00 49 83 c4 20 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 e7 e8 7f 1e 45 ff 49 8b 04 24 48 85 c0 0f RSP: 0018:ffffc90000e577d8 EFLAGS: 00010203 RAX: 0000000000200013 RBX: ffff88810b9c2d00 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888119d9e028 RBP: ffffc90000e57830 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001caeec R12: 000000000100009f R13: ffff88810b9c2d18 R14: ffffffff8681cea0 R15: ffff888119d9e000 FS: 00007fc9f00136c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c293853 CR3: 000000011e8c7000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kobject_add_varg lib/kobject.c:398 [inline] kobject_add+0x165/0x230 lib/kobject.c:450 class_dir_create_and_add drivers/base/core.c:2825 [inline] get_device_parent+0x3a6/0x410 drivers/base/core.c:2880 device_add+0x349/0xc00 drivers/base/core.c:3192 device_create_groups_vargs drivers/base/core.c:3960 [inline] device_create+0x26c/0x300 drivers/base/core.c:4002 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1262 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1303 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline] usb_get_function_instance+0xe2/0x2f0 drivers/usb/gadget/functions.c:44 function_make+0x118/0x350 drivers/usb/gadget/configfs.c:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1382 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc9f15db159 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:00007fc9f0013028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc9f1863090 RCX: 00007fc9f15db159 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fc9f167203b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9f1863128 R14: 00007fc9f1863090 R15: 00007fff6da15a28 Modules linked in: ---[ end trace 50b7791753fb0848 ]--- RIP: 0010:kobj_child_ns_ops lib/kobject.c:1084 [inline] RIP: 0010:kobj_ns_ops lib/kobject.c:1092 [inline] RIP: 0010:kobject_namespace lib/kobject.c:30 [inline] RIP: 0010:create_dir lib/kobject.c:89 [inline] RIP: 0010:kobject_add_internal+0x5e3/0xde0 lib/kobject.c:263 Code: 4c 89 e7 e8 af 1e 45 ff 4d 8b 24 24 4d 85 e4 0f 84 db 00 00 00 49 83 c4 20 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 e7 e8 7f 1e 45 ff 49 8b 04 24 48 85 c0 0f RSP: 0018:ffffc90000e577d8 EFLAGS: 00010203 RAX: 0000000000200013 RBX: ffff88810b9c2d00 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888119d9e028 RBP: ffffc90000e57830 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001caeec R12: 000000000100009f R13: ffff88810b9c2d18 R14: ffffffff8681cea0 R15: ffff888119d9e000 FS: 00007fc9f00136c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c293853 CR3: 000000011e8c7000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 4c 89 e7 mov %r12,%rdi 3: e8 af 1e 45 ff call 0xff451eb7 8: 4d 8b 24 24 mov (%r12),%r12 c: 4d 85 e4 test %r12,%r12 f: 0f 84 db 00 00 00 je 0xf0 15: 49 83 c4 20 add $0x20,%r12 19: 4c 89 e0 mov %r12,%rax 1c: 48 c1 e8 03 shr $0x3,%rax 20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 27: fc ff df * 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction 2e: 74 08 je 0x38 30: 4c 89 e7 mov %r12,%rdi 33: e8 7f 1e 45 ff call 0xff451eb7 38: 49 8b 04 24 mov (%r12),%rax 3c: 48 85 c0 test %rax,%rax 3f: 0f .byte 0xf