================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:633 Read of size 4 at addr ffff88806b8f43f8 by task kworker/u8:16/12631 CPU: 0 UID: 0 PID: 12631 Comm: kworker/u8:16 Not tainted 6.13.0-next-20250203-syzkaller #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+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 10846: 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] __do_kmalloc_node mm/slub.c:4294 [inline] __kmalloc_node_noprof+0x290/0x4d0 mm/slub.c:4300 __kvmalloc_node_noprof+0x72/0x190 mm/util.c:662 kvmalloc_array_node_noprof include/linux/slab.h:1063 [inline] io_alloc_cache_init+0x3f/0x140 io_uring/alloc_cache.c:25 io_ring_ctx_alloc+0x453/0xb70 io_uring/io_uring.c:317 io_uring_create+0x40/0xc00 io_uring/io_uring.c:3617 io_uring_setup io_uring/io_uring.c:3791 [inline] __do_sys_io_uring_setup io_uring/io_uring.c:3818 [inline] __se_sys_io_uring_setup+0x2ba/0x330 io_uring/io_uring.c:3812 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 Freed by task 35: 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:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x196/0x430 mm/slub.c:4757 io_alloc_cache_free+0x24e/0x2a0 io_uring/alloc_cache.c:16 io_ring_ctx_free+0x9e/0x530 io_uring/io_uring.c:2705 io_ring_exit_work+0x813/0x8a0 io_uring/io_uring.c:2939 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88806b8f4200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 248 bytes to the right of allocated 256-byte region [ffff88806b8f4200, ffff88806b8f4300) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6b8f4 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801ac41b40 ffffea0001f5ef00 dead000000000002 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801ac41b40 ffffea0001f5ef00 dead000000000002 head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffea0001ae3d01 ffffffffffffffff 0000000000000000 head: 0000000700000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 10813, tgid 10804 (syz.8.1095), ts 443363700909, free_ts 424107173863 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __kmalloc_cache_noprof+0x27b/0x390 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] ____ip_mc_inc_group+0x5ac/0xe90 net/ipv4/igmp.c:1529 __ip_mc_inc_group net/ipv4/igmp.c:1567 [inline] ip_mc_inc_group net/ipv4/igmp.c:1573 [inline] ip_mc_up+0x124/0x300 net/ipv4/igmp.c:1874 inetdev_event+0xfa4/0x1550 net/ipv4/devinet.c:1638 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:9249 devinet_ioctl+0xcce/0x1ac0 net/ipv4/devinet.c:1208 inet_ioctl+0x3d7/0x4f0 net/ipv4/af_inet.c:1001 page last free pid 10553 tgid 10553 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660 mm_free_pgd kernel/fork.c:815 [inline] __mmdrop+0xb9/0x3d0 kernel/fork.c:931 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9ad/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 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 Memory state around the buggy address: ffff88806b8f4280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806b8f4300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806b8f4380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88806b8f4400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806b8f4480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================