================================================================== BUG: KASAN: use-after-free in copy_page_from_iter_atomic+0xaa5/0x1080 lib/iov_iter.c:820 Read of size 4096 at addr ffff888076e00000 by task kworker/u4:3/45 CPU: 0 PID: 45 Comm: kworker/u4:3 Not tainted 6.1.0-rc5-syzkaller-00307-gfe24a97cf254 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: loop2 loop_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x461 mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 memcpy+0x24/0x60 mm/kasan/shadow.c:65 copy_page_from_iter_atomic+0xaa5/0x1080 lib/iov_iter.c:820 generic_perform_write+0x2ca/0x570 mm/filemap.c:3761 __generic_file_write_iter+0x2ae/0x4d0 mm/filemap.c:3881 generic_file_write_iter+0xe3/0x350 mm/filemap.c:3913 call_write_iter include/linux/fs.h:2191 [inline] do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735 do_iter_write+0x182/0x700 fs/read_write.c:861 vfs_iter_write+0x74/0xa0 fs/read_write.c:902 lo_write_bvec drivers/block/loop.c:249 [inline] lo_write_simple drivers/block/loop.c:271 [inline] do_req_filebacked drivers/block/loop.c:495 [inline] loop_handle_cmd drivers/block/loop.c:1864 [inline] loop_process_work+0xdad/0x2070 drivers/block/loop.c:1899 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the physical page: page:ffffea0001db8000 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76e00 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0002682b08 ffffea0001eaf748 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 15171, tgid 15168 (syz-executor.2), ts 710161771299, free_ts 710211722134 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4288 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5555 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 lbmLogInit fs/jfs/jfs_logmgr.c:1816 [inline] lmLogInit+0x35c/0x17a0 fs/jfs/jfs_logmgr.c:1270 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x7c7/0x13e0 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0x325/0x5e0 fs/jfs/jfs_mount.c:253 jfs_fill_super+0x9c0/0xc80 fs/jfs/super.c:565 mount_bdev+0x351/0x410 fs/super.c:1401 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1531 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 lbmLogShutdown fs/jfs/jfs_logmgr.c:1864 [inline] lmLogShutdown+0x341/0x600 fs/jfs/jfs_logmgr.c:1684 lmLogClose+0x55f/0x6f0 fs/jfs/jfs_logmgr.c:1460 jfs_umount+0x2d7/0x3f0 fs/jfs/jfs_umount.c:116 jfs_put_super+0x85/0x1a0 fs/jfs/super.c:194 generic_shutdown_super+0x158/0x410 fs/super.c:492 kill_block_super+0x9b/0xf0 fs/super.c:1428 deactivate_locked_super+0x98/0x160 fs/super.c:332 deactivate_super+0xb1/0xd0 fs/super.c:363 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888076dfff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076dfff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888076e00000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888076e00080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888076e00100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================