================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1da/0x5f0 lib/iov_iter.c:633 Read of size 4 at addr ffff88802aef3058 by task kworker/u8:11/6313 CPU: 0 UID: 0 PID: 6313 Comm: kworker/u8:11 Not tainted 6.15.0-rc6-syzkaller-00051-g405e6c37c89e #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+0xade/0x17a0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x4e/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5826: 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] __do_kmalloc_node mm/slub.c:4327 [inline] __kvmalloc_node_noprof+0x314/0x5e0 mm/slub.c:5012 xt_jumpstack_alloc net/netfilter/x_tables.c:1355 [inline] xt_replace_table+0x180/0x790 net/netfilter/x_tables.c:1394 __do_replace+0x15a/0x980 net/ipv6/netfilter/ip6_tables.c:1081 do_replace net/ipv6/netfilter/ip6_tables.c:1158 [inline] do_ip6t_set_ctl+0xa16/0xce0 net/ipv6/netfilter/ip6_tables.c:1644 nf_setsockopt+0x26f/0x290 net/netfilter/nf_sockopt.c:101 do_sock_setsockopt+0x25a/0x3e0 net/socket.c:2296 __sys_setsockopt net/socket.c:2321 [inline] __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __x64_sys_setsockopt+0x18b/0x220 net/socket.c:2324 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 Freed by task 5826: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free mm/slub.c:4642 [inline] kfree+0x193/0x440 mm/slub.c:4841 xt_free_table_info+0xf2/0x160 net/netfilter/x_tables.c:1209 __do_replace+0x7a2/0x980 net/ipv6/netfilter/ip6_tables.c:1101 do_replace net/ipv6/netfilter/ip6_tables.c:1158 [inline] do_ip6t_set_ctl+0xa16/0xce0 net/ipv6/netfilter/ip6_tables.c:1644 nf_setsockopt+0x26f/0x290 net/netfilter/nf_sockopt.c:101 do_sock_setsockopt+0x25a/0x3e0 net/socket.c:2296 __sys_setsockopt net/socket.c:2321 [inline] __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __x64_sys_setsockopt+0x18b/0x220 net/socket.c:2324 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 ffff88802aef3040 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 [ffff88802aef3040, ffff88802aef3050) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2aef3 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801a041640 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000800080 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5951, tgid 5951 (syz-executor), ts 99519005243, free_ts 98261712080 create_dummy_stack mm/page_owner.c:94 [inline] register_dummy_stack+0x89/0xe0 mm/page_owner.c:100 init_page_owner+0x29/0x7b0 mm/page_owner.c:118 invoke_init_callbacks mm/page_ext.c:148 [inline] page_ext_init+0x72e/0x790 mm/page_ext.c:497 mm_core_init+0x5b/0x70 mm/mm_init.c:2784 page last free pid 5840 tgid 5840 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xb0e/0xcd0 mm/page_alloc.c:2725 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0xca8/0x1710 kernel/rcu/tree.c:2824 handle_softirqs+0x286/0x870 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Memory state around the buggy address: ffff88802aef2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802aef2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802aef3000: 00 00 fc fc 00 00 fc fc fa fb fc fc 00 00 fc fc ^ ffff88802aef3080: 00 00 fc fc 00 00 fc fc fa fb fc fc 00 00 fc fc ffff88802aef3100: fa fb fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ==================================================================