================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert lib/iov_iter.c:633 [inline] BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x443/0x5a0 lib/iov_iter.c:611 Read of size 4 at addr ffff888034d4f8f8 by task kworker/u8:6/1150 CPU: 1 UID: 0 PID: 1150 Comm: kworker/u8:6 Not tainted 6.15.0-syzkaller-08297-ge0797d3b91de #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 lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 iov_iter_revert lib/iov_iter.c:633 [inline] iov_iter_revert+0x443/0x5a0 lib/iov_iter.c:611 netfs_retry_write_stream fs/netfs/write_retry.c:44 [inline] netfs_retry_writes+0x166d/0x1a50 fs/netfs/write_retry.c:231 netfs_collect_write_results fs/netfs/write_collect.c:352 [inline] netfs_write_collection_worker+0x23fd/0x3830 fs/netfs/write_collect.c:374 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 8591: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_noprof+0x223/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] lsm_blob_alloc+0x68/0x90 security/security.c:684 lsm_task_alloc security/security.c:771 [inline] security_task_alloc+0x2d/0x260 security/security.c:3160 copy_process+0x250f/0x9170 kernel/fork.c:2411 kernel_clone+0xfc/0x960 kernel/fork.c:2859 __do_sys_clone3+0x212/0x290 kernel/fork.c:3163 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 8634: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/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+0x2b4/0x4d0 mm/slub.c:4841 security_task_free+0x9d/0x1a0 security/security.c:3181 __put_task_struct+0x124/0x530 kernel/fork.c:999 put_task_struct include/linux/sched/task.h:145 [inline] put_task_struct include/linux/sched/task.h:132 [inline] delayed_put_task_struct+0x115/0x2e0 kernel/exit.c:230 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 do_softirq kernel/softirq.c:480 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:467 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:407 local_bh_enable include/linux/bottom_half.h:33 [inline] ipt_do_table+0xd55/0x1ae0 net/ipv4/netfilter/ip_tables.c:357 nf_hook_entry_hookfn include/linux/netfilter.h:157 [inline] nf_hook_slow+0xbe/0x200 net/netfilter/core.c:623 nf_hook+0x370/0x680 include/linux/netfilter.h:272 __ip_local_out+0x339/0x7c0 net/ipv4/ip_output.c:118 ip_local_out net/ipv4/ip_output.c:127 [inline] __ip_queue_xmit+0x872/0x26c0 net/ipv4/ip_output.c:527 __tcp_transmit_skb+0x2686/0x3e90 net/ipv4/tcp_output.c:1479 tcp_transmit_skb net/ipv4/tcp_output.c:1497 [inline] tcp_write_xmit+0x1274/0x84e0 net/ipv4/tcp_output.c:2838 __tcp_push_pending_frames+0xaf/0x390 net/ipv4/tcp_output.c:3021 tcp_send_fin+0x158/0xc80 net/ipv4/tcp_output.c:3626 __tcp_close+0x96b/0xff0 net/ipv4/tcp.c:3186 tcp_close+0x28/0x120 net/ipv4/tcp.c:3277 inet_release+0x13c/0x280 net/ipv4/af_inet.c:435 __sock_release+0xb3/0x270 net/socket.c:647 sock_close+0x1c/0x30 net/socket.c:1391 __fput+0x3ff/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888034d4f8e0 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 [ffff888034d4f8e0, ffff888034d4f8f0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888034d4fbe0 pfn:0x34d4f flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801b441640 ffffea0000cf30d0 ffffea000073d7d0 raw: ffff888034d4fbe0 000000000080007f 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 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 5807, tgid 5807 (syz-executor), ts 107647715684, free_ts 107647643230 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1710 prep_new_page mm/page_alloc.c:1718 [inline] get_page_from_freelist+0x135c/0x3950 mm/page_alloc.c:3680 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4970 alloc_slab_page mm/slub.c:2452 [inline] allocate_slab mm/slub.c:2618 [inline] new_slab+0x94/0x330 mm/slub.c:2672 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3858 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948 __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kvmalloc_node_noprof+0x3af/0x620 mm/slub.c:5012 xt_jumpstack_alloc net/netfilter/x_tables.c:1355 [inline] xt_replace_table+0x1e3/0x950 net/netfilter/x_tables.c:1394 __do_replace+0x1cf/0x9e0 net/ipv4/netfilter/ip_tables.c:1064 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x86d/0xae0 net/ipv4/netfilter/ip_tables.c:1635 nf_setsockopt+0x8d/0xf0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0xcb/0xf0 net/ipv4/ip_sockglue.c:1424 tcp_setsockopt+0xa7/0x100 net/ipv4/tcp.c:4108 do_sock_setsockopt+0x224/0x470 net/socket.c:2296 __sys_setsockopt+0x1a0/0x230 net/socket.c:2321 __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __x64_sys_setsockopt+0xbd/0x160 net/socket.c:2324 page last free pid 5807 tgid 5807 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2717 ___free_pages_bulk mm/kasan/shadow.c:332 [inline] __kasan_populate_vmalloc mm/kasan/shadow.c:375 [inline] kasan_populate_vmalloc+0x18c/0x1f0 mm/kasan/shadow.c:417 alloc_vmap_area+0x963/0x28f0 mm/vmalloc.c:2067 __get_vm_area_node+0x1ca/0x330 mm/vmalloc.c:3170 __vmalloc_node_range_noprof+0x277/0x1520 mm/vmalloc.c:3837 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:3940 xt_counters_alloc+0x4c/0x70 net/netfilter/x_tables.c:1380 __do_replace+0x97/0x9e0 net/ipv4/netfilter/ip_tables.c:1046 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x86d/0xae0 net/ipv4/netfilter/ip_tables.c:1635 nf_setsockopt+0x8d/0xf0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0xcb/0xf0 net/ipv4/ip_sockglue.c:1424 tcp_setsockopt+0xa7/0x100 net/ipv4/tcp.c:4108 do_sock_setsockopt+0x224/0x470 net/socket.c:2296 __sys_setsockopt+0x1a0/0x230 net/socket.c:2321 __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __x64_sys_setsockopt+0xbd/0x160 net/socket.c:2324 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 Memory state around the buggy address: ffff888034d4f780: 00 00 fc fc fa fb fc fc 00 00 fc fc 00 00 fc fc ffff888034d4f800: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc >ffff888034d4f880: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc ^ ffff888034d4f900: 00 00 fc fc fa fb fc fc 00 00 fc fc fa fb fc fc ffff888034d4f980: 00 00 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc ==================================================================