================================================================== BUG: KASAN: slab-out-of-bounds in ext4_ext_binsearch fs/ext4/extents.c:837 [inline] BUG: KASAN: slab-out-of-bounds in ext4_find_extent+0x994/0xb6c fs/ext4/extents.c:953 Read of size 4 at addr ffff0000e1c4ad18 by task syz.0.344/5675 CPU: 1 PID: 5675 Comm: syz.0.344 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x220 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:427 kasan_report+0xa8/0x100 mm/kasan/report.c:531 __asan_report_load4_noabort+0x2c/0x38 mm/kasan/report_generic.c:350 ext4_ext_binsearch fs/ext4/extents.c:837 [inline] ext4_find_extent+0x994/0xb6c fs/ext4/extents.c:953 ext4_ext_map_blocks+0x240/0x559c fs/ext4/extents.c:4165 ext4_map_blocks+0x860/0x1770 fs/ext4/inode.c:679 _ext4_get_block+0x194/0x4c8 fs/ext4/inode.c:822 ext4_get_block_unwritten+0x3c/0x114 fs/ext4/inode.c:855 __block_write_begin_int+0x34c/0x13b8 fs/buffer.c:1991 __block_write_begin fs/buffer.c:2041 [inline] block_page_mkwrite+0x290/0x340 fs/buffer.c:2510 ext4_page_mkwrite+0x350/0x10a4 fs/ext4/inode.c:6313 do_page_mkwrite+0x13c/0x358 mm/memory.c:3011 wp_page_shared+0x148/0x550 mm/memory.c:3360 do_wp_page+0xca0/0xef0 mm/memory.c:3510 handle_pte_fault mm/memory.c:5049 [inline] __handle_mm_fault mm/memory.c:5173 [inline] handle_mm_fault+0x133c/0x2fd4 mm/memory.c:5294 __do_page_fault arch/arm64/mm/fault.c:499 [inline] do_page_fault+0x310/0x99c arch/arm64/mm/fault.c:583 do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:803 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:367 el1h_64_sync_handler+0x80/0xcc arch/arm64/kernel/entry-common.c:427 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:580 __arch_copy_to_user+0x104/0x234 arch/arm64/lib/copy_template.S:135 do_loop_readv_writev fs/read_write.c:-1 [inline] do_iter_read+0x3c0/0x8c4 fs/read_write.c:798 vfs_readv fs/read_write.c:916 [inline] do_preadv+0x1c0/0x2f0 fs/read_write.c:1008 __do_sys_preadv fs/read_write.c:1058 [inline] __se_sys_preadv fs/read_write.c:1053 [inline] __arm64_sys_preadv+0xa0/0xb8 fs/read_write.c:1053 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 4297: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505 __kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x74/0x43c mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc_lru+0x1b0/0x298 mm/slub.c:3429 alloc_inode_sb include/linux/fs.h:3245 [inline] alloc_inode fs/inode.c:263 [inline] new_inode_pseudo+0xdc/0x1cc fs/inode.c:1063 new_inode+0x38/0x174 fs/inode.c:1091 debugfs_get_inode fs/debugfs/inode.c:72 [inline] __debugfs_create_file+0x134/0x438 fs/debugfs/inode.c:432 debugfs_create_file+0x60/0x78 fs/debugfs/inode.c:489 debugfs_hw_add+0x398/0x3b4 net/mac80211/debugfs.c:710 ieee80211_register_hw+0x22a4/0x2e6c net/mac80211/main.c:1391 mac80211_hwsim_new_radio+0x2104/0x40dc drivers/net/wireless/mac80211_hwsim.c:4582 hwsim_new_radio_nl+0x878/0xbe0 drivers/net/wireless/mac80211_hwsim.c:5176 genl_family_rcv_msg_doit+0x1f8/0x2f4 net/netlink/genetlink.c:756 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0x444/0x62c net/netlink/genetlink.c:850 netlink_rcv_skb+0x208/0x3c4 net/netlink/af_netlink.c:2493 genl_rcv+0x38/0x50 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x600/0x818 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x6e8/0x9b0 net/netlink/af_netlink.c:1859 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x304/0x3fc net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2161 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000e1c4a880 which belongs to the cache inode_cache of size 1168 The buggy address is located 8 bytes to the right of 1168-byte region [ffff0000e1c4a880, ffff0000e1c4ad10) The buggy address belongs to the physical page: page:000000009d2ff959 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x121c48 head:000000009d2ff959 order:2 compound_mapcount:0 compound_pincount:0 memcg:ffff0000da511001 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c0852600 raw: 0000000000000000 00000000000c000c 00000001ffffffff ffff0000da511001 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e1c4ac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000e1c4ac80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000e1c4ad00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000e1c4ad80: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000e1c4ae00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop0): ext4_map_blocks:745: inode #15: block 3787745708: comm syz.0.344: lblock 300 mapped to illegal pblock 3787745708 (length 1) EXT4-fs error (device loop0): ext4_map_blocks:635: inode #15: block 3787745708: comm syz.0.344: lblock 300 mapped to illegal pblock 3787745708 (length 1)