================================================================== BUG: KASAN: use-after-free in kobject_get+0x113/0x120 lib/kobject.c:663 Read of size 1 at addr ffff8881165e483c by task syz.2.1830/7098 CPU: 0 PID: 7098 Comm: syz.2.1830 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x10f/0x150 mm/kasan/report.c:444 __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:3518 [inline] device_add+0x2f0/0xe90 drivers/base/core.c:3342 device_create_groups_vargs drivers/base/core.c:4118 [inline] device_create+0x26c/0x300 drivers/base/core.c:4160 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:642 configfs_mkdir+0x50a/0x9c0 fs/configfs/dir.c:1360 vfs_mkdir+0x38b/0x590 fs/namei.c:4073 do_mkdirat+0x174/0x4d0 fs/namei.c:4098 __do_sys_mkdirat fs/namei.c:4113 [inline] __se_sys_mkdirat fs/namei.c:4111 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111 x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f0c8ee56159 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:00007f0c8d8af028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f0c8f0ddfa0 RCX: 00007f0c8ee56159 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f0c8eeed06b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0c8f0de038 R14: 00007f0c8f0ddfa0 R15: 00007ffc466623c8 Allocated by task 6581: 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:433 [inline] ____kasan_kmalloc mm/kasan/common.c:512 [inline] __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] __kmalloc+0x13d/0x2c0 mm/slub.c:4436 __kmalloc_node include/linux/slab.h:487 [inline] kmalloc_node include/linux/slab.h:642 [inline] kvmalloc_node+0x211/0x320 mm/util.c:621 kvmalloc include/linux/mm.h:862 [inline] f2fs_kvmalloc fs/f2fs/f2fs.h:3397 [inline] f2fs_kvzalloc fs/f2fs/f2fs.h:3403 [inline] init_free_nid_cache fs/f2fs/node.c:3307 [inline] f2fs_build_node_manager+0xf5d/0x1d60 fs/f2fs/node.c:3328 f2fs_fill_super+0x45ac/0x6dd0 fs/f2fs/super.c:4436 mount_bdev+0x28d/0x3c0 fs/super.c:1400 f2fs_mount+0x34/0x40 fs/f2fs/super.c:4713 legacy_get_tree+0xed/0x190 fs/fs_context.c:611 vfs_get_tree+0x89/0x260 fs/super.c:1530 do_new_mount+0x251/0xb40 fs/namespace.c:3037 path_mount+0x640/0xff0 fs/namespace.c:3367 do_mount fs/namespace.c:3380 [inline] __do_sys_mount fs/namespace.c:3588 [inline] __se_sys_mount+0x320/0x390 fs/namespace.c:3565 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3565 x64_sys_call+0x6bf/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:166 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 6254: 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:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kfree+0xc4/0x270 mm/slub.c:4588 kvfree+0x35/0x40 mm/util.c:661 f2fs_destroy_node_manager+0xe50/0x1050 fs/f2fs/node.c:3404 f2fs_put_super+0x6ab/0xbd0 fs/f2fs/super.c:1703 generic_shutdown_super+0x151/0x330 fs/super.c:475 kill_block_super+0x7f/0xf0 fs/super.c:1427 kill_f2fs_super+0x30a/0x3d0 fs/f2fs/super.c:4745 deactivate_locked_super+0xa0/0x100 fs/super.c:335 deactivate_super+0xaf/0xe0 fs/super.c:366 cleanup_mnt+0x44f/0x500 fs/namespace.c:1149 __cleanup_mnt+0x19/0x20 fs/namespace.c:1156 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 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/0x310 kernel/workqueue.c:1373 __queue_work+0x8e1/0xc60 kernel/workqueue.c:1539 queue_work_on+0xde/0x150 kernel/workqueue.c:1566 queue_work include/linux/workqueue.h:510 [inline] schedule_work include/linux/workqueue.h:571 [inline] bpf_prog_free+0x13c/0x150 kernel/bpf/core.c:2327 __bpf_prog_release net/core/filter.c:1180 [inline] bpf_prog_destroy+0xb6/0xe0 net/core/filter.c:1460 seccomp_filter_free kernel/seccomp.c:519 [inline] __put_seccomp_filter kernel/seccomp.c:539 [inline] __seccomp_filter_release+0x15f/0x1e0 kernel/seccomp.c:548 seccomp_filter_release+0x8b/0xb0 kernel/seccomp.c:569 release_task+0x10bd/0x1210 kernel/exit.c:276 wait_task_zombie kernel/exit.c:1195 [inline] wait_consider_task+0x1829/0x2840 kernel/exit.c:1422 do_wait_thread kernel/exit.c:1485 [inline] do_wait+0x267/0x9c0 kernel/exit.c:1602 kernel_wait4+0x1d1/0x2b0 kernel/exit.c:1765 __do_sys_wait4 kernel/exit.c:1793 [inline] __se_sys_wait4 kernel/exit.c:1789 [inline] __x64_sys_wait4+0x163/0x230 kernel/exit.c:1789 x64_sys_call+0xec/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:62 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff8881165e4800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 60 bytes inside of 1024-byte region [ffff8881165e4800, ffff8881165e4c00) The buggy address belongs to the page: page:ffffea0004597800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1165e0 head:ffffea0004597800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 0000000800000001 ffff888100043080 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 113, ts 5425098148, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa0/0x4d0 mm/slub.c:2000 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] __kmalloc_track_caller+0x169/0x2c0 mm/slub.c:4954 kmalloc_reserve net/core/skbuff.c:357 [inline] __alloc_skb+0x210/0x730 net/core/skbuff.c:428 alloc_skb include/linux/skbuff.h:1183 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline] netlink_sendmsg+0x611/0xb80 net/netlink/af_netlink.c:1898 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2436 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2490 __sys_sendmsg net/socket.c:2519 [inline] __do_sys_sendmsg net/socket.c:2528 [inline] __se_sys_sendmsg net/socket.c:2526 [inline] __x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2526 x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page_owner free stack trace missing Memory state around the buggy address: ffff8881165e4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881165e4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881165e4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881165e4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881165e4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== general protection fault, probably for non-canonical address 0xe038dc38e038e03c: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x01c701c701c701e0-0x01c701c701c701e7] CPU: 1 PID: 7098 Comm: syz.2.1830 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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 7f 36 39 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 4f 36 39 ff 49 8b 04 24 48 85 c0 0f RSP: 0018:ffffc90000a378d8 EFLAGS: 00010207 RAX: 0038e038e038e03c RBX: ffff88811826b800 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8881165e4828 RBP: ffffc90000a37930 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000146f0c R12: 01c701c701c701e7 R13: ffff88811826b818 R14: ffffffff86a49440 R15: ffff8881165e4800 FS: 00007f0c8d8af6c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0c6824d000 CR3: 00000001295fc000 CR4: 00000000003506a0 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+0x398/0xe90 drivers/base/core.c:3357 device_create_groups_vargs drivers/base/core.c:4118 [inline] device_create+0x26c/0x300 drivers/base/core.c:4160 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:642 configfs_mkdir+0x50a/0x9c0 fs/configfs/dir.c:1360 vfs_mkdir+0x38b/0x590 fs/namei.c:4073 do_mkdirat+0x174/0x4d0 fs/namei.c:4098 __do_sys_mkdirat fs/namei.c:4113 [inline] __se_sys_mkdirat fs/namei.c:4111 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111 x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f0c8ee56159 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:00007f0c8d8af028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f0c8f0ddfa0 RCX: 00007f0c8ee56159 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f0c8eeed06b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0c8f0de038 R14: 00007f0c8f0ddfa0 R15: 00007ffc466623c8 Modules linked in: ---[ end trace 6dc488a16625cdbc ]--- 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 7f 36 39 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 4f 36 39 ff 49 8b 04 24 48 85 c0 0f RSP: 0018:ffffc90000a378d8 EFLAGS: 00010207 RAX: 0038e038e038e03c RBX: ffff88811826b800 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8881165e4828 RBP: ffffc90000a37930 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000146f0c R12: 01c701c701c701e7 R13: ffff88811826b818 R14: ffffffff86a49440 R15: ffff8881165e4800 FS: 00007f0c8d8af6c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000002000 CR3: 00000001295fc000 CR4: 00000000003506a0 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 7f 36 39 ff call 0xff393687 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 4f 36 39 ff call 0xff393687 38: 49 8b 04 24 mov (%r12),%rax 3c: 48 85 c0 test %rax,%rax 3f: 0f .byte 0xf