================================================================== BUG: KASAN: slab-out-of-bounds in kobject_get+0x113/0x120 lib/kobject.c:663 Read of size 1 at addr ffff888111d6383c by task syz.9.902/4230 CPU: 0 PID: 4230 Comm: syz.9.902 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x100/0x140 mm/kasan/report.c:452 __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:3363 [inline] device_add+0x331/0xc00 drivers/base/core.c:3193 device_create_groups_vargs drivers/base/core.c:3962 [inline] device_create+0x26c/0x300 drivers/base/core.c:4004 create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:31 create_alsa_device drivers/usb/gadget/function/f_midi.c:1266 [inline] f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1307 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:636 configfs_mkdir+0x5d2/0xd90 fs/configfs/dir.c:1378 vfs_mkdir+0x42c/0x600 fs/namei.c:3840 do_mkdirat+0x14c/0x340 fs/namei.c:3862 __do_sys_mkdirat fs/namei.c:3873 [inline] __se_sys_mkdirat fs/namei.c:3871 [inline] __x64_sys_mkdirat+0x7b/0x90 fs/namei.c:3871 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f4f5b4a0a99 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:00007f4f59eac028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f4f5b72d190 RCX: 00007f4f5b4a0a99 RDX: 00000000000001ff RSI: 0000200000000300 RDI: ffffffffffffff9c RBP: 00007f4f5b53018b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4f5b72d228 R14: 00007f4f5b72d190 R15: 00007ffdd5a14758 Allocated by task 2749: 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:430 [inline] ____kasan_kmalloc mm/kasan/common.c:509 [inline] __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] __kmalloc+0x19f/0x330 mm/slub.c:4038 __kmalloc_node include/linux/slab.h:421 [inline] kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x88/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:833 [inline] kvmalloc_array include/linux/mm.h:851 [inline] __ptr_ring_init_queue_alloc include/linux/ptr_ring.h:471 [inline] ptr_ring_init include/linux/ptr_ring.h:489 [inline] veth_napi_add drivers/net/veth.c:883 [inline] veth_enable_xdp+0x38b/0x880 drivers/net/veth.c:947 veth_xdp_set drivers/net/veth.c:1176 [inline] veth_xdp+0x37a/0x5e0 drivers/net/veth.c:1216 dev_xdp_install+0xf2/0x250 net/core/dev.c:9149 dev_xdp_attach+0x8a8/0xb30 net/core/dev.c:9287 dev_change_xdp_fd+0x19d/0x220 net/core/dev.c:9533 do_setlink+0x22be/0x29a0 net/core/rtnetlink.c:2961 rtnl_group_changelink net/core/rtnetlink.c:3263 [inline] __rtnl_newlink net/core/rtnetlink.c:3432 [inline] rtnl_newlink+0xf1c/0x1830 net/core/rtnetlink.c:3542 rtnetlink_rcv_msg+0x9e9/0xca0 net/core/rtnetlink.c:5622 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2524 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5640 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x993/0xb70 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x949/0xb70 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2377 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2431 __sys_sendmsg net/socket.c:2460 [inline] __do_sys_sendmsg net/socket.c:2469 [inline] __se_sys_sendmsg net/socket.c:2467 [inline] __x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2467 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888111d63000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 60 bytes to the right of 2048-byte region [ffff888111d63000, ffff888111d63800) The buggy address belongs to the page: page:ffffea0004475800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111d60 head:ffffea0004475800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042d80 raw: 0000000000000000 0000000000080008 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 2749, ts 114631057329, free_ts 114621897947 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2457 [inline] prep_new_page+0x176/0x190 mm/page_alloc.c:2463 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4262 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5392 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] __kmalloc+0x1f9/0x330 mm/slub.c:4034 __kmalloc_node include/linux/slab.h:421 [inline] kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x88/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:833 [inline] kvmalloc_array include/linux/mm.h:851 [inline] __ptr_ring_init_queue_alloc include/linux/ptr_ring.h:471 [inline] ptr_ring_init include/linux/ptr_ring.h:489 [inline] veth_napi_add drivers/net/veth.c:883 [inline] veth_enable_xdp+0x38b/0x880 drivers/net/veth.c:947 veth_xdp_set drivers/net/veth.c:1176 [inline] veth_xdp+0x37a/0x5e0 drivers/net/veth.c:1216 dev_xdp_install+0xf2/0x250 net/core/dev.c:9149 dev_xdp_attach+0x8a8/0xb30 net/core/dev.c:9287 dev_change_xdp_fd+0x19d/0x220 net/core/dev.c:9533 do_setlink+0x22be/0x29a0 net/core/rtnetlink.c:2961 rtnl_group_changelink net/core/rtnetlink.c:3263 [inline] __rtnl_newlink net/core/rtnetlink.c:3432 [inline] rtnl_newlink+0xf1c/0x1830 net/core/rtnetlink.c:3542 rtnetlink_rcv_msg+0x9e9/0xca0 net/core/rtnetlink.c:5622 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1350 [inline] __free_pages_ok+0x80b/0x830 mm/page_alloc.c:1630 free_the_page mm/page_alloc.c:5453 [inline] __free_pages+0xd8/0x390 mm/page_alloc.c:5462 __free_slab+0xcf/0x190 mm/slub.c:1899 free_slab mm/slub.c:1914 [inline] discard_slab mm/slub.c:1920 [inline] unfreeze_partials+0x150/0x180 mm/slub.c:2415 put_cpu_partial+0xc1/0x180 mm/slub.c:2451 __slab_free+0x2c9/0x3a0 mm/slub.c:3100 do_slab_free mm/slub.c:3196 [inline] ___cache_free+0x10e/0x130 mm/slub.c:3215 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x14a/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] __kmalloc+0x17b/0x330 mm/slub.c:4034 __kmalloc_node include/linux/slab.h:421 [inline] kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x88/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:833 [inline] kvmalloc_array include/linux/mm.h:851 [inline] __ptr_ring_init_queue_alloc include/linux/ptr_ring.h:471 [inline] ptr_ring_init include/linux/ptr_ring.h:489 [inline] veth_napi_add drivers/net/veth.c:883 [inline] veth_enable_xdp+0x38b/0x880 drivers/net/veth.c:947 veth_xdp_set drivers/net/veth.c:1176 [inline] veth_xdp+0x37a/0x5e0 drivers/net/veth.c:1216 Memory state around the buggy address: ffff888111d63700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888111d63780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888111d63800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888111d63880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888111d63900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------