================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:377 [inline] BUG: KASAN: use-after-free in memcpy_from_page+0x8c/0x120 lib/iov_iter.c:453 Read of size 4096 at addr ffff8880a160b000 by task loop3/23561 CPU: 0 PID: 23561 Comm: loop3 Not tainted 4.19.193-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:377 [inline] memcpy_from_page+0x8c/0x120 lib/iov_iter.c:453 iov_iter_copy_from_user_atomic+0x701/0xaa0 lib/iov_iter.c:929 generic_perform_write+0x265/0x4d0 mm/filemap.c:3178 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323 call_write_iter include/linux/fs.h:1821 [inline] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_iter_write+0x70/0xa0 fs/read_write.c:973 lo_write_bvec+0x141/0x370 drivers/block/loop.c:274 lo_write_simple drivers/block/loop.c:296 [inline] do_req_filebacked drivers/block/loop.c:619 [inline] loop_handle_cmd drivers/block/loop.c:1926 [inline] loop_queue_work+0xa1c/0x20c0 drivers/block/loop.c:1940 kthread_worker_fn+0x292/0x730 kernel/kthread.c:700 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the page: page:ffffea00028582c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfff00000000000() raw: 00fff00000000000 ffffea00023c50c8 ffffea0002787908 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a160af00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff8880a160af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a160b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880a160b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880a160b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================