================================================================== BUG: KASAN: use-after-free in list_empty include/linux/list.h:292 [inline] BUG: KASAN: use-after-free in gfs2_discard fs/gfs2/aops.c:618 [inline] BUG: KASAN: use-after-free in gfs2_invalidate_folio+0x455/0xa70 fs/gfs2/aops.c:656 Read of size 8 at addr ffff888027e70018 by task syz-executor/4275 CPU: 0 PID: 4275 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+0x188/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 list_empty include/linux/list.h:292 [inline] gfs2_discard fs/gfs2/aops.c:618 [inline] gfs2_invalidate_folio+0x455/0xa70 fs/gfs2/aops.c:656 folio_invalidate mm/truncate.c:158 [inline] truncate_cleanup_folio+0x218/0x5e0 mm/truncate.c:178 truncate_inode_pages_range+0x293/0x1090 mm/truncate.c:393 gfs2_evict_inode+0xae7/0x11d0 fs/gfs2/super.c:1513 evict+0x4c9/0x8d0 fs/inode.c:705 dispose_list fs/inode.c:738 [inline] evict_inodes+0x60c/0x6a0 fs/inode.c:792 generic_shutdown_super+0x93/0x340 fs/super.c:480 kill_block_super+0x7c/0xe0 fs/super.c:1470 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x42c/0x4b0 fs/namespace.c:1191 task_work_run+0x1d0/0x260 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x982/0x2480 kernel/exit.c:880 do_group_exit+0x217/0x2d0 kernel/exit.c:1022 __do_sys_exit_group kernel/exit.c:1033 [inline] __se_sys_exit_group kernel/exit.c:1031 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1031 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7efe4379c799 Code: Unable to access opcode bytes at 0x7efe4379c76f. RSP: 002b:00007ffdf997a7e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007efe43831fb5 RCX: 00007efe4379c799 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 0000000000000005 R08: 0000000000000000 R09: 00007efe43831f90 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffdf997ba40 R13: 00007efe43831f90 R14: 0000000000016724 R15: 00007ffdf997ba80 Allocated by task 4585: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3359 [inline] slab_alloc mm/slub.c:3367 [inline] __kmem_cache_alloc_lru mm/slub.c:3374 [inline] kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3383 kmem_cache_zalloc include/linux/slab.h:689 [inline] gfs2_alloc_bufdata fs/gfs2/trans.c:168 [inline] gfs2_trans_add_data+0x1fb/0x610 fs/gfs2/trans.c:209 gfs2_page_add_databufs+0x1eb/0x270 fs/gfs2/aops.c:57 gfs2_iomap_page_done+0xe0/0x180 fs/gfs2/bmap.c:978 iomap_write_end+0x762/0xda0 fs/iomap/buffered-io.c:739 iomap_write_iter fs/iomap/buffered-io.c:802 [inline] iomap_file_buffered_write+0x50f/0x8f0 fs/iomap/buffered-io.c:847 gfs2_file_buffered_write+0x4fe/0x880 fs/gfs2/file.c:1057 gfs2_file_write_iter+0x486/0xe90 fs/gfs2/file.c:1158 call_write_iter include/linux/fs.h:2265 [inline] aio_write+0x545/0x780 fs/aio.c:1615 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x6cd/0x1380 fs/aio.c:2034 __do_sys_io_submit fs/aio.c:2093 [inline] __se_sys_io_submit+0x19d/0x310 fs/aio.c:2063 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 4585: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] kmem_cache_free+0xf7/0x290 mm/slub.c:3709 trans_drain fs/gfs2/log.c:1023 [inline] gfs2_log_flush+0x1959/0x2540 fs/gfs2/log.c:1162 gfs2_jdata_writepages+0xf5/0x150 fs/gfs2/aops.c:392 do_writepages+0x3ba/0x640 mm/page-writeback.c:2491 filemap_fdatawrite_wbc+0x11e/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_fdatawrite_range+0xf3/0x160 mm/filemap.c:439 gfs2_fsync+0xdb/0x340 fs/gfs2/file.c:747 generic_write_sync include/linux/fs.h:2962 [inline] gfs2_file_write_iter+0xce3/0xe90 fs/gfs2/file.c:1160 call_write_iter include/linux/fs.h:2265 [inline] aio_write+0x545/0x780 fs/aio.c:1615 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x6cd/0x1380 fs/aio.c:2034 __do_sys_io_submit fs/aio.c:2093 [inline] __se_sys_io_submit+0x19d/0x310 fs/aio.c:2063 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888027e70000 which belongs to the cache gfs2_bufdata of size 80 The buggy address is located 24 bytes inside of 80-byte region [ffff888027e70000, ffff888027e70050) The buggy address belongs to the physical page: page:ffffea00009f9c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27e70 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff88801b7d5780 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 4585, tgid 4546 (syz.4.39), ts 91614187884, free_ts 91456585055 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559 prep_new_page mm/page_alloc.c:2566 [inline] get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5643 alloc_slab_page+0x5d/0x160 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2c0 mm/slub.c:1997 ___slab_alloc+0xbc6/0x1240 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] slab_alloc mm/slub.c:3367 [inline] __kmem_cache_alloc_lru mm/slub.c:3374 [inline] kmem_cache_alloc+0x1b7/0x2f0 mm/slub.c:3383 kmem_cache_zalloc include/linux/slab.h:689 [inline] gfs2_alloc_bufdata fs/gfs2/trans.c:168 [inline] gfs2_trans_add_data+0x1fb/0x610 fs/gfs2/trans.c:209 gfs2_page_add_databufs+0x1eb/0x270 fs/gfs2/aops.c:57 gfs2_iomap_page_done+0xe0/0x180 fs/gfs2/bmap.c:978 iomap_write_end+0x762/0xda0 fs/iomap/buffered-io.c:739 iomap_write_iter fs/iomap/buffered-io.c:802 [inline] iomap_file_buffered_write+0x50f/0x8f0 fs/iomap/buffered-io.c:847 gfs2_file_buffered_write+0x4fe/0x880 fs/gfs2/file.c:1057 gfs2_file_write_iter+0x486/0xe90 fs/gfs2/file.c:1158 call_write_iter include/linux/fs.h:2265 [inline] aio_write+0x545/0x780 fs/aio.c:1615 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x6cd/0x1380 fs/aio.c:2034 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1486 [inline] free_pcp_prepare mm/page_alloc.c:1536 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3554 release_pages+0x1fa6/0x2220 mm/swap.c:1035 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu+0x105/0x220 mm/mmu_gather.c:261 tlb_finish_mmu+0xbd/0x1c0 mm/mmu_gather.c:361 exit_mmap+0x384/0x960 mm/mmap.c:3262 __mmput+0x118/0x3c0 kernel/fork.c:1205 exit_mm+0x1fe/0x2d0 kernel/exit.c:565 do_exit+0x905/0x2480 kernel/exit.c:867 do_group_exit+0x217/0x2d0 kernel/exit.c:1022 get_signal+0x1272/0x1350 kernel/signal.c:2871 arch_do_signal_or_restart+0xc4/0x1350 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 Memory state around the buggy address: ffff888027e6ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888027e6ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888027e70000: fa fb fb fb fb fb fb fb fb fb fc fc fc fc fa fb ^ ffff888027e70080: fb fb fb fb fb fb fb fb fc fc fc fc fa fb fb fb ffff888027e70100: fb fb fb fb fb fb fc fc fc fc fa fb fb fb fb fb ==================================================================