================================================================== BUG: KASAN: use-after-free in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: use-after-free in memcpy_from_page include/linux/highmem.h:321 [inline] BUG: KASAN: use-after-free in iov_iter_copy_from_user_atomic+0x7ea/0xc50 lib/iov_iter.c:991 Read of size 4096 at addr ffff8881449ea000 by task loop5/3198 CPU: 0 PID: 3198 Comm: loop5 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2c6 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186 memcpy+0x20/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:191 [inline] memcpy_from_page include/linux/highmem.h:321 [inline] iov_iter_copy_from_user_atomic+0x7ea/0xc50 lib/iov_iter.c:991 generic_perform_write+0x277/0x4f0 mm/filemap.c:3583 __generic_file_write_iter+0x24e/0x610 mm/filemap.c:3704 generic_file_write_iter+0xd7/0x220 mm/filemap.c:3736 call_write_iter include/linux/fs.h:1977 [inline] do_iter_readv_writev+0x46f/0x740 fs/read_write.c:740 do_iter_write+0x188/0x670 fs/read_write.c:866 vfs_iter_write+0x70/0xa0 fs/read_write.c:907 lo_write_bvec+0x141/0x6c0 drivers/block/loop.c:284 lo_write_simple drivers/block/loop.c:306 [inline] do_req_filebacked drivers/block/loop.c:629 [inline] loop_handle_cmd drivers/block/loop.c:2045 [inline] loop_queue_work+0xb70/0x1fb0 drivers/block/loop.c:2063 kthread_worker_fn+0x322/0xcf0 kernel/kthread.c:735 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the page: page:ffffea0005127a80 refcount:1 mapcount:0 mapping:ffff888025a1cc98 index:0xb pfn:0x1449ea memcg:ffff8881407b0000 aops:jfs_metapage_aops ino:0 flags: 0x57ff00000000034(uptodate|lru|active) raw: 057ff00000000034 ffffea00054ee688 ffff888140777830 ffff888025a1cc98 raw: 000000000000000b 0000000000000000 00000001ffffffff ffff8881407b0000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881449e9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881449e9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881449ea000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8881449ea080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881449ea100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================