================================================================== BUG: KASAN: use-after-free in copy_page_from_iter_atomic+0x97c/0x1240 lib/iov_iter.c:820 Read of size 4096 at addr ffff888058bd8000 by task kworker/u4:15/4463 CPU: 1 PID: 4463 Comm: kworker/u4:15 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: loop4 loop_workfn Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 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+0x97c/0x1240 lib/iov_iter.c:820 generic_perform_write+0x32d/0x560 mm/filemap.c:3854 __generic_file_write_iter+0x172/0x430 mm/filemap.c:3974 generic_file_write_iter+0xab/0x2e0 mm/filemap.c:4006 do_iter_readv_writev fs/read_write.c:-1 [inline] do_iter_write+0x62d/0xaf0 fs/read_write.c:861 lo_write_bvec drivers/block/loop.c:244 [inline] lo_write_simple drivers/block/loop.c:266 [inline] do_req_filebacked drivers/block/loop.c:490 [inline] loop_handle_cmd drivers/block/loop.c:1907 [inline] loop_process_work+0x1004/0x1e40 drivers/block/loop.c:1942 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the physical page: page:ffffea000162f600 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58bd8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000081b0c8 ffffea0001e675c8 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 10574, tgid 10573 (syz.4.1743), ts 735251330216, free_ts 736493458213 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 lbmLogInit fs/jfs/jfs_logmgr.c:1816 [inline] lmLogInit+0x312/0x1a60 fs/jfs/jfs_logmgr.c:1270 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x4d0/0xf90 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0xf2/0x5c0 fs/jfs/jfs_mount.c:253 jfs_fill_super+0x58e/0xac0 fs/jfs/super.c:565 mount_bdev+0x287/0x3c0 fs/super.c:1443 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3054 do_mount fs/namespace.c:3397 [inline] __do_sys_mount fs/namespace.c:3605 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3582 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 lbmLogShutdown fs/jfs/jfs_logmgr.c:1864 [inline] lmLogShutdown+0x436/0x820 fs/jfs/jfs_logmgr.c:1684 lmLogClose+0x286/0x520 fs/jfs/jfs_logmgr.c:1460 jfs_umount+0x28f/0x360 fs/jfs/jfs_umount.c:116 jfs_put_super+0x88/0x190 fs/jfs/super.c:194 generic_shutdown_super+0x130/0x340 fs/super.c:501 kill_block_super+0x7c/0xe0 fs/super.c:1470 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x463/0x4f0 fs/namespace.c:1182 task_work_run+0x1ca/0x250 kernel/task_work.c:203 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+0xb1/0x140 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:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888058bd7f00: 00 fc fc 00 00 00 00 00 fc fc 00 00 00 00 00 fc ffff888058bd7f80: fc 00 00 00 00 00 fc fc 00 00 00 00 00 fc fc fc >ffff888058bd8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888058bd8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888058bd8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================