================================================================== BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:663 Read of size 1 at addr ffff888111a0283c by task syz.7.5509/16637 CPU: 0 PID: 16637 Comm: syz.7.5509 Tainted: G W 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:1354 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:0x7fadb4ec70d9 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:00007fadb3920028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fadb514efa0 RCX: 00007fadb4ec70d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fadb4f5e024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fadb514f038 R14: 00007fadb514efa0 R15: 00007fffce3039d8 Allocated by task 13451: 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] bpf_prog_alloc_no_stats+0x8a/0x240 kernel/bpf/core.c:96 bpf_prog_alloc+0x21/0x1f0 kernel/bpf/core.c:120 bpf_prog_load+0x7ca/0x14e0 kernel/bpf/syscall.c:2175 __do_sys_bpf kernel/bpf/syscall.c:4435 [inline] __se_sys_bpf+0x49a/0x740 kernel/bpf/syscall.c:4391 __x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:4391 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 15816: 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:2219 xfrm_state_find+0x1ee9/0x28a0 net/xfrm/xfrm_state.c:1140 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2389 [inline] xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2434 [inline] xfrm_resolve_and_create_bundle+0x6b7/0x2a20 net/xfrm/xfrm_policy.c:2727 xfrm_lookup_with_ifid+0x7fa/0x1a10 net/xfrm/xfrm_policy.c:3061 xfrm_lookup net/xfrm/xfrm_policy.c:3185 [inline] xfrm_lookup_route+0x3c/0x170 net/xfrm/xfrm_policy.c:3196 ip6_dst_lookup_flow+0x9b/0xc0 net/ipv6/ip6_output.c:1226 rawv6_sendmsg+0xbef/0x16c0 net/ipv6/raw.c:933 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 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 insert_work+0x51/0x320 kernel/workqueue.c:1352 __queue_work+0x91f/0xca0 kernel/workqueue.c:1518 queue_work_on+0xe6/0x140 kernel/workqueue.c:1545 queue_work include/linux/workqueue.h:515 [inline] schedule_work include/linux/workqueue.h:576 [inline] bpf_prog_free+0x139/0x150 kernel/bpf/core.c:2228 __bpf_prog_put_rcu+0x14b/0x170 kernel/bpf/syscall.c:1751 rcu_do_batch+0x488/0xaf0 kernel/rcu/tree.c:2494 rcu_core+0x50a/0xca0 kernel/rcu/tree.c:2735 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2748 __do_softirq+0x255/0x563 kernel/softirq.c:309 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2980 [inline] call_rcu+0x11a/0x1090 kernel/rcu/tree.c:3054 __bpf_prog_put_noref kernel/bpf/syscall.c:1764 [inline] __bpf_prog_put kernel/bpf/syscall.c:1777 [inline] bpf_prog_put+0x2c8/0x3a0 kernel/bpf/syscall.c:1783 bpf_prog_release+0x3b/0x40 kernel/bpf/syscall.c:1791 __fput+0x2dc/0x730 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x127/0x190 kernel/task_work.c:189 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:172 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:274 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888111a02800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 60 bytes inside of 1024-byte region [ffff888111a02800, ffff888111a02c00) The buggy address belongs to the page: page:ffffea0004468000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111a00 head:ffffea0004468000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000100000001 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 380, ts 127486052124, free_ts 127486034758 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+0x1f9/0x330 mm/slub.c:4034 __kmalloc_node include/linux/slab.h:421 [inline] kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x88/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:833 [inline] xt_alloc_table_info+0x3b/0xa0 net/netfilter/x_tables.c:1195 do_replace net/ipv4/netfilter/ip_tables.c:1125 [inline] do_ipt_set_ctl+0x85c/0xd70 net/ipv4/netfilter/ip_tables.c:1633 nf_setsockopt+0x272/0x2a0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x29f2/0x35b0 net/ipv4/ip_sockglue.c:1442 tcp_setsockopt+0x22b/0x1d80 net/ipv4/tcp.c:3500 sock_common_setsockopt+0xa0/0xb0 net/core/sock.c:3327 __sys_setsockopt+0x2fa/0x480 net/socket.c:2147 __do_sys_setsockopt net/socket.c:2158 [inline] __se_sys_setsockopt net/socket.c:2155 [inline] __x64_sys_setsockopt+0xbf/0xd0 net/socket.c:2155 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 getname_flags+0xba/0x510 fs/namei.c:141 user_path_at_empty+0x2f/0x50 fs/namei.c:2748 do_readlinkat+0xd9/0x490 fs/stat.c:414 Memory state around the buggy address: ffff888111a02700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888111a02780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888111a02800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888111a02880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888111a02900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ kobject: '' (ffff888111a02800): is not initialized, yet kobject_get() is being called. WARNING: CPU: 0 PID: 16637 at lib/kobject.c:666 kobject_get+0x7c/0x120 lib/kobject.c:664 Modules linked in: CPU: 0 PID: 16637 Comm: syz.7.5509 Tainted: G B W 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 26 3a 45 ff 48 8b 33 48 c7 c7 00 9b 41 85 48 89 da e8 04 06 1f 02 <0f> 0b eb 0c e8 eb c4 0a ff eb 4c e8 e4 c4 0a ff 4c 8d 73 38 4c 89 RSP: 0018:ffffc90000f77970 EFLAGS: 00010246 RAX: 9bc44523a25e9d00 RBX: ffff888111a02800 RCX: 0000000000080000 RDX: ffffc9000a729000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f77988 R08: ffff8881f7052fbf R09: 1ffff1103ee0a5f7 R10: dffffc0000000000 R11: ffffed103ee0a5f8 R12: 0000000000000000 R13: ffff8881285ca068 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007fadb39206c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f27d48492f8 CR3: 000000011603c000 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:1354 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:0x7fadb4ec70d9 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:00007fadb3920028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fadb514efa0 RCX: 00007fadb4ec70d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fadb4f5e024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fadb514f038 R14: 00007fadb514efa0 R15: 00007fffce3039d8 ---[ end trace f4198c347394b3e7 ]--- ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 16637 at lib/refcount.c:25 refcount_warn_saturate+0x104/0x1a0 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 16637 Comm: syz.7.5509 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 e0 48 40 85 e8 b8 d3 3a 02 0f 0b eb df e8 9f 92 26 ff c6 05 3c 80 82 04 01 48 c7 c7 20 48 40 85 e8 9c d3 3a 02 <0f> 0b eb c3 e8 83 92 26 ff c6 05 21 80 82 04 01 48 c7 c7 80 48 40 RSP: 0018:ffffc90000f77950 EFLAGS: 00010246 RAX: 9bc44523a25e9d00 RBX: 0000000000000002 RCX: 0000000000080000 RDX: ffffc9000a729000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f77960 R08: ffffc90000f772e7 R09: fffff520001eee90 R10: dffffc0000000000 R11: fffff520001eee5d R12: 0000000000000000 R13: ffff8881285ca068 R14: 0000000000000002 R15: 0000000000000000 FS: 00007fadb39206c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f27d48492f8 CR3: 000000011603c000 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:1354 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:0x7fadb4ec70d9 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:00007fadb3920028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fadb514efa0 RCX: 00007fadb4ec70d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fadb4f5e024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fadb514f038 R14: 00007fadb514efa0 R15: 00007fffce3039d8 ---[ end trace f4198c347394b3e8 ]--- ------------[ cut here ]------------ kobject: '' (ffff888111a02800): is not initialized, yet kobject_get() is being called. WARNING: CPU: 0 PID: 16637 at lib/kobject.c:666 kobject_get lib/kobject.c:664 [inline] WARNING: CPU: 0 PID: 16637 at lib/kobject.c:666 kobject_add_internal+0x12e/0xde0 lib/kobject.c:248 Modules linked in: CPU: 0 PID: 16637 Comm: syz.7.5509 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 a5 21 45 ff 49 8b 34 24 48 c7 c7 00 9b 41 85 4c 89 e2 e8 82 ed 1e 02 <0f> 0b e9 04 01 00 00 e8 66 ac 0a ff b8 fe ff ff ff e9 b0 09 00 00 RSP: 0018:ffffc90000f777d8 EFLAGS: 00010246 RAX: 9bc44523a25e9d00 RBX: ffff8881002bd100 RCX: 0000000000080000 RDX: ffffc9000a729000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f77830 R08: ffff8881f7052fbf R09: 1ffff1103ee0a5f7 R10: dffffc0000000000 R11: ffffed103ee0a5f8 R12: ffff888111a02800 R13: ffff8881002bd118 R14: 0000000000000000 R15: 1ffff11020057a20 FS: 00007fadb39206c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f27d48492f8 CR3: 000000011603c000 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:1354 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:0x7fadb4ec70d9 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:00007fadb3920028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fadb514efa0 RCX: 00007fadb4ec70d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fadb4f5e024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fadb514f038 R14: 00007fadb514efa0 R15: 00007fffce3039d8 ---[ end trace f4198c347394b3e9 ]--- ------------[ cut here ]------------ refcount_t: saturated; leaking memory. WARNING: CPU: 1 PID: 16637 at lib/refcount.c:22 refcount_warn_saturate+0x158/0x1a0 lib/refcount.c:22 Modules linked in: CPU: 1 PID: 16637 Comm: syz.7.5509 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 a0 47 40 85 e8 64 d3 3a 02 0f 0b eb 8b e8 4b 92 26 ff c6 05 e7 7f 82 04 01 48 c7 c7 a0 47 40 85 e8 48 d3 3a 02 <0f> 0b e9 6c ff ff ff e8 2c 92 26 ff c6 05 cc 7f 82 04 01 48 c7 c7 RSP: 0018:ffffc90000f777b8 EFLAGS: 00010246 RAX: 9bc44523a25e9d00 RBX: 0000000000000001 RCX: 0000000000080000 RDX: ffffc9000a729000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f777c8 R08: ffff8881f7127453 R09: 1ffff1103ee24e8a R10: dffffc0000000000 R11: ffffed103ee24e8b R12: 00000000c0000000 R13: ffff8881002bd118 R14: 0000000000000001 R15: ffff888111a02838 FS: 00007fadb39206c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7463b0b2f8 CR3: 000000011603c000 CR4: 00000000003506a0 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:1354 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:0x7fadb4ec70d9 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:00007fadb3920028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fadb514efa0 RCX: 00007fadb4ec70d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fadb4f5e024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fadb514f038 R14: 00007fadb514efa0 R15: 00007fffce3039d8 ---[ end trace f4198c347394b3ea ]--- general protection fault, probably for non-canonical address 0xe01ffc000000000e: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x0100000000000070-0x0100000000000077] CPU: 1 PID: 16637 Comm: syz.7.5509 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:kernfs_new_node+0x3f/0x260 fs/kernfs/dir.c:727 Code: 45 89 c5 89 4d d4 41 89 d7 48 89 75 c0 48 89 fb 49 be 00 00 00 00 00 fc ff df e8 8c 79 9d ff 4c 8d 63 72 4c 89 e0 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 b8 01 00 00 45 0f b7 24 24 44 89 e6 81 RSP: 0018:ffffc90000f77688 EFLAGS: 00010202 RAX: 002000000000000e RBX: 0100000000000000 RCX: 0000000000080000 RDX: ffffc9000a729000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f776c8 R08: 0000000000000000 R09: 0000000000000001 R10: dffffc0000000000 R11: fffff520001eeeec R12: 0100000000000072 R13: 0000000000000000 R14: dffffc0000000000 R15: 00000000000041ed FS: 00007fadb39206c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7463b0b2f8 CR3: 000000011603c000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kernfs_create_dir_ns+0x47/0x130 fs/kernfs/dir.c:1087 sysfs_create_dir_ns+0x128/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:89 [inline] kobject_add_internal+0x774/0xde0 lib/kobject.c:263 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:1354 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:0x7fadb4ec70d9 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:00007fadb3920028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fadb514efa0 RCX: 00007fadb4ec70d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007fadb4f5e024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fadb514f038 R14: 00007fadb514efa0 R15: 00007fffce3039d8 Modules linked in: ---[ end trace f4198c347394b3eb ]--- RIP: 0010:kernfs_new_node+0x3f/0x260 fs/kernfs/dir.c:727 Code: 45 89 c5 89 4d d4 41 89 d7 48 89 75 c0 48 89 fb 49 be 00 00 00 00 00 fc ff df e8 8c 79 9d ff 4c 8d 63 72 4c 89 e0 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 b8 01 00 00 45 0f b7 24 24 44 89 e6 81 RSP: 0018:ffffc90000f77688 EFLAGS: 00010202 RAX: 002000000000000e RBX: 0100000000000000 RCX: 0000000000080000 RDX: ffffc9000a729000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000f776c8 R08: 0000000000000000 R09: 0000000000000001 R10: dffffc0000000000 R11: fffff520001eeeec R12: 0100000000000072 R13: 0000000000000000 R14: dffffc0000000000 R15: 00000000000041ed FS: 00007fadb39206c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7463b0b2f8 CR3: 000000011603c000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 45 89 c5 mov %r8d,%r13d 3: 89 4d d4 mov %ecx,-0x2c(%rbp) 6: 41 89 d7 mov %edx,%r15d 9: 48 89 75 c0 mov %rsi,-0x40(%rbp) d: 48 89 fb mov %rdi,%rbx 10: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14 17: fc ff df 1a: e8 8c 79 9d ff call 0xff9d79ab 1f: 4c 8d 63 72 lea 0x72(%rbx),%r12 23: 4c 89 e0 mov %r12,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 0f b6 04 30 movzbl (%rax,%r14,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 0f 85 b8 01 00 00 jne 0x1ef 37: 45 0f b7 24 24 movzwl (%r12),%r12d 3c: 44 89 e6 mov %r12d,%esi 3f: 81 .byte 0x81