================================================================== BUG: KASAN: use-after-free in copy_page_from_iter_atomic+0x9ec/0x112c lib/iov_iter.c:815 Read of size 4096 at addr ffff0000cebce000 by task kworker/u4:9/6236 CPU: 0 PID: 6236 Comm: kworker/u4:9 Not tainted 6.3.0-rc7-syzkaller-g14f8db1c0f9a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Workqueue: loop3 loop_workfn Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x174/0x514 mm/kasan/report.c:430 kasan_report+0xd4/0x130 mm/kasan/report.c:536 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:187 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105 copy_page_from_iter_atomic+0x9ec/0x112c lib/iov_iter.c:815 generic_perform_write+0x2fc/0x55c mm/filemap.c:3934 __generic_file_write_iter+0x168/0x388 mm/filemap.c:4054 generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:4086 do_iter_write+0x534/0x964 fs/read_write.c:861 vfs_iter_write+0x88/0xac fs/read_write.c:902 lo_write_bvec drivers/block/loop.c:249 [inline] lo_write_simple drivers/block/loop.c:271 [inline] do_req_filebacked drivers/block/loop.c:495 [inline] loop_handle_cmd drivers/block/loop.c:1888 [inline] loop_process_work+0x15e0/0x2534 drivers/block/loop.c:1923 loop_workfn+0x54/0x68 drivers/block/loop.c:1947 process_one_work+0x788/0x12d4 kernel/workqueue.c:2390 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2537 kthread+0x24c/0x2d4 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the physical page: page:000000001125f626 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ebce flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 fffffc0003549d08 fffffc00033040c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cebcdf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000cebcdf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000cebce000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000cebce080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000cebce100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Unable to handle kernel paging request at virtual address dfff800000000005 KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 [dfff800000000005] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6236 Comm: kworker/u4:9 Tainted: G B 6.3.0-rc7-syzkaller-g14f8db1c0f9a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Workqueue: loop3 loop_workfn pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : fsnotify_parent include/linux/fsnotify.h:62 [inline] pc : fsnotify_file include/linux/fsnotify.h:99 [inline] pc : fsnotify_modify include/linux/fsnotify.h:317 [inline] pc : do_iter_write+0x640/0x964 fs/read_write.c:865 lr : fsnotify_file include/linux/fsnotify.h:96 [inline] lr : fsnotify_modify include/linux/fsnotify.h:317 [inline] lr : do_iter_write+0x5fc/0x964 fs/read_write.c:865 sp : ffff800020137680 x29: ffff800020137780 x28: 1ffff00004026ee4 x27: ffff700004026edc x26: ffff800020137708 x25: 1fffe00019a79e8f x24: 0000000000001000 x23: 0000000000000028 x22: dfff800000000000 x21: ffff000131f8b028 x20: 0000000000000000 x19: ffff0000cd3cf400 x18: 1fffe00036855db6 x17: ffff800015c7d000 x16: ffff8000123165a4 x15: ffff0001b42aedbc x14: ffff0001b42aedb8 x13: 1fffe00036855db6 x12: 0000000000000001 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000000000000005 x7 : 0000000000000000 x6 : 1fffe00036855db6 x5 : ffff800015d19940 x4 : 0000000000000000 x3 : ffff8000082fc80c x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: fsnotify_parent include/linux/fsnotify.h:62 [inline] fsnotify_file include/linux/fsnotify.h:99 [inline] fsnotify_modify include/linux/fsnotify.h:317 [inline] do_iter_write+0x640/0x964 fs/read_write.c:865 vfs_iter_write+0x88/0xac fs/read_write.c:902 lo_write_bvec drivers/block/loop.c:249 [inline] lo_write_simple drivers/block/loop.c:271 [inline] do_req_filebacked drivers/block/loop.c:495 [inline] loop_handle_cmd drivers/block/loop.c:1888 [inline] loop_process_work+0x15e0/0x2534 drivers/block/loop.c:1923 loop_workfn+0x54/0x68 drivers/block/loop.c:1947 process_one_work+0x788/0x12d4 kernel/workqueue.c:2390 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2537 kthread+0x24c/0x2d4 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Code: 97fcbb31 f9400294 9100a297 d343fee8 (38766908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 97fcbb31 bl 0xfffffffffff2ecc4 4: f9400294 ldr x20, [x20] 8: 9100a297 add x23, x20, #0x28 c: d343fee8 lsr x8, x23, #3 * 10: 38766908 ldrb w8, [x8, x22] <-- trapping instruction