================================================================== BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:631 Read of size 1 at addr ffff88810fe7f03c by task syz.9.3614/16435 CPU: 1 PID: 16435 Comm: syz.9.3614 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: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_mkdirat fs/namei.c:4153 [inline] __se_sys_mkdirat fs/namei.c:4151 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151 x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259 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:0x7f50a219e159 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:00007f50a303f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f50a2425fa0 RCX: 00007f50a219e159 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f50a223506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f50a2426038 R14: 00007f50a2425fa0 R15: 00007ffdfb659348 Allocated by task 102: 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_kmalloc mm/kasan/common.c:380 [inline] __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:938 [inline] __kmalloc_node_track_caller+0xb1/0x1e0 mm/slab_common.c:958 kmalloc_reserve net/core/skbuff.c:449 [inline] __alloc_skb+0x226/0x4a0 net/core/skbuff.c:518 alloc_skb include/linux/skbuff.h:1322 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline] netlink_sendmsg+0x635/0xbd0 net/netlink/af_netlink.c:1853 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0x5fb/0x9c0 net/socket.c:2509 ___sys_sendmsg+0x2a2/0x360 net/socket.c:2563 __sys_sendmsg net/socket.c:2592 [inline] __do_sys_sendmsg net/socket.c:2601 [inline] __se_sys_sendmsg net/socket.c:2599 [inline] __x64_sys_sendmsg+0x20d/0x2e0 net/socket.c:2599 x64_sys_call+0x171/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 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 15949: 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+0xb7/0x1b0 mm/slub.c:3728 kfree+0x6f/0xf0 mm/slab_common.c:990 skb_free_head net/core/skbuff.c:765 [inline] skb_release_data+0x63d/0x8a0 net/core/skbuff.c:794 skb_release_all net/core/skbuff.c:859 [inline] __kfree_skb net/core/skbuff.c:873 [inline] consume_skb+0xab/0x1f0 net/core/skbuff.c:1038 skb_free_datagram+0x15/0x20 net/core/datagram.c:322 netlink_recvmsg+0x5e3/0xe00 net/netlink/af_netlink.c:1956 ____sys_recvmsg+0x2d6/0x5c0 net/socket.c:-1 ___sys_recvmsg+0x210/0x590 net/socket.c:2770 __sys_recvmsg net/socket.c:2800 [inline] __do_sys_recvmsg net/socket.c:2810 [inline] __se_sys_recvmsg net/socket.c:2807 [inline] __x64_sys_recvmsg+0x20a/0x2e0 net/socket.c:2807 x64_sys_call+0x75/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:48 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 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 kvfree_call_rcu+0x8b/0x7a0 kernel/rcu/tree.c:3445 drop_sysctl_table+0x2f5/0x430 fs/proc/proc_sysctl.c:1731 unregister_sysctl_table+0x75/0x120 fs/proc/proc_sysctl.c:1769 unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:175 neigh_sysctl_unregister+0x78/0x90 net/core/neighbour.c:3879 addrconf_sysctl_unregister net/ipv6/addrconf.c:7251 [inline] addrconf_ifdown+0x168b/0x1950 net/ipv6/addrconf.c:3977 addrconf_notify+0x39f/0xe30 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:2022 [inline] call_netdevice_notifiers_extack net/core/dev.c:2060 [inline] call_netdevice_notifiers net/core/dev.c:2074 [inline] unregister_netdevice_many+0x104a/0x1910 net/core/dev.c:11005 default_device_exit_batch+0x951/0x9f0 net/core/dev.c:11518 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x630/0xb10 net/core/net_namespace.c:604 process_one_work+0x717/0xc30 kernel/workqueue.c:2302 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 kvfree_call_rcu+0x8b/0x7a0 kernel/rcu/tree.c:3445 drop_sysctl_table+0x2f5/0x430 fs/proc/proc_sysctl.c:1731 unregister_sysctl_table+0x75/0x120 fs/proc/proc_sysctl.c:1769 unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:175 neigh_sysctl_unregister+0x78/0x90 net/core/neighbour.c:3879 addrconf_sysctl_unregister net/ipv6/addrconf.c:7251 [inline] addrconf_ifdown+0x168b/0x1950 net/ipv6/addrconf.c:3977 addrconf_notify+0x39f/0xe30 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:2022 [inline] call_netdevice_notifiers_extack net/core/dev.c:2060 [inline] call_netdevice_notifiers net/core/dev.c:2074 [inline] unregister_netdevice_many+0x104a/0x1910 net/core/dev.c:11005 default_device_exit_batch+0x951/0x9f0 net/core/dev.c:11518 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x630/0xb10 net/core/net_namespace.c:604 process_one_work+0x717/0xc30 kernel/workqueue.c:2302 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88810fe7f000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 60 bytes inside of 1024-byte region [ffff88810fe7f000, ffff88810fe7f400) The buggy address belongs to the physical page: page:ffffea00043f9e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810fe7a000 pfn:0x10fe78 head:ffffea00043f9e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea0004630e08 ffffea00046bae08 ffff888100043080 raw: ffff88810fe7a000 000000000010000f 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 75, tgid 75 (init), ts 4746648493, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931 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 __slab_alloc+0x5e/0xa0 mm/slub.c:3263 slab_alloc_node mm/slub.c:3348 [inline] __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423 __do_kmalloc_node mm/slab_common.c:937 [inline] __kmalloc+0xa4/0x1e0 mm/slab_common.c:951 kmalloc include/linux/slab.h:568 [inline] load_elf_phdrs fs/binfmt_elf.c:507 [inline] load_elf_binary+0x26e/0x2820 fs/binfmt_elf.c:887 search_binary_handler fs/exec.c:1768 [inline] exec_binprm fs/exec.c:1809 [inline] bprm_execve+0x782/0x1390 fs/exec.c:1878 do_execveat_common+0x8e3/0xaa0 fs/exec.c:1983 do_execve fs/exec.c:2057 [inline] __do_sys_execve fs/exec.c:2133 [inline] __se_sys_execve fs/exec.c:2128 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2128 x64_sys_call+0x98/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:60 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 page_owner free stack trace missing Memory state around the buggy address: ffff88810fe7ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810fe7ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88810fe7f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810fe7f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810fe7f100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== general protection fault, probably for non-canonical address 0xec67a5c9e92a886b: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x633d4e4f49544358-0x633d4e4f4954435f] CPU: 0 PID: 16435 Comm: syz.9.3614 Tainted: G B 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:1052 [inline] RIP: 0010:kobj_ns_ops lib/kobject.c:1060 [inline] RIP: 0010:kobject_namespace lib/kobject.c:30 [inline] RIP: 0010:create_dir lib/kobject.c:63 [inline] RIP: 0010:kobject_add_internal+0x58f/0xc20 lib/kobject.c:231 Code: 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 ff e8 b8 91 c8 fc 4d 8b 3f 4d 85 ff 0f 84 cc 00 00 00 49 83 c7 18 4c 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 ff e8 92 91 c8 fc 49 8b 07 48 85 c0 0f RSP: 0018:ffffc9000582f8b8 EFLAGS: 00010202 RAX: 0c67a9c9e92a886b RBX: ffff88810b89d800 RCX: ffffffff84ee6328 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88810fe7f028 RBP: ffffc9000582f910 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000b05f08 R12: dffffc0000000000 R13: 1ffff11021713b05 R14: ffffffff8747fb00 R15: 633d4e4f49544359 FS: 00007f50a303f6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005555889e3908 CR3: 0000000144d3e000 CR4: 00000000003526b0 DR0: 00000000000000f8 DR1: 0000000000000000 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 class_dir_create_and_add drivers/base/core.c:3235 [inline] get_device_parent+0x3a6/0x410 drivers/base/core.c:3290 device_add+0x308/0xec0 drivers/base/core.c:3619 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_mkdirat fs/namei.c:4153 [inline] __se_sys_mkdirat fs/namei.c:4151 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151 x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259 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:0x7f50a219e159 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:00007f50a303f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f50a2425fa0 RCX: 00007f50a219e159 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f50a223506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f50a2426038 R14: 00007f50a2425fa0 R15: 00007ffdfb659348 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:kobj_child_ns_ops lib/kobject.c:1052 [inline] RIP: 0010:kobj_ns_ops lib/kobject.c:1060 [inline] RIP: 0010:kobject_namespace lib/kobject.c:30 [inline] RIP: 0010:create_dir lib/kobject.c:63 [inline] RIP: 0010:kobject_add_internal+0x58f/0xc20 lib/kobject.c:231 Code: 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 ff e8 b8 91 c8 fc 4d 8b 3f 4d 85 ff 0f 84 cc 00 00 00 49 83 c7 18 4c 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 ff e8 92 91 c8 fc 49 8b 07 48 85 c0 0f RSP: 0018:ffffc9000582f8b8 EFLAGS: 00010202 RAX: 0c67a9c9e92a886b RBX: ffff88810b89d800 RCX: ffffffff84ee6328 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88810fe7f028 RBP: ffffc9000582f910 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000b05f08 R12: dffffc0000000000 R13: 1ffff11021713b05 R14: ffffffff8747fb00 R15: 633d4e4f49544359 FS: 00007f50a303f6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f50a21eb840 CR3: 0000000144d3e000 CR4: 00000000003506b0 DR0: 00000000000000f8 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 48 c1 e8 03 shr $0x3,%rax 4: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 9: 74 08 je 0x13 b: 4c 89 ff mov %r15,%rdi e: e8 b8 91 c8 fc call 0xfcc891cb 13: 4d 8b 3f mov (%r15),%r15 16: 4d 85 ff test %r15,%r15 19: 0f 84 cc 00 00 00 je 0xeb 1f: 49 83 c7 18 add $0x18,%r15 23: 4c 89 f8 mov %r15,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 4c 89 ff mov %r15,%rdi 34: e8 92 91 c8 fc call 0xfcc891cb 39: 49 8b 07 mov (%r15),%rax 3c: 48 85 c0 test %rax,%rax 3f: 0f .byte 0xf