================================================================== BUG: KASAN: slab-out-of-bounds in _copy_to_iter+0xb55/0x1140 lib/iov_iter.c:527 Write of size 2048 at addr ffff88801dbb1000 by task kworker/u4:2/41 CPU: 0 PID: 41 Comm: kworker/u4:2 Not tainted 6.1.0-rc8-syzkaller-00154-g296a7b7eb792 #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:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 memcpy+0x3d/0x60 mm/kasan/shadow.c:66 _copy_to_iter+0xb55/0x1140 lib/iov_iter.c:527 copy_page_to_iter+0xe0/0xa20 lib/iov_iter.c:725 shmem_file_read_iter+0x37e/0xa50 mm/shmem.c:2664 call_read_iter include/linux/fs.h:2193 [inline] do_iter_readv_writev+0x2e0/0x3b0 fs/read_write.c:733 do_iter_read+0x2f2/0x750 fs/read_write.c:796 vfs_iter_read+0x74/0xa0 fs/read_write.c:838 lo_read_simple drivers/block/loop.c:290 [inline] do_req_filebacked drivers/block/loop.c:500 [inline] loop_handle_cmd drivers/block/loop.c:1864 [inline] loop_process_work+0x1592/0x2070 drivers/block/loop.c:1899 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 3641: 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:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] hfsplus_read_wrapper+0x407/0xfd0 fs/hfsplus/wrapper.c:181 hfsplus_fill_super+0x31a/0x1a30 fs/hfsplus/super.c:413 mount_bdev+0x351/0x410 fs/super.c:1401 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1531 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 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 ffff88801dbb1000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff88801dbb1000, ffff88801dbb1200) The buggy address belongs to the physical page: page:ffffea000076ec00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1dbb0 head:ffffea000076ec00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888012041c80 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 722, tgid 722 (kworker/u4:1), ts 6148153635, free_ts 0 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3180 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3279 slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x199/0x3e0 mm/slub.c:3437 kmalloc_trace+0x26/0x60 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] alloc_bprm+0x51/0x900 fs/exec.c:1508 kernel_execve+0xaf/0x500 fs/exec.c:1967 call_usermodehelper_exec_async+0x2e7/0x580 kernel/umh.c:113 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page_owner free stack trace missing Memory state around the buggy address: ffff88801dbb1100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801dbb1180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801dbb1200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801dbb1280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801dbb1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================