================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:826 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 Read of size 4 at addr ffff888116826124 by task syz.3.19/515 CPU: 0 PID: 515 Comm: syz.3.19 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:826 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 ext4_ext_remove_space+0x306/0x4920 fs/ext4/extents.c:2829 ext4_punch_hole+0x6f8/0xad0 fs/ext4/inode.c:4217 ext4_fallocate+0x271/0x1a70 fs/ext4/extents.c:4758 vfs_fallocate+0x4b4/0x590 fs/open.c:310 ksys_fallocate fs/open.c:333 [inline] __do_sys_fallocate fs/open.c:341 [inline] __se_sys_fallocate fs/open.c:339 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:339 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f8ae2e2ede9 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:00007f8ae2880038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f8ae3048080 RCX: 00007f8ae2e2ede9 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f8ae2eb02a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001a00 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8ae3048080 R15: 00007fff79d37308 The buggy address belongs to the page: page:ffffea00045a0980 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116826 flags: 0x4000000000000000() raw: 4000000000000000 0000000000000000 ffffea00045a0988 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 95, ts 4074950613, free_ts 48563839068 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc_trace+0x1b3/0x2e0 mm/slub.c:2977 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] uevent_show+0x160/0x330 drivers/base/core.c:2295 dev_attr_show+0x56/0xd0 drivers/base/core.c:2002 sysfs_kf_seq_show+0x266/0x3d0 fs/sysfs/file.c:61 kernfs_seq_show+0x119/0x160 fs/kernfs/file.c:168 seq_read_iter+0x490/0xd30 fs/seq_file.c:230 kernfs_fop_read_iter+0x147/0x470 fs/kernfs/file.c:241 call_read_iter include/linux/fs.h:2060 [inline] new_sync_read fs/read_write.c:415 [inline] vfs_read+0x874/0xa10 fs/read_write.c:496 ksys_read+0x140/0x240 fs/read_write.c:634 __do_sys_read fs/read_write.c:644 [inline] __se_sys_read fs/read_write.c:642 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:642 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] __free_pages_ok+0x7fc/0x820 mm/page_alloc.c:1629 free_the_page mm/page_alloc.c:5431 [inline] __free_pages+0xdd/0x380 mm/page_alloc.c:5440 __free_slab+0xcf/0x190 mm/slub.c:1899 free_slab mm/slub.c:1914 [inline] discard_slab mm/slub.c:1920 [inline] unfreeze_partials+0x15f/0x190 mm/slub.c:2415 put_cpu_partial+0xc1/0x180 mm/slub.c:2451 __slab_free+0x2c9/0x3a0 mm/slub.c:3100 do_slab_free mm/slub.c:3196 [inline] ___cache_free+0x111/0x130 mm/slub.c:3215 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x14a/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xf0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x165/0x2e0 mm/slub.c:2965 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x9e/0x520 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] nlmsg_new include/net/netlink.h:953 [inline] netlink_ack+0x3a6/0xb80 net/netlink/af_netlink.c:2438 netlink_rcv_skb+0x265/0x430 net/netlink/af_netlink.c:2509 Memory state around the buggy address: ffff888116826000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888116826080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888116826100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888116826180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888116826200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ext4/extents.c:3181! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 515 Comm: syz.3.19 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 RIP: 0010:ext4_split_extent_at+0xe6e/0xe90 fs/ext4/extents.c:3181 Code: 48 89 df 48 89 74 24 68 e8 1f 7e d3 ff 48 8b 74 24 68 e9 5a fb ff ff e8 b0 8e 99 ff 0f 0b e8 a9 8e 99 ff 0f 0b e8 a2 8e 99 ff <0f> 0b e8 9b 8e 99 ff 0f 0b e8 94 8e 99 ff 0f 0b e8 8d 8e 99 ff 0f RSP: 0018:ffffc90000f97900 EFLAGS: 00010293 RAX: ffffffff81ca176e RBX: 0000000000000000 RCX: ffff888119184f00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffc90000f97a70 R08: 0000000000000000 R09: 0000000050000028 R10: fffffbfff0d8ee48 R11: 1ffffffff0d8ee48 R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff11022d0fe46 R15: 0000000000000000 FS: 00007f8ae28806c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000040000003207f CR3: 00000001179b8000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_force_split_extent_at fs/ext4/extents.c:318 [inline] ext4_ext_remove_space+0x677/0x4920 fs/ext4/extents.c:2875 ext4_punch_hole+0x6f8/0xad0 fs/ext4/inode.c:4217 ext4_fallocate+0x271/0x1a70 fs/ext4/extents.c:4758 vfs_fallocate+0x4b4/0x590 fs/open.c:310 ksys_fallocate fs/open.c:333 [inline] __do_sys_fallocate fs/open.c:341 [inline] __se_sys_fallocate fs/open.c:339 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:339 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f8ae2e2ede9 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:00007f8ae2880038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f8ae3048080 RCX: 00007f8ae2e2ede9 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f8ae2eb02a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001a00 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8ae3048080 R15: 00007fff79d37308 Modules linked in: ---[ end trace 312e9ebcec2876c1 ]--- RIP: 0010:ext4_split_extent_at+0xe6e/0xe90 fs/ext4/extents.c:3181 Code: 48 89 df 48 89 74 24 68 e8 1f 7e d3 ff 48 8b 74 24 68 e9 5a fb ff ff e8 b0 8e 99 ff 0f 0b e8 a9 8e 99 ff 0f 0b e8 a2 8e 99 ff <0f> 0b e8 9b 8e 99 ff 0f 0b e8 94 8e 99 ff 0f 0b e8 8d 8e 99 ff 0f RSP: 0018:ffffc90000f97900 EFLAGS: 00010293 RAX: ffffffff81ca176e RBX: 0000000000000000 RCX: ffff888119184f00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffc90000f97a70 R08: 0000000000000000 R09: 0000000050000028 R10: fffffbfff0d8ee48 R11: 1ffffffff0d8ee48 R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff11022d0fe46 R15: 0000000000000000 FS: 00007f8ae28806c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc40c4a9000 CR3: 00000001179b8000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400