================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1c1/0x5a0 lib/iov_iter.c:633 Read of size 4 at addr ffff8880278f31b8 by task kworker/u8:7/2970 CPU: 0 UID: 0 PID: 2970 Comm: kworker/u8:7 Not tainted 6.15.0-rc1-next-20250411-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 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:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 iov_iter_revert+0x1c1/0x5a0 lib/iov_iter.c:633 netfs_retry_write_stream fs/netfs/write_retry.c:44 [inline] netfs_retry_writes+0x17f2/0x19d0 fs/netfs/write_retry.c:231 netfs_collect_write_results fs/netfs/write_collect.c:352 [inline] netfs_write_collection_worker+0x2fc0/0x3bf0 fs/netfs/write_collect.c:374 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xac3/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd50 kernel/workqueue.c:3400 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 6904: 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+0x9d/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x236/0x370 mm/slub.c:4362 kmalloc_noprof include/linux/slab.h:905 [inline] tty_ldisc_get+0x236/0x290 drivers/tty/tty_ldisc.c:165 tty_ldisc_init+0x19/0x70 drivers/tty/tty_ldisc.c:803 alloc_tty_struct+0xf5/0x7e0 drivers/tty/tty_io.c:3120 tty_init_dev+0x5b/0x4c0 drivers/tty/tty_io.c:1409 tty_open_by_driver drivers/tty/tty_io.c:2082 [inline] tty_open+0x9de/0xde0 drivers/tty/tty_io.c:2129 chrdev_open+0x514/0x600 fs/char_dev.c:414 do_dentry_open+0xdec/0x1960 fs/open.c:956 vfs_open+0x3b/0x370 fs/open.c:1086 do_open fs/namei.c:3849 [inline] path_openat+0x2caf/0x35d0 fs/namei.c:4008 do_filp_open+0x284/0x4e0 fs/namei.c:4035 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x249/0x2a0 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6903: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2389 [inline] slab_free mm/slub.c:4646 [inline] kfree+0x198/0x430 mm/slub.c:4845 tty_ldisc_put drivers/tty/tty_ldisc.c:184 [inline] tty_ldisc_kill+0x127/0x1a0 drivers/tty/tty_ldisc.c:614 tty_ldisc_release+0x174/0x200 drivers/tty/tty_ldisc.c:781 tty_release_struct+0x2b/0xe0 drivers/tty/tty_io.c:1690 tty_release+0xd07/0x12c0 drivers/tty/tty_io.c:1861 __fput+0x3e9/0x9f0 fs/file_table.c:465 task_work_run+0x251/0x310 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x13f/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880278f31a0 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 [ffff8880278f31a0, ffff8880278f31b0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880278f3260 pfn:0x278f3 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b041640 0000000000000000 0000000000000001 raw: ffff8880278f3260 0000000080800010 00000000f5000000 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 0x52c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 3017, tgid 3017 (kworker/u8:8), ts 198594100210, free_ts 188833219660 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x360a/0x37a0 mm/page_alloc.c:3700 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4982 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2459 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2623 new_slab mm/slub.c:2676 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3862 __slab_alloc+0x58/0xa0 mm/slub.c:3952 __slab_alloc_node mm/slub.c:4027 [inline] slab_alloc_node mm/slub.c:4188 [inline] __kmalloc_cache_noprof+0x26a/0x370 mm/slub.c:4357 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fuse_folios_alloc fs/fuse/fuse_i.h:1082 [inline] fuse_writepage_args_alloc fs/fuse/file.c:2109 [inline] fuse_writepage_args_setup+0x165/0x9f0 fs/fuse/file.c:2157 fuse_writepages_fill+0x74e/0x10e0 fs/fuse/file.c:2406 write_cache_pages+0xd2/0x240 mm/page-writeback.c:2613 fuse_writepages+0x2b7/0x4a0 fs/fuse/file.c:2467 do_writepages+0x38c/0x640 mm/page-writeback.c:2635 __writeback_single_inode+0x14f/0x10d0 fs/fs-writeback.c:1680 writeback_sb_inodes+0x822/0x1360 fs/fs-writeback.c:1976 __writeback_inodes_wb+0x11b/0x260 fs/fs-writeback.c:2047 page last free pid 5887 tgid 5887 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xde8/0x10a0 mm/page_alloc.c:2725 kasan_depopulate_vmalloc_pte+0x65/0x70 mm/kasan/shadow.c:406 apply_to_pte_range mm/memory.c:2946 [inline] apply_to_pmd_range mm/memory.c:2994 [inline] apply_to_pud_range mm/memory.c:3030 [inline] apply_to_p4d_range mm/memory.c:3066 [inline] __apply_to_page_range+0x85e/0xdb0 mm/memory.c:3102 kasan_release_vmalloc+0xa5/0xd0 mm/kasan/shadow.c:526 kasan_release_vmalloc_node mm/vmalloc.c:2196 [inline] purge_vmap_node+0x231/0x8e0 mm/vmalloc.c:2213 __purge_vmap_area_lazy+0x753/0xb20 mm/vmalloc.c:2304 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2338 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xac3/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd50 kernel/workqueue.c:3400 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880278f3080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff8880278f3100: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc >ffff8880278f3180: 00 00 fc fc fa fb fc fc 00 00 fc fc fa fb fc fc ^ ffff8880278f3200: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff8880278f3280: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ==================================================================