================================================================== BUG: KASAN: slab-out-of-bounds in get_device_parent+0x71/0x410 drivers/base/core.c:3269 Read of size 8 at addr ffff888113c90300 by task syz.2.386/1950 CPU: 0 PID: 1950 Comm: syz.2.386 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: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_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351 get_device_parent+0x71/0x410 drivers/base/core.c:3269 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:0x7f3bbbb9e159 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:00007f3bbca29028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f3bbbe25fa0 RCX: 00007f3bbbb9e159 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f3bbbc3506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3bbbe26038 R14: 00007f3bbbe25fa0 R15: 00007ffccbc44de8 Allocated by task 1759: 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+0xb4/0x1e0 mm/slab_common.c:951 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] __register_sysctl_table+0xd9/0xe50 fs/proc/proc_sysctl.c:1345 register_net_sysctl+0x23f/0x250 net/sysctl_net.c:169 neigh_sysctl_register+0x9a0/0xa80 net/core/neighbour.c:3860 addrconf_sysctl_register+0xb3/0x1a0 net/ipv6/addrconf.c:7235 ipv6_add_dev+0xbf5/0x1130 net/ipv6/addrconf.c:455 addrconf_notify+0x6d0/0xe30 net/ipv6/addrconf.c:3621 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+0x119/0x190 net/core/dev.c:2074 register_netdevice+0x1186/0x1550 net/core/dev.c:10239 xfrmi_create net/xfrm/xfrm_interface_core.c:253 [inline] xfrmi_newlink+0x4ff/0x700 net/xfrm/xfrm_interface_core.c:851 rtnl_newlink_create net/core/rtnetlink.c:3426 [inline] __rtnl_newlink net/core/rtnetlink.c:3646 [inline] rtnl_newlink+0x14dc/0x20d0 net/core/rtnetlink.c:3659 rtnetlink_rcv_msg+0xb28/0xde0 net/core/rtnetlink.c:6154 netlink_rcv_skb+0x200/0x450 net/netlink/af_netlink.c:2526 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6172 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x8c1/0xa60 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] __sys_sendto+0x4ac/0x660 net/socket.c:2143 __do_sys_sendto net/socket.c:2155 [inline] __se_sys_sendto net/socket.c:2151 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2151 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45 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 devinet_sysctl_unregister net/ipv4/devinet.c:2664 [inline] inetdev_destroy net/ipv4/devinet.c:329 [inline] inetdev_event+0x839/0x10a0 net/ipv4/devinet.c:1615 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 ffff888113c90000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 768 bytes inside of 1024-byte region [ffff888113c90000, ffff888113c90400) The buggy address belongs to the physical page: page:ffffea00044f2400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888113c96800 pfn:0x113c90 head:ffffea00044f2400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea00044ea408 ffffea00044bf408 ffff888100043080 raw: ffff888113c96800 000000000010000d 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 289, tgid 289 (syz-executor), ts 33655475222, free_ts 33638497397 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_node+0xa2/0x1e0 mm/slab_common.c:945 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x28a/0x460 mm/util.c:592 kvmalloc include/linux/slab.h:716 [inline] xt_alloc_table_info+0x3b/0xa0 net/netfilter/x_tables.c:1215 ipt_register_table+0xcd/0x7b0 net/ipv4/netfilter/ip_tables.c:1734 iptable_security_table_init+0x41/0x60 net/ipv4/netfilter/iptable_security.c:46 xt_find_table_lock+0x2b6/0x410 net/netfilter/x_tables.c:1282 xt_request_find_table_lock+0x27/0x100 net/netfilter/x_tables.c:1307 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1581 [inline] free_pcp_prepare mm/page_alloc.c:1655 [inline] free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622 free_unref_page+0x93/0x530 mm/page_alloc.c:3720 free_the_page mm/page_alloc.c:863 [inline] __free_pages+0x67/0x100 mm/page_alloc.c:6021 __free_slab+0xc7/0x1a0 mm/slub.c:2044 free_slab mm/slub.c:2059 [inline] discard_slab mm/slub.c:2065 [inline] __unfreeze_partials+0x15a/0x190 mm/slub.c:2614 put_cpu_partial+0xa9/0x100 mm/slub.c:2690 __slab_free+0x1c4/0x280 mm/slub.c:3589 do_slab_free mm/slub.c:3666 [inline] ___cache_free+0xbf/0xd0 mm/slub.c:3722 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0xc6/0x140 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:311 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768 slab_alloc_node mm/slub.c:3382 [inline] __kmem_cache_alloc_node+0x194/0x2d0 mm/slub.c:3423 kmalloc_trace+0x29/0xb0 mm/slab_common.c:1028 kmalloc include/linux/slab.h:563 [inline] get_mountpoint+0x20b/0x440 fs/namespace.c:800 attach_recursive_mnt+0x154/0x1530 fs/namespace.c:2227 Memory state around the buggy address: ffff888113c90200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff888113c90280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888113c90300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888113c90380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888113c90400: 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: 1950 Comm: syz.2.386 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 ca 83 fc 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:ffffc90000dd74c0 EFLAGS: 00010203 RAX: ffffffff84eda410 RBX: 0000000000000000 RCX: 0000000000000004 RDX: ffffc90000e09000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000dd7610 R08: 0000000000000a20 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001baeb4 R12: 0000000000000010 R13: dffffc0000000000 R14: 1ffff920001baea4 R15: 0000000000000001 FS: 00007f3bbca296c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3bb4000020 CR3: 000000013cd59000 CR4: 00000000003526b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000004ceb631 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: __kernfs_new_node+0x130/0x670 fs/kernfs/dir.c:620 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:690 kernfs_create_dir_ns+0x47/0x130 fs/kernfs/dir.c:1046 sysfs_create_dir_ns+0x128/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x718/0xc20 lib/kobject.c:231 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:0x7f3bbbb9e159 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:00007f3bbca29028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f3bbbe25fa0 RCX: 00007f3bbbb9e159 RDX: 00000000000001ff RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f3bbbc3506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3bbbe26038 R14: 00007f3bbbe25fa0 R15: 00007ffccbc44de8 Modules linked in: ---[ end trace 0000000000000000 ]--- 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 ca 83 fc 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:ffffc90000dd74c0 EFLAGS: 00010203 RAX: ffffffff84eda410 RBX: 0000000000000000 RCX: 0000000000000004 RDX: ffffc90000e09000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000dd7610 R08: 0000000000000a20 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520001baeb4 R12: 0000000000000010 R13: dffffc0000000000 R14: 1ffff920001baea4 R15: 0000000000000001 FS: 00007f3bbca296c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3bb4000020 CR3: 000000013cd59000 CR4: 00000000003526b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000004ceb631 DR6: 00000000ffff0ff0 DR7: 0000000000000400 ---------------- 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 ca 83 fc call 0xfc83ca47 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