EXT4-fs: Ignoring removed oldalloc option EXT4-fs (loop1): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_ext_binsearch fs/ext4/extents.c:840 [inline] BUG: KASAN: slab-out-of-bounds in ext4_find_extent+0x94c/0xb0c fs/ext4/extents.c:955 Read of size 4 at addr ffff0000cf800c64 by task syz.1.82/6949 CPU: 0 UID: 0 PID: 6949 Comm: syz.1.82 Tainted: G W 6.13.0-rc6-syzkaller-g6251d1776bc5 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 ext4_ext_binsearch fs/ext4/extents.c:840 [inline] ext4_find_extent+0x94c/0xb0c fs/ext4/extents.c:955 ext4_ext_map_blocks+0x2b0/0x6600 fs/ext4/extents.c:4205 ext4_map_create_blocks fs/ext4/inode.c:516 [inline] ext4_map_blocks+0x710/0x15d0 fs/ext4/inode.c:702 _ext4_get_block+0x1c8/0x5f0 fs/ext4/inode.c:781 ext4_get_block+0x4c/0x60 fs/ext4/inode.c:798 ext4_block_write_begin+0x374/0xf24 fs/ext4/inode.c:1063 ext4_write_begin+0x61c/0x115c ext4_da_write_begin+0x354/0x98c fs/ext4/inode.c:2925 generic_perform_write+0x29c/0x868 mm/filemap.c:4046 ext4_buffered_write_iter+0x2c0/0x4ec fs/ext4/file.c:299 ext4_file_write_iter+0x1b4/0x1960 fs/ext4/file.c:717 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x920/0xcf4 fs/read_write.c:679 ksys_pwrite64 fs/read_write.c:786 [inline] __do_sys_pwrite64 fs/read_write.c:794 [inline] __se_sys_pwrite64 fs/read_write.c:791 [inline] __arm64_sys_pwrite64+0x188/0x220 fs/read_write.c:791 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 1: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x2cc/0x428 mm/slub.c:4329 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] vim2m_probe+0x64/0x3f8 drivers/media/test-drivers/vim2m.c:1300 platform_probe+0x148/0x1c0 drivers/base/platform.c:1404 really_probe+0x38c/0x8fc drivers/base/dd.c:658 __driver_probe_device+0x194/0x374 drivers/base/dd.c:800 driver_probe_device+0x78/0x330 drivers/base/dd.c:830 __driver_attach+0x3dc/0x648 drivers/base/dd.c:1216 bus_for_each_dev+0x20c/0x298 drivers/base/bus.c:370 driver_attach+0x4c/0x5c drivers/base/dd.c:1234 bus_add_driver+0x2f0/0x5d4 drivers/base/bus.c:675 driver_register+0x220/0x30c drivers/base/driver.c:246 __platform_driver_register+0x74/0x8c drivers/base/platform.c:867 vim2m_init+0x4c/0x8c drivers/media/test-drivers/vim2m.c:1415 do_one_initcall+0x254/0x9f8 init/main.c:1266 do_initcall_level+0x154/0x214 init/main.c:1328 do_initcalls+0x58/0xac init/main.c:1344 do_basic_setup+0x8c/0xa0 init/main.c:1363 kernel_init_freeable+0x324/0x478 init/main.c:1577 kernel_init+0x24/0x2a0 init/main.c:1466 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 The buggy address belongs to the object at ffff0000cf800000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 260 bytes to the right of allocated 2912-byte region [ffff0000cf800000, ffff0000cf800b60) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f800 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0002140 fffffdffc3235200 dead000000000002 raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0002140 fffffdffc3235200 dead000000000002 head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc33e0001 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cf800b00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff0000cf800b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000cf800c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000cf800c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cf800d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================