================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:447 [inline] BUG: KASAN: use-after-free in memcpy_from_page+0x8c/0x120 lib/iov_iter.c:472 Read of size 4096 at addr ffff88801c3aa000 by task loop5/28694 CPU: 0 PID: 28694 Comm: loop5 Not tainted 5.11.0-rc3-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+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 check_memory_region_inline mm/kasan/generic.c:179 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:185 memcpy+0x20/0x60 mm/kasan/shadow.c:64 memcpy include/linux/string.h:447 [inline] memcpy_from_page+0x8c/0x120 lib/iov_iter.c:472 iov_iter_copy_from_user_atomic+0x9ab/0xc00 lib/iov_iter.c:1005 generic_perform_write+0x277/0x4f0 mm/filemap.c:3416 __generic_file_write_iter+0x24e/0x610 mm/filemap.c:3537 generic_file_write_iter+0xd7/0x220 mm/filemap.c:3569 call_write_iter include/linux/fs.h:1901 [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:2037 [inline] loop_queue_work+0xb66/0x1fb0 drivers/block/loop.c:2055 kthread_worker_fn+0x322/0xce0 kernel/kthread.c:710 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the page: page:00000000f0dfb495 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c3aa flags: 0xfff00000000000() raw: 00fff00000000000 ffffea00004b0ac8 ffffea0000af8408 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801c3a9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801c3a9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801c3aa000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88801c3aa080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801c3aa100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================