================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in memcpy_from_page+0x8c/0x120 lib/iov_iter.c:453 Read of size 2048 at addr ffff8880ac5ce080 by task loop0/8111 CPU: 0 PID: 8111 Comm: loop0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 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 Allocated by task 8110: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] hfsplus_read_wrapper+0x2c7/0xf00 fs/hfsplus/wrapper.c:177 hfsplus_fill_super+0x30a/0x19e0 fs/hfsplus/super.c:413 mount_bdev+0x2fc/0x3b0 fs/super.c:1158 mount_fs+0xa3/0x310 fs/super.c:1261 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x115c/0x2f50 fs/namespace.c:2822 ksys_mount+0xcf/0x130 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3049 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6374: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kernfs_fop_release+0x120/0x190 fs/kernfs/file.c:783 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880ac5ce080 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8880ac5ce080, ffff8880ac5ce280) The buggy address belongs to the page: page:ffffea0002b17380 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff8880ac5ce800 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002bb28c8 ffffea0002b0d6c8 ffff88813bff0940 raw: ffff8880ac5ce800 ffff8880ac5ce080 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ac5ce180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880ac5ce200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880ac5ce280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880ac5ce300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880ac5ce380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================