EXT4-fs error (device loop2): ext4_readdir:260: inode #2: block 16: comm syz-executor: path /8/bus: bad entry in directory: rec_len is smaller than minimal - offset=980, inode=0, rec_len=0, size=1024 fake=0 ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_read_inline_data fs/ext4/inline.c:209 [inline] BUG: KASAN: slab-out-of-bounds in ext4_read_inline_dir+0x48b/0xdf0 fs/ext4/inline.c:1483 Read of size 68 at addr ffff88802a0f251a by task syz-executor/5573 CPU: 1 UID: 0 PID: 5573 Comm: syz-executor Not tainted 6.10.0-syzkaller-12857-g910bfc26d16d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ext4_read_inline_data fs/ext4/inline.c:209 [inline] ext4_read_inline_dir+0x48b/0xdf0 fs/ext4/inline.c:1483 ext4_readdir+0x3bb/0x3500 fs/ext4/dir.c:158 iterate_dir+0x57a/0x810 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:392 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f32b31a9333 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 02 45 f8 ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 d8 RSP: 002b:00007fff40048638 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555585a5e640 RCX: 00007f32b31a9333 RDX: 0000000000008000 RSI: 0000555585a5e640 RDI: 0000000000000006 RBP: 0000555585a5e614 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000016 R14: 0000555585a5e610 R15: 00007fff4004b9d0 Allocated by task 1: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __kmalloc_cache_noprof+0x19c/0x2c0 mm/slub.c:4189 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] snd_timer_new+0xd3/0x640 sound/core/timer.c:921 snd_pcm_timer_init+0x25b/0x6a0 sound/core/pcm_timer.c:108 snd_pcm_dev_register+0x453/0x7f0 sound/core/pcm.c:1076 __snd_device_register sound/core/device.c:149 [inline] snd_device_register_all+0xc9/0x1a0 sound/core/device.c:197 snd_card_register+0x1d9/0x6c0 sound/core/init.c:889 snd_dummy_probe+0x107e/0x18a0 sound/drivers/dummy.c:1094 platform_probe+0x13a/0x1c0 drivers/base/platform.c:1404 really_probe+0x2b8/0xad0 drivers/base/dd.c:657 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:799 driver_probe_device+0x50/0x430 drivers/base/dd.c:829 __device_attach_driver+0x2d6/0x530 drivers/base/dd.c:957 bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457 __device_attach+0x333/0x520 drivers/base/dd.c:1029 bus_probe_device+0x189/0x260 drivers/base/bus.c:532 device_add+0x856/0xbf0 drivers/base/core.c:3679 platform_device_add+0x45d/0x7c0 drivers/base/platform.c:716 platform_device_register_full+0x5eb/0x6f0 drivers/base/platform.c:844 platform_device_register_resndata include/linux/platform_device.h:169 [inline] platform_device_register_simple include/linux/platform_device.h:198 [inline] alsa_card_dummy_init+0x1dd/0x3d0 sound/drivers/dummy.c:1158 do_one_initcall+0x248/0x880 init/main.c:1267 do_initcall_level+0x157/0x210 init/main.c:1329 do_initcalls+0x3f/0x80 init/main.c:1345 kernel_init_freeable+0x435/0x5d0 init/main.c:1578 kernel_init+0x1d/0x2b0 init/main.c:1467 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88802a0f2000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 778 bytes to the right of allocated 528-byte region [ffff88802a0f2000, ffff88802a0f2210) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2a0f0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000040 ffff888015441dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000 head: 00fff00000000040 ffff888015441dc0 dead000000000122 0000000000000000 head: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000 head: 00fff00000000003 ffffea0000a83c01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 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, tgid 1 (swapper/0), ts 12275248497, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2321 allocate_slab+0x5a/0x2f0 mm/slub.c:2484 new_slab mm/slub.c:2537 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723 __slab_alloc+0x58/0xa0 mm/slub.c:3813 __slab_alloc_node mm/slub.c:3866 [inline] slab_alloc_node mm/slub.c:4025 [inline] __kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4184 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] snd_timer_new+0xd3/0x640 sound/core/timer.c:921 snd_pcm_timer_init+0x25b/0x6a0 sound/core/pcm_timer.c:108 snd_pcm_dev_register+0x453/0x7f0 sound/core/pcm.c:1076 __snd_device_register sound/core/device.c:149 [inline] snd_device_register_all+0xc9/0x1a0 sound/core/device.c:197 snd_card_register+0x1d9/0x6c0 sound/core/init.c:889 snd_dummy_probe+0x107e/0x18a0 sound/drivers/dummy.c:1094 platform_probe+0x13a/0x1c0 drivers/base/platform.c:1404 really_probe+0x2b8/0xad0 drivers/base/dd.c:657 page_owner free stack trace missing Memory state around the buggy address: ffff88802a0f2400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802a0f2480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802a0f2500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802a0f2580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802a0f2600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================