================================================================== BUG: KASAN: use-after-free in copy_page_from_iter_atomic+0xab6/0x1520 lib/iov_iter.c:978 Read of size 4096 at addr ffff88807dac5000 by task kworker/u4:8/4349 CPU: 1 PID: 4349 Comm: kworker/u4:8 Not tainted 5.15.182-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Workqueue: loop2 loop_workfn Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189 memcpy+0x25/0x60 mm/kasan/shadow.c:65 copy_page_from_iter_atomic+0xab6/0x1520 lib/iov_iter.c:978 generic_perform_write+0x2ff/0x530 mm/filemap.c:3793 __generic_file_write_iter+0x25f/0x4e0 mm/filemap.c:3912 generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944 do_iter_readv_writev+0x497/0x600 fs/read_write.c:-1 do_iter_write+0x205/0x7b0 fs/read_write.c:855 lo_write_bvec+0x299/0x770 drivers/block/loop.c:316 lo_write_simple drivers/block/loop.c:338 [inline] do_req_filebacked drivers/block/loop.c:656 [inline] loop_handle_cmd drivers/block/loop.c:2235 [inline] loop_process_work+0x1d62/0x2480 drivers/block/loop.c:2275 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the page: page:ffffea0001f6b140 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7dac5 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea00013e4788 ffffea0000656948 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 0, migratetype Unmovable, gfp_mask 0x100dc0(GFP_USER|__GFP_ZERO), pid 4934, ts 99192915706, free_ts 209252323253 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 lbmLogInit fs/jfs/jfs_logmgr.c:1824 [inline] lmLogInit+0x2fe/0x1a30 fs/jfs/jfs_logmgr.c:1278 open_inline_log fs/jfs/jfs_logmgr.c:1183 [inline] lmLogOpen+0x4d0/0xf90 fs/jfs/jfs_logmgr.c:1077 jfs_mount_rw+0xf2/0x5c0 fs/jfs/jfs_mount.c:253 jfs_fill_super+0x5bb/0xaf0 fs/jfs/super.c:570 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3013 do_mount fs/namespace.c:3356 [inline] __do_sys_mount fs/namespace.c:3564 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3541 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 lbmLogShutdown fs/jfs/jfs_logmgr.c:1872 [inline] lmLogShutdown+0x436/0x820 fs/jfs/jfs_logmgr.c:1692 lmLogClose+0x286/0x520 fs/jfs/jfs_logmgr.c:1468 jfs_umount+0x28f/0x360 fs/jfs/jfs_umount.c:116 jfs_put_super+0x88/0x190 fs/jfs/super.c:194 generic_shutdown_super+0x130/0x300 fs/super.c:475 kill_block_super+0x7c/0xe0 fs/super.c:1427 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x418/0x4d0 fs/namespace.c:1143 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88807dac4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807dac4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807dac5000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807dac5080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807dac5100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================