================================================================== BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:663 Read of size 1 at addr ffff88811865003c by task syz.8.222/1159 CPU: 0 PID: 1159 Comm: syz.8.222 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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:3798 do_mkdirat+0x14c/0x340 fs/namei.c:3820 __do_sys_mkdirat fs/namei.c:3831 [inline] __se_sys_mkdirat fs/namei.c:3829 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3829 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1a69a090d9 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:00007f1a68462028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1a69c90fa0 RCX: 00007f1a69a090d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f1a69aa0024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1a69c91038 R14: 00007f1a69c90fa0 R15: 00007ffc1eab9358 The buggy address belongs to the page: page:ffffea0004619400 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x118650 flags: 0x4000000000000000() raw: 4000000000000000 ffffea00045eec08 ffffea0004637008 0000000000000000 raw: 0000000000000000 0000000000000004 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 935, ts 85835722560, free_ts 109437854573 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] kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965 skb_clone+0x1cd/0x370 net/core/skbuff.c:1467 deliver_clone net/bridge/br_forward.c:119 [inline] maybe_deliver+0x1ad/0x2b0 net/bridge/br_forward.c:182 br_flood+0x2e7/0x420 net/bridge/br_forward.c:224 br_handle_frame_finish+0xcd0/0x10f0 net/bridge/br_input.c:173 nf_hook_bridge_pre net/bridge/br_input.c:259 [inline] br_handle_frame+0x406/0x8e0 net/bridge/br_input.c:363 __netif_receive_skb_core+0xed5/0x30b0 net/core/dev.c:5307 __netif_receive_skb_one_core net/core/dev.c:5411 [inline] __netif_receive_skb+0x72/0x280 net/core/dev.c:5527 process_backlog+0x351/0x600 net/core/dev.c:6434 napi_poll net/core/dev.c:6885 [inline] net_rx_action+0x48d/0xed0 net/core/dev.c:6955 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_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page mm/page_alloc.c:5443 [inline] __free_pages+0x146/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_fork+0x1ff/0x520 mm/rmap.c:360 dup_mmap kernel/fork.c:567 [inline] dup_mm kernel/fork.c:1435 [inline] copy_mm+0x8f9/0x13d0 kernel/fork.c:1491 copy_process+0x1386/0x3320 kernel/fork.c:2268 Memory state around the buggy address: ffff88811864ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811864ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888118650000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888118650080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888118650100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ------------[ cut here ]------------ kobject: '' (ffff888118650000): is not initialized, yet kobject_get() is being called. WARNING: CPU: 0 PID: 1159 at lib/kobject.c:666 kobject_get+0x7c/0x120 lib/kobject.c:664 Modules linked in: CPU: 0 PID: 1159 Comm: syz.8.222 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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 46 4a 45 ff 48 8b 33 48 c7 c7 00 a0 41 85 48 89 da e8 24 3b 1f 02 <0f> 0b eb 0c e8 9b d4 0a ff eb 4c e8 94 d4 0a ff 4c 8d 73 38 4c 89 RSP: 0018:ffffc90000f8f970 EFLAGS: 00010246 RAX: f690c0e29e363e00 RBX: ffff888118650000 RCX: 0000000000080000 RDX: ffffc90003cf5000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f8f988 R08: ffff8881f7052fbf R09: 1ffff1103ee0a5f7 R10: dffffc0000000000 R11: ffffed103ee0a5f8 R12: 0000000000000000 R13: ffff8881354b9068 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007f1a684626c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3051eff8 CR3: 00000001552c0000 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:3798 do_mkdirat+0x14c/0x340 fs/namei.c:3820 __do_sys_mkdirat fs/namei.c:3831 [inline] __se_sys_mkdirat fs/namei.c:3829 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3829 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1a69a090d9 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:00007f1a68462028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1a69c90fa0 RCX: 00007f1a69a090d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f1a69aa0024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1a69c91038 R14: 00007f1a69c90fa0 R15: 00007ffc1eab9358 ---[ end trace e6e714e9a567aa88 ]--- ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 1159 at lib/refcount.c:25 refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 1159 Comm: syz.8.222 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Code: 04 01 48 c7 c7 00 4e 40 85 e8 08 0f 3b 02 0f 0b eb df e8 7f a8 26 ff c6 05 9c 8b 82 04 01 48 c7 c7 40 4d 40 85 e8 ec 0e 3b 02 <0f> 0b eb c3 e8 63 a8 26 ff c6 05 81 8b 82 04 01 48 c7 c7 a0 4d 40 RSP: 0018:ffffc90000f8f950 EFLAGS: 00010246 RAX: f690c0e29e363e00 RBX: 0000000000000002 RCX: 0000000000080000 RDX: ffffc90003cf5000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f8f960 R08: ffffc90000f8f2e7 R09: fffff520001f1e90 R10: dffffc0000000000 R11: fffff520001f1e5d R12: 0000000000000000 R13: ffff8881354b9068 R14: 0000000000000002 R15: 0000000000000000 FS: 00007f1a684626c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3051eff8 CR3: 00000001552c0000 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:3798 do_mkdirat+0x14c/0x340 fs/namei.c:3820 __do_sys_mkdirat fs/namei.c:3831 [inline] __se_sys_mkdirat fs/namei.c:3829 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3829 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1a69a090d9 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:00007f1a68462028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1a69c90fa0 RCX: 00007f1a69a090d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f1a69aa0024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1a69c91038 R14: 00007f1a69c90fa0 R15: 00007ffc1eab9358 ---[ end trace e6e714e9a567aa89 ]--- ------------[ cut here ]------------ kobject: '' (ffff888118650000): is not initialized, yet kobject_get() is being called. WARNING: CPU: 0 PID: 1159 at lib/kobject.c:666 kobject_get lib/kobject.c:664 [inline] WARNING: CPU: 0 PID: 1159 at lib/kobject.c:666 kobject_add_internal+0x12e/0xde0 lib/kobject.c:248 Modules linked in: CPU: 0 PID: 1159 Comm: syz.8.222 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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 c5 31 45 ff 49 8b 34 24 48 c7 c7 00 a0 41 85 4c 89 e2 e8 a2 22 1f 02 <0f> 0b e9 04 01 00 00 e8 16 bc 0a ff b8 fe ff ff ff e9 b0 09 00 00 RSP: 0018:ffffc90000f8f838 EFLAGS: 00010246 RAX: f690c0e29e363e00 RBX: ffff8881354b9000 RCX: 0000000000080000 RDX: ffffc90003cf5000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f8f890 R08: ffff8881f7052fbf R09: 1ffff1103ee0a5f7 R10: dffffc0000000000 R11: ffffed103ee0a5f8 R12: ffff888118650000 R13: ffff8881354b9018 R14: 0000000000000000 R15: 1ffff11026a97200 FS: 00007f1a684626c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3051eff8 CR3: 00000001552c0000 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 device_add+0x3d8/0xc00 drivers/base/core.c:3206 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:3798 do_mkdirat+0x14c/0x340 fs/namei.c:3820 __do_sys_mkdirat fs/namei.c:3831 [inline] __se_sys_mkdirat fs/namei.c:3829 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3829 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1a69a090d9 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:00007f1a68462028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1a69c90fa0 RCX: 00007f1a69a090d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f1a69aa0024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1a69c91038 R14: 00007f1a69c90fa0 R15: 00007ffc1eab9358 ---[ end trace e6e714e9a567aa8a ]--- ------------[ cut here ]------------ refcount_t: saturated; leaking memory. WARNING: CPU: 0 PID: 1159 at lib/refcount.c:22 refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Modules linked in: CPU: 0 PID: 1159 Comm: syz.8.222 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Code: 04 01 48 c7 c7 c0 4c 40 85 e8 b4 0e 3b 02 0f 0b eb 8b e8 2b a8 26 ff c6 05 47 8b 82 04 01 48 c7 c7 c0 4c 40 85 e8 98 0e 3b 02 <0f> 0b e9 6c ff ff ff e8 0c a8 26 ff c6 05 2c 8b 82 04 01 48 c7 c7 RSP: 0018:ffffc90000f8f818 EFLAGS: 00010246 RAX: f690c0e29e363e00 RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc90003cf5000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f8f828 R08: ffff8881f7052fbf R09: 1ffff1103ee0a5f7 R10: dffffc0000000000 R11: ffffed103ee0a5f8 R12: 00000000c0000000 R13: ffff8881354b9018 R14: 0000000000000001 R15: ffff888118650038 FS: 00007f1a684626c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3051eff8 CR3: 00000001552c0000 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 device_add+0x3d8/0xc00 drivers/base/core.c:3206 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:3798 do_mkdirat+0x14c/0x340 fs/namei.c:3820 __do_sys_mkdirat fs/namei.c:3831 [inline] __se_sys_mkdirat fs/namei.c:3829 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3829 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1a69a090d9 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:00007f1a68462028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1a69c90fa0 RCX: 00007f1a69a090d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f1a69aa0024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1a69c91038 R14: 00007f1a69c90fa0 R15: 00007ffc1eab9358 ---[ end trace e6e714e9a567aa8b ]--- general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] CPU: 0 PID: 1159 Comm: syz.8.222 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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 1f 2d 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 ef 2c 45 ff 49 8b 04 24 48 85 c0 0f RSP: 0018:ffffc90000f8f838 EFLAGS: 00010207 RAX: 0000000000000006 RBX: ffff8881354b9000 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888118650028 RBP: ffffc90000f8f890 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001f1ef8 R12: 0000000000000036 R13: ffff8881354b9018 R14: ffffffff8681c820 R15: ffff888118650000 FS: 00007f1a684626c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3051eff8 CR3: 00000001552c0000 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 device_add+0x3d8/0xc00 drivers/base/core.c:3206 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:3798 do_mkdirat+0x14c/0x340 fs/namei.c:3820 __do_sys_mkdirat fs/namei.c:3831 [inline] __se_sys_mkdirat fs/namei.c:3829 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3829 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1a69a090d9 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:00007f1a68462028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1a69c90fa0 RCX: 00007f1a69a090d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f1a69aa0024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1a69c91038 R14: 00007f1a69c90fa0 R15: 00007ffc1eab9358 Modules linked in: ---[ end trace e6e714e9a567aa8c ]--- 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 1f 2d 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 ef 2c 45 ff 49 8b 04 24 48 85 c0 0f RSP: 0018:ffffc90000f8f838 EFLAGS: 00010207 RAX: 0000000000000006 RBX: ffff8881354b9000 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888118650028 RBP: ffffc90000f8f890 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001f1ef8 R12: 0000000000000036 R13: ffff8881354b9018 R14: ffffffff8681c820 R15: ffff888118650000 FS: 00007f1a684626c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b3051eff8 CR3: 00000001552c0000 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 1f 2d 45 ff call 0xff452d27 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 ef 2c 45 ff call 0xff452d27 38: 49 8b 04 24 mov (%r12),%rax 3c: 48 85 c0 test %rax,%rax 3f: 0f .byte 0xf