================================================================== BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:373 [inline] BUG: KASAN: slab-use-after-free in gfs2_discard fs/gfs2/aops.c:622 [inline] BUG: KASAN: slab-use-after-free in gfs2_invalidate_folio+0x463/0xa50 fs/gfs2/aops.c:660 Read of size 8 at addr ffff88807c274018 by task syz-executor/14237 CPU: 0 PID: 14237 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 list_empty include/linux/list.h:373 [inline] gfs2_discard fs/gfs2/aops.c:622 [inline] gfs2_invalidate_folio+0x463/0xa50 fs/gfs2/aops.c:660 folio_invalidate mm/truncate.c:158 [inline] truncate_cleanup_folio+0x220/0x5c0 mm/truncate.c:178 truncate_inode_pages_range+0x28a/0xfb0 mm/truncate.c:392 gfs2_evict_inode+0x402/0x1350 fs/gfs2/super.c:1535 evict+0x4ca/0x8d0 fs/inode.c:705 gfs2_evict_inodes fs/gfs2/ops_fstype.c:1770 [inline] gfs2_kill_sb+0x230/0x320 fs/gfs2/ops_fstype.c:1796 deactivate_locked_super+0x97/0x100 fs/super.c:481 cleanup_mnt+0x43b/0x4d0 fs/namespace.c:1259 task_work_run+0x1d4/0x260 kernel/task_work.c:245 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0x95a/0x2460 kernel/exit.c:883 do_group_exit+0x21b/0x2d0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f3e0119c629 Code: Unable to access opcode bytes at 0x7f3e0119c5ff. RSP: 002b:00007ffdedec5428 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f3e01231f15 RCX: 00007f3e0119c629 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 0000000000000005 R08: 0000000000000000 R09: 00007f3e01231ef0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffdedec6680 R13: 00007f3e01231ef0 R14: 0000000000090872 R15: 00007ffdedec66c0 Allocated by task 14674: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4b0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x11a/0x2d0 mm/slub.c:3519 kmem_cache_zalloc include/linux/slab.h:711 [inline] gfs2_alloc_bufdata fs/gfs2/trans.c:168 [inline] gfs2_trans_add_data+0x1ff/0x620 fs/gfs2/trans.c:209 gfs2_trans_add_databufs+0x15a/0x1c0 fs/gfs2/aops.c:57 gfs2_iomap_put_folio+0x1be/0x400 fs/gfs2/bmap.c:988 iomap_write_end+0x631/0xb80 fs/iomap/buffered-io.c:885 iomap_write_iter fs/iomap/buffered-io.c:951 [inline] iomap_file_buffered_write+0x751/0xd80 fs/iomap/buffered-io.c:1000 gfs2_file_buffered_write+0x4bd/0x820 fs/gfs2/file.c:1060 gfs2_file_write_iter+0x48d/0xe90 fs/gfs2/file.c:1158 call_write_iter include/linux/fs.h:2018 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x46c/0x990 fs/read_write.c:584 ksys_write+0x150/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 14685: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1811 [inline] slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837 slab_free mm/slub.c:3830 [inline] kmem_cache_free+0xf8/0x270 mm/slub.c:3852 trans_drain fs/gfs2/log.c:1022 [inline] gfs2_log_flush+0x1923/0x2500 fs/gfs2/log.c:1162 gfs2_write_inode+0x23f/0x3d0 fs/gfs2/super.c:457 write_inode fs/fs-writeback.c:1483 [inline] __writeback_single_inode+0x705/0xec0 fs/fs-writeback.c:1700 writeback_single_inode+0x21f/0x760 fs/fs-writeback.c:1756 sync_inode_metadata+0xe0/0x140 fs/fs-writeback.c:2828 gfs2_fsync+0x1b6/0x350 fs/gfs2/file.c:762 vfs_fsync_range fs/sync.c:188 [inline] vfs_fsync fs/sync.c:202 [inline] do_fsync fs/sync.c:212 [inline] __do_sys_fsync fs/sync.c:220 [inline] __se_sys_fsync fs/sync.c:218 [inline] __x64_sys_fsync+0x195/0x1d0 fs/sync.c:218 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88807c274000 which belongs to the cache gfs2_bufdata of size 80 The buggy address is located 24 bytes inside of freed 80-byte region [ffff88807c274000, ffff88807c274050) The buggy address belongs to the physical page: page:ffffea0001f09d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c274 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff8881446d0140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000240024 00000001ffffffff 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 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 14674, tgid 14673 (syz.0.2407), ts 591732884753, free_ts 591723888367 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581 prep_new_page mm/page_alloc.c:1588 [inline] get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4486 alloc_slab_page+0x5d/0x160 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x1b3/0x2d0 mm/slub.c:3519 kmem_cache_zalloc include/linux/slab.h:711 [inline] gfs2_alloc_bufdata fs/gfs2/trans.c:168 [inline] gfs2_trans_add_data+0x1ff/0x620 fs/gfs2/trans.c:209 gfs2_trans_add_databufs+0x15a/0x1c0 fs/gfs2/aops.c:57 gfs2_iomap_put_folio+0x1be/0x400 fs/gfs2/bmap.c:988 iomap_write_end+0x631/0xb80 fs/iomap/buffered-io.c:885 iomap_write_iter fs/iomap/buffered-io.c:951 [inline] iomap_file_buffered_write+0x751/0xd80 fs/iomap/buffered-io.c:1000 gfs2_file_buffered_write+0x4bd/0x820 fs/gfs2/file.c:1060 gfs2_file_write_iter+0x48d/0xe90 fs/gfs2/file.c:1158 call_write_iter include/linux/fs.h:2018 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x46c/0x990 fs/read_write.c:584 ksys_write+0x150/0x260 fs/read_write.c:637 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1181 [inline] free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2504 release_pages+0x1f7a/0x2200 mm/swap.c:1022 __folio_batch_release+0x71/0xe0 mm/swap.c:1042 folio_batch_release include/linux/pagevec.h:83 [inline] mapping_try_invalidate+0x493/0x5a0 mm/truncate.c:560 ext4_put_super+0x5f9/0xa40 fs/ext4/super.c:1362 generic_shutdown_super+0x134/0x2b0 fs/super.c:693 kill_block_super+0x44/0x90 fs/super.c:1660 ext4_kill_sb+0x68/0xa0 fs/ext4/super.c:7407 deactivate_locked_super+0x97/0x100 fs/super.c:481 cleanup_mnt+0x43b/0x4d0 fs/namespace.c:1259 task_work_run+0x1d4/0x260 kernel/task_work.c:245 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302 do_syscall_64+0x61/0xa0 arch/x86/entry/common.c:82 Memory state around the buggy address: ffff88807c273f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807c273f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807c274000: fa fb fb fb fb fb fb fb fb fb fc fc fc fc fa fb ^ ffff88807c274080: fb fb fb fb fb fb fb fb fc fc fc fc fa fb fb fb ffff88807c274100: fb fb fb fb fb fb fc fc fc fc fa fb fb fb fb fb ==================================================================