================================================================== BUG: KASAN: use-after-free in copy_page_from_iter_atomic+0x834/0xffc lib/iov_iter.c:978 Read of size 4096 at addr ffff0000e1435000 by task kworker/u4:13/4194 CPU: 1 PID: 4194 Comm: kworker/u4:13 Not tainted 5.15.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: loop0 loop_workfn Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 kasan_check_range+0x274/0x2b4 mm/kasan/generic.c:189 memcpy+0x90/0xe8 mm/kasan/shadow.c:65 copy_page_from_iter_atomic+0x834/0xffc lib/iov_iter.c:978 generic_perform_write+0x2d0/0x520 mm/filemap.c:3793 __generic_file_write_iter+0x230/0x454 mm/filemap.c:3912 generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3944 do_iter_readv_writev+0x420/0x5f8 do_iter_write+0x1b8/0x66c fs/read_write.c:855 vfs_iter_write+0x88/0xac fs/read_write.c:896 lo_write_bvec+0x394/0xb4c drivers/block/loop.c:316 lo_write_simple drivers/block/loop.c:338 [inline] do_req_filebacked drivers/block/loop.c:656 [inline] loop_handle_cmd drivers/block/loop.c:2234 [inline] loop_process_work+0x1f24/0x2798 drivers/block/loop.c:2274 loop_workfn+0x54/0x68 drivers/block/loop.c:2298 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the page: page:00000000c63b2625 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x121435 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 fffffc0003850d88 fffffc0003851248 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e1434f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e1434f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff0000e1435000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000e1435080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e1435100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_bridge: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): bridge_slave_0: link becomes ready bridge0: port 1(bridge_slave_0) entered blocking state bridge0: port 1(bridge_slave_0) entered forwarding state IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_bridge: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): bridge_slave_1: link becomes ready bridge0: port 2(bridge_slave_1) entered blocking state bridge0: port 2(bridge_slave_1) entered forwarding state IPv6: ADDRCONF(NETDEV_CHANGE): bridge0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macvlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macvlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macsec0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready