================================================================== BUG: KASAN: slab-out-of-bounds in _copy_to_iter+0x7de/0x1060 lib/iov_iter.c:536 Write of size 2048 at addr ffff888043498400 by task kworker/u4:3/46 CPU: 1 PID: 46 Comm: kworker/u4:3 Not tainted 6.4.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Workqueue: loop0 loop_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:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 _copy_to_iter+0x7de/0x1060 lib/iov_iter.c:536 copy_page_to_iter+0xe7/0x1d0 lib/iov_iter.c:742 shmem_file_read_iter+0x4f6/0xa70 mm/shmem.c:2696 do_iter_read+0x826/0xd90 fs/read_write.c:795 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:1888 [inline] loop_process_work+0xc7d/0x2220 drivers/block/loop.c:1923 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2405 worker_thread+0xa63/0x1210 kernel/workqueue.c:2552 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 5205: 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:966 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] hfsplus_read_wrapper+0x613/0x1330 fs/hfsplus/wrapper.c:181 hfsplus_fill_super+0x38e/0x1c90 fs/hfsplus/super.c:413 mount_bdev+0x274/0x3a0 fs/super.c:1380 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3039 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568 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 ffff888043498400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 512-byte region [ffff888043498400, ffff888043498600) The buggy address belongs to the physical page: page:ffffea00010d2600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x43498 head:ffffea00010d2600 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012441c80 0000000000000000 0000000000000001 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 5034, tgid 5034 (syz-executor.3), ts 139126561033, free_ts 18173100676 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x1b8/0x290 mm/slub.c:3490 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x426/0xa80 net/ipv6/mcast.c:936 ipv6_add_dev+0xe77/0x1280 net/ipv6/addrconf.c:465 addrconf_notify+0x683/0xfe0 net/ipv6/addrconf.c:3552 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1935 [inline] call_netdevice_notifiers_extack net/core/dev.c:1973 [inline] call_netdevice_notifiers+0x149/0x1c0 net/core/dev.c:1987 register_netdevice+0x1349/0x1790 net/core/dev.c:10118 register_vlan_dev+0x388/0x800 net/8021q/vlan.c:179 vlan_newlink+0x457/0x5a0 net/8021q/vlan_netlink.c:191 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 free_contig_range+0x9e/0x150 mm/page_alloc.c:6994 destroy_args+0x102/0x9a0 mm/debug_vm_pgtable.c:1023 debug_vm_pgtable+0x405/0x490 mm/debug_vm_pgtable.c:1403 do_one_initcall+0x23d/0x7d0 init/main.c:1246 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x3f/0x80 init/main.c:1335 kernel_init_freeable+0x43b/0x5d0 init/main.c:1571 kernel_init+0x1d/0x2a0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff888043498500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888043498580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888043498600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888043498680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888043498700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================