================================================================== BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0xa9b/0x1080 lib/iov_iter.c:821 Read of size 2048 at addr ffff88802acb8000 by task kworker/u4:1/11 CPU: 0 PID: 11 Comm: kworker/u4:1 Not tainted 6.2.0-rc2-next-20230105-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: loop5 loop_rootcg_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report+0xc0/0xf0 mm/kasan/report.c:517 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 memcpy+0x24/0x60 mm/kasan/shadow.c:65 copy_page_from_iter_atomic+0xa9b/0x1080 lib/iov_iter.c:821 generic_perform_write+0x2ca/0x570 mm/filemap.c:3780 __generic_file_write_iter+0x2ae/0x500 mm/filemap.c:3900 generic_file_write_iter+0xe3/0x350 mm/filemap.c:3932 call_write_iter include/linux/fs.h:2189 [inline] do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735 do_iter_write+0x182/0x700 fs/read_write.c:861 vfs_iter_write+0x74/0xa0 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:1873 [inline] loop_process_work+0xdac/0x20e0 drivers/block/loop.c:1908 process_one_work+0x9bf/0x1750 kernel/workqueue.c:2293 worker_thread+0x669/0x1090 kernel/workqueue.c:2440 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 5086: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:376 [inline] ____kasan_kmalloc mm/kasan/common.c:335 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:385 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] hfsplus_read_wrapper+0x324/0xfd0 fs/hfsplus/wrapper.c:178 hfsplus_fill_super+0x31a/0x1a30 fs/hfsplus/super.c:413 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802acb8000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff88802acb8000, ffff88802acb8200) The buggy address belongs to the physical page: page:ffffea0000ab2e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2acb8 head:ffffea0000ab2e00 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441c80 ffffea00009c2000 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4030, tgid 4030 (kworker/u4:2), ts 12547283531, free_ts 0 prep_new_page mm/page_alloc.c:2546 [inline] get_page_from_freelist+0x119e/0x2a80 mm/page_alloc.c:4298 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5564 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2281 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x136/0x330 mm/slub.c:3491 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] alloc_bprm+0x51/0x900 fs/exec.c:1511 kernel_execve+0xaf/0x500 fs/exec.c:1985 call_usermodehelper_exec_async+0x2e7/0x580 kernel/umh.c:113 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page_owner free stack trace missing Memory state around the buggy address: ffff88802acb8100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802acb8180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802acb8200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802acb8280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802acb8300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================