================================================================== BUG: KASAN: slab-out-of-bounds in get_device_parent+0x71/0x410 drivers/base/core.c:3010 Read of size 8 at addr ffff88810b1aeb00 by task syz.1.726/2950 CPU: 0 PID: 2950 Comm: syz.1.726 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 get_device_parent+0x71/0x410 drivers/base/core.c:3010 device_add+0x308/0xe90 drivers/base/core.c:3343 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:1329 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:0x7f1174d510d9 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:00007f1173789028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1174fd9090 RCX: 00007f1174d510d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007f1174de8024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1174fd9128 R14: 00007f1174fd9090 R15: 00007fffd6a742b8 Allocated by task 1927: 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 include/linux/slab.h:624 [inline] kzalloc include/linux/slab.h:750 [inline] __register_sysctl_table+0xeb/0x1240 fs/proc/proc_sysctl.c:1326 register_net_sysctl+0x21d/0x230 net/sysctl_net.c:169 neigh_sysctl_register+0x9a9/0xa90 net/core/neighbour.c:3718 addrconf_sysctl_register+0xb3/0x1a0 net/ipv6/addrconf.c:7210 ipv6_add_dev+0xc09/0x1150 net/ipv6/addrconf.c:456 addrconf_notify+0x582/0xe00 net/ipv6/addrconf.c:3603 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2070 [inline] call_netdevice_notifiers_extack net/core/dev.c:2082 [inline] call_netdevice_notifiers+0x119/0x190 net/core/dev.c:2096 register_netdevice+0x110a/0x1490 net/core/dev.c:10462 ip6_tnl_create2+0xbf/0x330 net/ipv6/ip6_tunnel.c:263 ip6_tnl_create net/ipv6/ip6_tunnel.c:313 [inline] ip6_tnl_locate+0x61e/0x710 net/ipv6/ip6_tunnel.c:363 ip6_tnl_siocdevprivate+0x6c8/0xf00 net/ipv6/ip6_tunnel.c:1657 dev_siocdevprivate net/core/dev_ioctl.c:285 [inline] dev_ifsioc+0xa30/0xd50 net/core/dev_ioctl.c:390 dev_ioctl+0x5e3/0xd00 net/core/dev_ioctl.c:597 sock_ioctl+0x648/0x6d0 net/socket.c:1182 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17 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 ffff88810b1ae800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 768 bytes inside of 1024-byte region [ffff88810b1ae800, ffff88810b1aec00) The buggy address belongs to the page: page:ffffea00042c6a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810b1ad000 pfn:0x10b1a8 head:ffffea00042c6a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea0004a17408 ffffea00044abe08 ffff888100043080 raw: ffff88810b1ad000 000000000010000c 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 1, ts 1968155181, 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+0x16a/0x2c0 mm/slub.c:4432 kmalloc include/linux/slab.h:624 [inline] kzalloc include/linux/slab.h:750 [inline] scsi_alloc_target+0x135/0xaf0 drivers/scsi/scsi_scan.c:488 __scsi_scan_target+0x150/0xb70 drivers/scsi/scsi_scan.c:1620 scsi_scan_channel drivers/scsi/scsi_scan.c:1725 [inline] scsi_scan_host_selected+0x34e/0x600 drivers/scsi/scsi_scan.c:1754 do_scsi_scan_host drivers/scsi/scsi_scan.c:1893 [inline] scsi_scan_host+0x39e/0x670 drivers/scsi/scsi_scan.c:1923 virtscsi_probe+0x95a/0xb00 drivers/scsi/virtio_scsi.c:915 virtio_dev_probe+0x8f3/0xb40 drivers/virtio/virtio.c:273 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x27d/0x970 drivers/base/dd.c:595 __driver_probe_device+0x193/0x270 drivers/base/dd.c:755 page_owner free stack trace missing Memory state around the buggy address: ffff88810b1aea00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff88810b1aea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88810b1aeb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88810b1aeb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810b1aec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] CPU: 0 PID: 2950 Comm: syz.1.726 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:idr_alloc_cyclic+0xa3/0x5f0 lib/idr.c:121 Code: 01 01 01 01 4b 89 44 2e 08 43 c7 44 2e 10 f3 f3 f3 f3 e8 90 27 fa fe 49 8d 4c 24 14 48 89 4c 24 28 48 c1 e9 03 48 89 4c 24 58 <42> 0f b6 04 29 84 c0 0f 85 39 04 00 00 45 8b 6c 24 14 31 ff 89 de RSP: 0018:ffffc90000bf74a0 EFLAGS: 00010203 RAX: ffffffff826f9020 RBX: 0000000000000000 RCX: 0000000000000004 RDX: ffffc9000b17f000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000bf75f0 R08: 0000000000000a20 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff5200017eeb0 R12: 0000000000000010 R13: dffffc0000000000 R14: 1ffff9200017eea0 R15: 0000000000000001 FS: 00007f11737896c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000000000 CR3: 00000001368d0000 CR4: 00000000003506b0 Call Trace: __kernfs_new_node+0x130/0x670 fs/kernfs/dir.c:599 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:669 kernfs_create_dir_ns+0x47/0x130 fs/kernfs/dir.c:1017 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:2976 [inline] get_device_parent+0x3a6/0x410 drivers/base/core.c:3031 device_add+0x308/0xe90 drivers/base/core.c:3343 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:1329 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:0x7f1174d510d9 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:00007f1173789028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f1174fd9090 RCX: 00007f1174d510d9 RDX: 00000000000001ff RSI: 00002000000003c0 RDI: ffffffffffffff9c RBP: 00007f1174de8024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1174fd9128 R14: 00007f1174fd9090 R15: 00007fffd6a742b8 Modules linked in: ---[ end trace a981b674eee92998 ]--- RIP: 0010:idr_alloc_cyclic+0xa3/0x5f0 lib/idr.c:121 Code: 01 01 01 01 4b 89 44 2e 08 43 c7 44 2e 10 f3 f3 f3 f3 e8 90 27 fa fe 49 8d 4c 24 14 48 89 4c 24 28 48 c1 e9 03 48 89 4c 24 58 <42> 0f b6 04 29 84 c0 0f 85 39 04 00 00 45 8b 6c 24 14 31 ff 89 de RSP: 0018:ffffc90000bf74a0 EFLAGS: 00010203 RAX: ffffffff826f9020 RBX: 0000000000000000 RCX: 0000000000000004 RDX: ffffc9000b17f000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000bf75f0 R08: 0000000000000a20 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff5200017eeb0 R12: 0000000000000010 R13: dffffc0000000000 R14: 1ffff9200017eea0 R15: 0000000000000001 FS: 00007f11737896c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000000000 CR3: 00000001368d0000 CR4: 00000000003506b0 ---------------- Code disassembly (best guess): 0: 01 01 add %eax,(%rcx) 2: 01 01 add %eax,(%rcx) 4: 4b 89 44 2e 08 mov %rax,0x8(%r14,%r13,1) 9: 43 c7 44 2e 10 f3 f3 movl $0xf3f3f3f3,0x10(%r14,%r13,1) 10: f3 f3 12: e8 90 27 fa fe call 0xfefa27a7 17: 49 8d 4c 24 14 lea 0x14(%r12),%rcx 1c: 48 89 4c 24 28 mov %rcx,0x28(%rsp) 21: 48 c1 e9 03 shr $0x3,%rcx 25: 48 89 4c 24 58 mov %rcx,0x58(%rsp) * 2a: 42 0f b6 04 29 movzbl (%rcx,%r13,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 0f 85 39 04 00 00 jne 0x470 37: 45 8b 6c 24 14 mov 0x14(%r12),%r13d 3c: 31 ff xor %edi,%edi 3e: 89 de mov %ebx,%esi