================================================================== BUG: KASAN: slab-out-of-bounds in ext4_ext_correct_indexes+0x72/0x5b0 fs/ext4/extents.c:1717 Read of size 8 at addr ffff8880328a6650 by task syz.4.50/6251 CPU: 1 UID: 0 PID: 6251 Comm: syz.4.50 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ext4_ext_correct_indexes+0x72/0x5b0 fs/ext4/extents.c:1717 ext4_ext_insert_extent+0x1fdd/0x4af0 fs/ext4/extents.c:2193 ext4_ext_map_blocks+0x1a3a/0x6c80 fs/ext4/extents.c:4435 ext4_map_create_blocks fs/ext4/inode.c:613 [inline] ext4_map_blocks+0x82c/0x16f0 fs/ext4/inode.c:816 _ext4_get_block+0x1fa/0x4c0 fs/ext4/inode.c:916 ext4_get_block_unwritten+0x2e/0x100 fs/ext4/inode.c:949 ext4_block_write_begin+0xb03/0x1940 fs/ext4/inode.c:1203 ext4_write_begin+0xb3a/0x1860 fs/ext4/ext4_jbd2.h:-1 ext4_da_write_begin+0x352/0xd30 fs/ext4/inode.c:3130 generic_perform_write+0x2c5/0x900 mm/filemap.c:4314 ext4_buffered_write_iter+0xce/0x3a0 fs/ext4/file.c:299 ext4_file_write_iter+0x292/0x1bc0 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_pwrite64 fs/read_write.c:793 [inline] __do_sys_pwrite64 fs/read_write.c:801 [inline] __se_sys_pwrite64 fs/read_write.c:798 [inline] __x64_sys_pwrite64+0x193/0x220 fs/read_write.c:798 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0c9a38f749 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:00007f0c9b253038 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007f0c9a5e5fa0 RCX: 00007f0c9a38f749 RDX: 000000000000fdef RSI: 0000200000000140 RDI: 0000000000000004 RBP: 00007f0c9a413f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000e7c R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0c9a5e6038 R14: 00007f0c9a5e5fa0 R15: 00007ffdf7558218 Allocated by task 5493: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5267 [inline] kmem_cache_alloc_noprof+0x37d/0x710 mm/slub.c:5274 __kernfs_new_node+0xdc/0x880 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:716 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1057 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:313 create_files fs/sysfs/group.c:82 [inline] internal_create_group+0x667/0x1170 fs/sysfs/group.c:189 internal_create_groups fs/sysfs/group.c:229 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:255 device_add_groups drivers/base/core.c:2836 [inline] device_add_attrs+0x1c4/0x5a0 drivers/base/core.c:2911 device_add+0x496/0xb80 drivers/base/core.c:3643 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:2358 register_netdevice+0x1246/0x1a70 net/core/dev.c:11392 bpq_new_device drivers/net/hamradio/bpqether.c:481 [inline] bpq_device_event+0x526/0x6c0 drivers/net/hamradio/bpqether.c:523 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2269 [inline] call_netdevice_notifiers net/core/dev.c:2283 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9803 dev_change_flags+0x130/0x260 net/core/dev_api.c:68 devinet_ioctl+0x9ea/0x1b20 net/ipv4/devinet.c:1199 inet_ioctl+0x3c0/0x4c0 net/ipv4/af_inet.c:1009 sock_do_ioctl+0xdc/0x300 net/socket.c:1269 sock_ioctl+0x576/0x790 net/socket.c:1390 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880328a65a0 which belongs to the cache kernfs_node_cache of size 176 The buggy address is located 0 bytes to the right of allocated 176-byte region [ffff8880328a65a0, ffff8880328a6650) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x328a6 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801bec5dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000110011 00000000f5000000 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 18980548060, free_ts 18979892366 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5255 [inline] kmem_cache_alloc_noprof+0x40f/0x710 mm/slub.c:5274 __kernfs_new_node+0xdc/0x880 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:716 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1057 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:313 create_files fs/sysfs/group.c:82 [inline] internal_create_group+0x667/0x1170 fs/sysfs/group.c:189 kernel_add_sysfs_param+0xa3/0xe0 kernel/params.c:814 param_sysfs_builtin+0x18a/0x230 kernel/params.c:851 param_sysfs_builtin_init+0x23/0x30 kernel/params.c:987 page last free pid 3561 tgid 3561 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 __kasan_populate_vmalloc_do mm/kasan/shadow.c:393 [inline] __kasan_populate_vmalloc+0x1b2/0x1d0 mm/kasan/shadow.c:424 kasan_populate_vmalloc include/linux/kasan.h:580 [inline] alloc_vmap_area+0xdc4/0x14e0 mm/vmalloc.c:2162 __get_vm_area_node+0x1f8/0x300 mm/vmalloc.c:3257 __vmalloc_node_range_noprof+0x371/0x16a0 mm/vmalloc.c:4049 __vmalloc_node_noprof+0xc2/0x110 mm/vmalloc.c:4149 alloc_thread_stack_node kernel/fork.c:359 [inline] dup_task_struct+0x228/0x9a0 kernel/fork.c:926 copy_process+0x4ea/0x3950 kernel/fork.c:2056 kernel_clone+0x21e/0x820 kernel/fork.c:2655 user_mode_thread+0xdd/0x140 kernel/fork.c:2731 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171 process_one_work+0x93a/0x15a0 kernel/workqueue.c:3279 process_scheduled_works kernel/workqueue.c:3362 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3443 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff8880328a6500: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff8880328a6580: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880328a6600: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff8880328a6680: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880328a6700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================