================================================================== BUG: KASAN: slab-out-of-bounds in get_device_parent+0x71/0x410 drivers/base/core.c:3010 Read of size 8 at addr ffff88811d5e6b00 by task syz.8.4038/16047 CPU: 0 PID: 16047 Comm: syz.8.4038 Tainted: G W 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:0x7f60d53bc0d9 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:00007f60d3e15028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f60d5643fa0 RCX: 00007f60d53bc0d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f60d5453024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f60d5644038 R14: 00007f60d5643fa0 R15: 00007ffec472bcf8 Allocated by task 15105: 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 devinet_sysctl_register+0xaf/0x1e0 net/ipv4/devinet.c:2641 inetdev_init+0x2b2/0x500 net/ipv4/devinet.c:284 inetdev_event+0x1f4/0x1060 net/ipv4/devinet.c:1544 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 veth_newlink+0x6af/0xe20 drivers/net/veth.c:1683 __rtnl_newlink net/core/rtnetlink.c:3528 [inline] rtnl_newlink+0x137f/0x1900 net/core/rtnetlink.c:3576 rtnetlink_rcv_msg+0x9fd/0xcb0 net/core/rtnetlink.c:5654 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2516 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5672 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x86c/0xa30 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x879/0xb80 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x46d/0x620 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2071 x64_sys_call+0x178/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45 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 ffff88811d5e6800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 768 bytes inside of 1024-byte region [ffff88811d5e6800, ffff88811d5e6c00) The buggy address belongs to the page: page:ffffea0004757800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11d5e0 head:ffffea0004757800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea000468aa00 0000000400000004 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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 0, ts 15420979044, 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 __napi_alloc_skb+0x162/0x2e0 net/core/skbuff.c:569 napi_alloc_skb include/linux/skbuff.h:3102 [inline] page_to_skb+0x274/0xb60 drivers/net/virtio_net.c:474 receive_mergeable drivers/net/virtio_net.c:1102 [inline] receive_buf+0xcd3/0x4bc0 drivers/net/virtio_net.c:1212 virtnet_receive drivers/net/virtio_net.c:1504 [inline] virtnet_poll+0x510/0xe90 drivers/net/virtio_net.c:1617 __napi_poll+0xbb/0x580 net/core/dev.c:7109 napi_poll net/core/dev.c:7176 [inline] net_rx_action+0x37f/0x910 net/core/dev.c:7266 handle_softirqs+0x250/0x560 kernel/softirq.c:583 page_owner free stack trace missing Memory state around the buggy address: ffff88811d5e6a00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff88811d5e6a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811d5e6b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88811d5e6b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811d5e6c00: 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: 16047 Comm: syz.8.4038 Tainted: G B W 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 30 25 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:ffffc90000db74a0 EFLAGS: 00010203 RAX: ffffffff826f91b0 RBX: 0000000000000000 RCX: 0000000000000004 RDX: 0000000000000000 RSI: ffff888128961640 RDI: 0000000000000010 RBP: ffffc90000db75f0 R08: 0000000000000a20 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001b6eb0 R12: 0000000000000010 R13: dffffc0000000000 R14: 1ffff920001b6ea0 R15: 0000000000000001 FS: 00007f60d3e156c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010f30b000 CR4: 00000000003526b0 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:0x7f60d53bc0d9 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:00007f60d3e15028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f60d5643fa0 RCX: 00007f60d53bc0d9 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f60d5453024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f60d5644038 R14: 00007f60d5643fa0 R15: 00007ffec472bcf8 Modules linked in: ---[ end trace 8495f8a39b38430f ]--- 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 30 25 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:ffffc90000db74a0 EFLAGS: 00010203 RAX: ffffffff826f91b0 RBX: 0000000000000000 RCX: 0000000000000004 RDX: 0000000000000000 RSI: ffff888128961640 RDI: 0000000000000010 RBP: ffffc90000db75f0 R08: 0000000000000a20 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001b6eb0 R12: 0000000000000010 R13: dffffc0000000000 R14: 1ffff920001b6ea0 R15: 0000000000000001 FS: 00007f60d3e156c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010f30b000 CR4: 00000000003526b0 ---------------- 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 30 25 fa fe call 0xfefa2547 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