loop3: detected capacity change from 0 to 128 VFS: Found a Xenix FS (block size = 1024) on device loop3 ================================================================== BUG: KASAN: slab-out-of-bounds in sysv_new_inode+0x1062/0x11f0 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff8880237041ce by task syz.3.33/4390 CPU: 0 PID: 4390 Comm: syz.3.33 Not tainted 5.15.179-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 sysv_new_inode+0x1062/0x11f0 fs/sysv/ialloc.c:153 sysv_mknod+0x4a/0xe0 fs/sysv/namei.c:53 lookup_open fs/namei.c:3462 [inline] open_last_lookups fs/namei.c:3532 [inline] path_openat+0x130a/0x2f20 fs/namei.c:3739 do_filp_open+0x21c/0x460 fs/namei.c:3769 do_sys_openat2+0x13b/0x4f0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fe84be15169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe849c7e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fe84c02dfa0 RCX: 00007fe84be15169 RDX: 0000000000141042 RSI: 0000200000000040 RDI: ffffffffffffff9c RBP: 00007fe84be962a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fe84c02dfa0 R15: 00007ffc077e0fe8 Allocated by task 1: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8e/0xc0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0xf3/0x280 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xdb/0x750 fs/kernfs/dir.c:593 kernfs_new_node+0x136/0x230 fs/kernfs/dir.c:669 kernfs_create_link+0xa1/0x1f0 fs/kernfs/symlink.c:39 sysfs_do_create_link_sd+0x85/0x100 fs/sysfs/symlink.c:44 device_add_class_symlinks drivers/base/core.c:3141 [inline] device_add+0x6b5/0xfd0 drivers/base/core.c:3360 device_create_groups_vargs drivers/base/core.c:4096 [inline] device_create+0x253/0x2e0 drivers/base/core.c:4138 mon_bin_add+0xad/0x120 drivers/usb/mon/mon_bin.c:1369 mon_bus_init+0x169/0x290 drivers/usb/mon/mon_main.c:302 mon_bus_add drivers/usb/mon/mon_main.c:199 [inline] mon_notify+0x10e/0x3f0 drivers/usb/mon/mon_main.c:230 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x104/0x1b0 kernel/notifier.c:318 usb_register_bus drivers/usb/core/hcd.c:935 [inline] usb_add_hcd+0x48f/0x1250 drivers/usb/core/hcd.c:2887 dummy_hcd_probe+0x154/0x2a0 drivers/usb/gadget/udc/dummy_hcd.c:2675 platform_probe+0x131/0x1b0 drivers/base/platform.c:1391 really_probe+0x24e/0xb60 drivers/base/dd.c:595 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755 driver_probe_device+0x50/0x420 drivers/base/dd.c:785 __device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429 __device_attach+0x359/0x570 drivers/base/dd.c:979 bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489 device_add+0xb48/0xfd0 drivers/base/core.c:3412 platform_device_add+0x46e/0x7d0 drivers/base/platform.c:712 init+0x83b/0x1070 drivers/usb/gadget/udc/dummy_hcd.c:2828 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff8880237040e8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 62 bytes to the right of 168-byte region [ffff8880237040e8, ffff888023704190) The buggy address belongs to the page: page:ffffea00008dc100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23704 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880175eab40 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 10311144080, free_ts 9283671576 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192 __alloc_pages+0x272/0x700 mm/page_alloc.c:5466 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x18e/0x280 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xdb/0x750 fs/kernfs/dir.c:593 kernfs_new_node+0x136/0x230 fs/kernfs/dir.c:669 kernfs_create_link+0xa1/0x1f0 fs/kernfs/symlink.c:39 sysfs_do_create_link_sd+0x85/0x100 fs/sysfs/symlink.c:44 device_add_class_symlinks drivers/base/core.c:3134 [inline] device_add+0x610/0xfd0 drivers/base/core.c:3360 device_create_groups_vargs drivers/base/core.c:4096 [inline] device_create+0x253/0x2e0 drivers/base/core.c:4138 mon_bin_add+0xad/0x120 drivers/usb/mon/mon_bin.c:1369 mon_bus_init+0x169/0x290 drivers/usb/mon/mon_main.c:302 mon_bus_add drivers/usb/mon/mon_main.c:199 [inline] mon_notify+0x10e/0x3f0 drivers/usb/mon/mon_main.c:230 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x104/0x1b0 kernel/notifier.c:318 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 mm_free_pgd kernel/fork.c:653 [inline] __mmdrop+0xac/0x3e0 kernel/fork.c:704 free_bprm+0x135/0x2f0 fs/exec.c:1494 kernel_execve+0x3bd/0x9b0 fs/exec.c:2015 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888023704080: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 ffff888023704100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888023704180: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ^ ffff888023704200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ffff888023704280: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 ==================================================================