================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_iter lib/iov_iter.c:380 [inline] BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0x93b/0x1310 lib/iov_iter.c:581 Read of size 2048 at addr ffff88801fde7800 by task kworker/u4:4/76 CPU: 1 PID: 76 Comm: kworker/u4:4 Not tainted 6.5.0-rc1-syzkaller-00152-g4b810bf037e5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Workqueue: loop0 loop_rootcg_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 memcpy_from_iter lib/iov_iter.c:380 [inline] copy_page_from_iter_atomic+0x93b/0x1310 lib/iov_iter.c:581 generic_perform_write+0x392/0x630 mm/filemap.c:3931 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4044 do_iter_write+0x84f/0xde0 fs/read_write.c:860 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:1886 [inline] loop_process_work+0x144b/0x2220 drivers/block/loop.c:1921 process_one_work+0x92c/0x12c0 kernel/workqueue.c:2597 worker_thread+0xa63/0x1210 kernel/workqueue.c:2748 kthread+0x2b8/0x350 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 5018: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:998 kmalloc include/linux/slab.h:586 [inline] hfsplus_read_wrapper+0x545/0x1330 fs/hfsplus/wrapper.c:178 hfsplus_fill_super+0x38e/0x1c90 fs/hfsplus/super.c:413 mount_bdev+0x276/0x3b0 fs/super.c:1391 legacy_get_tree+0xef/0x190 fs/fs_context.c:611 vfs_get_tree+0x8c/0x270 fs/super.c:1519 do_new_mount+0x28f/0xae0 fs/namespace.c:3335 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801fde7800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 512-byte region [ffff88801fde7800, ffff88801fde7a00) The buggy address belongs to the physical page: page:ffffea00007f7900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1fde4 head:ffffea00007f7900 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012841c80 ffffea000058b700 dead000000000002 raw: 0000000000000000 0000000080100010 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 1, tgid 1 (swapper/0), ts 9172508640, free_ts 9172345967 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x31e8/0x3370 mm/page_alloc.c:3221 __alloc_pages+0x255/0x670 mm/page_alloc.c:4477 alloc_page_interleave+0x22/0x1d0 mm/mempolicy.c:2112 alloc_slab_page+0x6a/0x160 mm/slub.c:1862 allocate_slab mm/slub.c:2009 [inline] new_slab+0x84/0x2f0 mm/slub.c:2062 ___slab_alloc+0xade/0x1100 mm/slub.c:3215 __slab_alloc mm/slub.c:3314 [inline] __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3509 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1076 kmalloc include/linux/slab.h:582 [inline] kzalloc include/linux/slab.h:703 [inline] device_private_init drivers/base/core.c:3471 [inline] device_add+0xc1/0xf60 drivers/base/core.c:3522 netdev_register_kobject+0x17a/0x310 net/core/net-sysfs.c:2043 register_netdevice+0x1066/0x1790 net/core/dev.c:10051 ifb_init_one+0x70/0xb0 drivers/net/ifb.c:414 ifb_init_module+0x6c/0x110 drivers/net/ifb.c:436 do_one_initcall+0x23d/0x7d0 init/main.c:1232 do_initcall_level+0x157/0x210 init/main.c:1294 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2348 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2443 __stack_depot_save+0x4ef/0x650 lib/stackdepot.c:443 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x61/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc_node+0xb8/0x230 mm/slab_common.c:992 kmalloc_node include/linux/slab.h:602 [inline] kvmalloc_node+0x72/0x180 mm/util.c:604 kvmalloc include/linux/slab.h:720 [inline] kvzalloc include/linux/slab.h:728 [inline] alloc_netdev_mqs+0x8d/0xf40 net/core/dev.c:10594 ifb_init_one+0x2f/0xb0 drivers/net/ifb.c:407 ifb_init_module+0x6c/0x110 drivers/net/ifb.c:436 do_one_initcall+0x23d/0x7d0 init/main.c:1232 do_initcall_level+0x157/0x210 init/main.c:1294 do_initcalls+0x3f/0x80 init/main.c:1310 kernel_init_freeable+0x43b/0x5d0 init/main.c:1546 kernel_init+0x1d/0x2a0 init/main.c:1437 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88801fde7900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801fde7980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801fde7a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801fde7a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801fde7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================