================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1da/0x5f0 lib/iov_iter.c:633 Read of size 4 at addr ffff8880239331f8 by task kworker/u8:8/3497 CPU: 1 UID: 0 PID: 3497 Comm: kworker/u8:8 Not tainted 6.15.0-rc6-syzkaller-00278-g172a9d94339c #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: events_unbound netfs_write_collection_worker Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xb4/0x290 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 iov_iter_revert+0x1da/0x5f0 lib/iov_iter.c:633 netfs_retry_write_stream fs/netfs/write_retry.c:44 [inline] netfs_retry_writes+0x1645/0x1840 fs/netfs/write_retry.c:231 netfs_collect_write_results fs/netfs/write_collect.c:352 [inline] netfs_write_collection_worker+0x2007/0x2bd0 fs/netfs/write_collect.c:374 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xadb/0x17a0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 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 9680: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4358 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] ref_tracker_alloc+0x133/0x460 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4331 [inline] netdev_hold include/linux/netdevice.h:4360 [inline] dst_init+0xd9/0x450 net/core/dst.c:52 dst_alloc+0x12a/0x170 net/core/dst.c:93 rt_dst_alloc net/ipv4/route.c:1638 [inline] __mkroute_output net/ipv4/route.c:2632 [inline] ip_route_output_key_hash_rcu+0x140d/0x2330 net/ipv4/route.c:2854 ip_route_output_key_hash+0x1b9/0x2e0 net/ipv4/route.c:2683 __ip_route_output_key include/net/route.h:169 [inline] ip_route_connect include/net/route.h:345 [inline] __ip4_datagram_connect+0x8ae/0x1230 net/ipv4/datagram.c:49 __ip6_datagram_connect+0x1b3/0x1150 net/ipv6/datagram.c:157 udpv6_connect+0x36/0x240 net/ipv6/udp.c:1310 __sys_connect_file net/socket.c:2038 [inline] __sys_connect+0x313/0x440 net/socket.c:2057 __do_sys_connect net/socket.c:2063 [inline] __se_sys_connect net/socket.c:2060 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2060 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880239331c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes to the right of allocated 32-byte region [ffff8880239331c0, ffff8880239331e0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23933 ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801a041780 ffffea0001372d80 dead000000000003 raw: 0000000000000000 0000000000400040 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 0x52800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP), pid 1259, tgid 1259 (kworker/u8:3), ts 10243867270, free_ts 10230530540 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x21c7/0x22a0 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:905 [inline] slab_free_hook mm/slub.c:2332 [inline] slab_free mm/slub.c:4642 [inline] kmem_cache_free+0x169/0x3f0 mm/slub.c:4744 fput_close+0x119/0x200 fs/file_table.c:582 path_openat+0x313c/0x3830 fs/namei.c:4048 do_filp_open+0x1fa/0x410 fs/namei.c:4066 do_open_execat+0x135/0x450 fs/exec.c:893 alloc_bprm+0x28/0xbc0 fs/exec.c:1518 kernel_execve+0x9b/0x9f0 fs/exec.c:1993 call_usermodehelper_exec_async+0x210/0x360 kernel/umh.c:109 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 page last free pid 976 tgid 976 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xb05/0xcd0 mm/page_alloc.c:2725 vfree+0x1a6/0x330 mm/vmalloc.c:3384 delayed_vfree_work+0x55/0x80 mm/vmalloc.c:3304 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xadb/0x17a0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 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: ffff888023933080: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ffff888023933100: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc >ffff888023933180: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff888023933200: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff888023933280: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================