================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:376 [inline] BUG: KASAN: use-after-free in memcpy_from_page+0x8c/0x110 lib/iov_iter.c:454 Read of size 4096 at addr ffff8880a6fc9000 by task loop1/21582 CPU: 1 PID: 21582 Comm: loop1 Not tainted 4.14.294-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report+0x6f/0x80 mm/kasan/report.c:409 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:376 [inline] memcpy_from_page+0x8c/0x110 lib/iov_iter.c:454 iov_iter_copy_from_user_atomic+0x5dc/0xa20 lib/iov_iter.c:801 generic_perform_write+0x21f/0x420 mm/filemap.c:3063 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3180 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3208 call_write_iter include/linux/fs.h:1780 [inline] do_iter_readv_writev+0x4cf/0x5f0 fs/read_write.c:675 do_iter_write+0x152/0x550 fs/read_write.c:954 vfs_iter_write+0x70/0xa0 fs/read_write.c:967 lo_write_bvec+0x114/0x310 drivers/block/loop.c:272 lo_write_simple drivers/block/loop.c:294 [inline] do_req_filebacked drivers/block/loop.c:587 [inline] loop_handle_cmd drivers/block/loop.c:1784 [inline] loop_queue_work+0x9f2/0x21e0 drivers/block/loop.c:1798 kthread_worker_fn+0x271/0x6c0 kernel/kthread.c:667 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the page: page:ffffea00029bf240 count:0 mapcount:-127 mapping: (null) index:0x0 flags: 0xfff00000000000() raw: 00fff00000000000 0000000000000000 0000000000000000 00000000ffffff80 raw: ffffea00025c6d60 ffffea0002a819e0 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6fc8f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a6fc8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a6fc9000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880a6fc9080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880a6fc9100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================