================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_iter lib/iov_iter.c:73 [inline] BUG: KASAN: slab-out-of-bounds in iterate_bvec include/linux/iov_iter.h:122 [inline] BUG: KASAN: slab-out-of-bounds in iterate_and_advance2 include/linux/iov_iter.h:249 [inline] BUG: KASAN: slab-out-of-bounds in iterate_and_advance include/linux/iov_iter.h:271 [inline] BUG: KASAN: slab-out-of-bounds in __copy_from_iter lib/iov_iter.c:249 [inline] BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0x951/0x1aa0 lib/iov_iter.c:481 Read of size 2048 at addr ffff88807a6c9000 by task kworker/u8:7/2425 CPU: 1 PID: 2425 Comm: kworker/u8:7 Not tainted 6.9.0-rc3-next-20240408-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: loop0 loop_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 memcpy_from_iter lib/iov_iter.c:73 [inline] iterate_bvec include/linux/iov_iter.h:122 [inline] iterate_and_advance2 include/linux/iov_iter.h:249 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] __copy_from_iter lib/iov_iter.c:249 [inline] copy_page_from_iter_atomic+0x951/0x1aa0 lib/iov_iter.c:481 generic_perform_write+0x39b/0x640 mm/filemap.c:4017 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2925 do_iter_readv_writev+0x5a4/0x800 vfs_iter_write+0x244/0x610 fs/read_write.c:895 lo_write_bvec drivers/block/loop.c:246 [inline] lo_write_simple drivers/block/loop.c:267 [inline] do_req_filebacked drivers/block/loop.c:491 [inline] loop_handle_cmd drivers/block/loop.c:1907 [inline] loop_process_work+0x13a3/0x1e60 drivers/block/loop.c:1942 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Allocated by task 10295: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4078 [inline] __kmalloc_noprof+0x200/0x400 mm/slub.c:4091 kmalloc_noprof include/linux/slab.h:664 [inline] hfsplus_read_wrapper+0x545/0x1340 fs/hfsplus/wrapper.c:179 hfsplus_fill_super+0x38e/0x1ca0 fs/hfsplus/super.c:419 mount_bdev+0x20a/0x2d0 fs/super.c:1658 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1779 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x72/0x7a The buggy address belongs to the object at ffff88807a6c9000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 512-byte region [ffff88807a6c9000, ffff88807a6c9200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a6c8 head: order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff80000000040(head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffefff(slab) raw: 00fff80000000040 ffff888015041c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001ffffefff 0000000000000000 head: 00fff80000000040 ffff888015041c80 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000001ffffefff 0000000000000000 head: 00fff80000000002 ffffea0001e9b201 dead000000000122 00000000ffffffff head: 0000000400000000 0000000000000000 00000000ffffffff 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5092, tgid -1064379058 (syz-executor.3), ts 5092, free_ts 67597403741 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2ce2/0x2d90 mm/page_alloc.c:3438 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696 __alloc_pages_node_noprof include/linux/gfp.h:244 [inline] alloc_pages_node_noprof include/linux/gfp.h:271 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2259 allocate_slab+0x5a/0x2e0 mm/slub.c:2422 new_slab mm/slub.c:2475 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3624 __slab_alloc+0x58/0xa0 mm/slub.c:3714 __slab_alloc_node mm/slub.c:3767 [inline] slab_alloc_node mm/slub.c:3945 [inline] kmalloc_trace_noprof+0x1d5/0x2b0 mm/slub.c:4104 kmalloc_noprof include/linux/slab.h:660 [inline] kzalloc_noprof include/linux/slab.h:775 [inline] cpuacct_css_alloc+0x55/0x140 kernel/sched/cpuacct.c:62 css_create kernel/cgroup/cgroup.c:5548 [inline] cgroup_apply_control_enable+0x39c/0xaf0 kernel/cgroup/cgroup.c:3217 cgroup_mkdir+0xa52/0xd30 kernel/cgroup/cgroup.c:5762 kernfs_iop_mkdir+0x253/0x3f0 fs/kernfs/dir.c:1246 vfs_mkdir+0x2f9/0x4f0 fs/namei.c:4123 do_mkdirat+0x264/0x3a0 fs/namei.c:4146 __do_sys_mkdirat fs/namei.c:4161 [inline] __se_sys_mkdirat fs/namei.c:4159 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4159 do_syscall_64+0xfb/0x240 page last free pid 5101 tgid 5101 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2601 __slab_free+0x31b/0x3d0 mm/slub.c:4304 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3897 [inline] slab_alloc_node mm/slub.c:3957 [inline] kmem_cache_alloc_noprof+0x135/0x290 mm/slub.c:3964 lsm_inode_alloc security/security.c:670 [inline] security_inode_alloc+0x28/0x120 security/security.c:1587 inode_init_always+0x947/0xc70 fs/inode.c:232 alloc_inode fs/inode.c:268 [inline] new_inode_pseudo+0x9e/0x1e0 fs/inode.c:1007 new_inode+0x22/0x1d0 fs/inode.c:1033 debugfs_get_inode fs/debugfs/inode.c:72 [inline] __debugfs_create_file+0x142/0x4b0 fs/debugfs/inode.c:425 ieee80211_register_hw+0x30bb/0x3d80 net/mac80211/main.c:1563 mac80211_hwsim_new_radio+0x25ac/0x4550 drivers/net/wireless/virtual/mac80211_hwsim.c:5464 hwsim_new_radio_nl+0xe4c/0x21d0 drivers/net/wireless/virtual/mac80211_hwsim.c:6145 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559 Memory state around the buggy address: ffff88807a6c9100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807a6c9180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807a6c9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807a6c9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807a6c9300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================