================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:633 Read of size 4 at addr ffff88802f86ac78 by task kworker/u8:9/5922 CPU: 0 UID: 0 PID: 5922 Comm: kworker/u8:9 Not tainted 6.13.0-syzkaller-07644-gc2da8b3f914f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: events_unbound netfs_write_collection_worker Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:633 netfs_retry_write_stream fs/netfs/write_retry.c:44 [inline] netfs_retry_writes+0x17db/0x19b0 fs/netfs/write_retry.c:229 netfs_collect_write_results fs/netfs/write_collect.c:352 [inline] netfs_write_collection_worker+0x2f90/0x3bb0 fs/netfs/write_collect.c:374 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa68/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7ab/0x920 kernel/kthread.c:464 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 1: 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:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4329 kmalloc_noprof include/linux/slab.h:901 [inline] add_stack_record_to_list mm/page_owner.c:172 [inline] inc_stack_record_count mm/page_owner.c:214 [inline] __set_page_owner+0x55f/0x800 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e1/0x780 mm/mempolicy.c:2269 alloc_slab_page+0x6a/0x110 mm/slub.c:2423 allocate_slab+0x5a/0x2b0 mm/slub.c:2589 new_slab mm/slub.c:2642 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3830 __slab_alloc+0x58/0xa0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] kmem_cache_alloc_noprof+0x268/0x380 mm/slub.c:4175 getname_flags+0xb7/0x540 fs/namei.c:139 user_path_at+0x24/0x60 fs/namei.c:3069 do_faccessat+0x5a8/0xbd0 fs/open.c:489 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802f86ac60 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 8 bytes to the right of allocated 16-byte region [ffff88802f86ac60, ffff88802f86ac70) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802f86a140 pfn:0x2f86a flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801ac41640 ffffea0000be0f50 ffff88801ac40408 raw: ffff88802f86a140 000000000080007e 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 26114105816, free_ts 22654373303 create_dummy_stack mm/page_owner.c:94 [inline] register_dummy_stack+0x8a/0xe0 mm/page_owner.c:100 init_page_owner+0x3e/0x970 mm/page_owner.c:118 invoke_init_callbacks mm/page_ext.c:148 [inline] page_ext_init+0x731/0x790 mm/page_ext.c:497 mm_core_init+0x4c/0x60 mm/mm_init.c:2669 page last free pid 1200 tgid 1200 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xd3f/0x1010 mm/page_alloc.c:2659 kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2832 [inline] apply_to_pmd_range mm/memory.c:2876 [inline] apply_to_pud_range mm/memory.c:2912 [inline] apply_to_p4d_range mm/memory.c:2948 [inline] __apply_to_page_range+0x808/0xde0 mm/memory.c:2982 kasan_release_vmalloc+0xa5/0xd0 mm/kasan/shadow.c:529 kasan_release_vmalloc_node mm/vmalloc.c:2196 [inline] purge_vmap_node+0x22f/0x8d0 mm/vmalloc.c:2213 __purge_vmap_area_lazy+0x708/0xae0 mm/vmalloc.c:2304 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2338 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa68/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7ab/0x920 kernel/kthread.c:464 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88802f86ab00: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ffff88802f86ab80: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc >ffff88802f86ac00: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ^ ffff88802f86ac80: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ffff88802f86ad00: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ==================================================================