================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:631 Read of size 4 at addr ffff88802cc42838 by task kworker/u8:8/5321 CPU: 0 UID: 0 PID: 5321 Comm: kworker/u8:8 Not tainted 6.11.0-syzkaller-07341-gbaeb9a7d8b60 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Workqueue: events_unbound netfs_write_collection_worker Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 iov_iter_revert+0x1c1/0x590 lib/iov_iter.c:631 netfs_retry_write_stream fs/netfs/write_collect.c:181 [inline] netfs_retry_writes fs/netfs/write_collect.c:361 [inline] netfs_collect_write_results fs/netfs/write_collect.c:529 [inline] netfs_write_collection_worker+0x3ac1/0x4950 fs/netfs/write_collect.c:551 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5563: 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:257 [inline] __kmalloc_cache_noprof+0x19c/0x2c0 mm/slub.c:4296 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1004 [inline] ref_tracker_alloc+0x14b/0x490 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4050 [inline] netdev_hold include/linux/netdevice.h:4079 [inline] netdev_queue_add_kobject net/core/net-sysfs.c:1786 [inline] netdev_queue_update_kobjects+0x181/0x550 net/core/net-sysfs.c:1841 register_queue_kobjects net/core/net-sysfs.c:1903 [inline] netdev_register_kobject+0x265/0x310 net/core/net-sysfs.c:2143 register_netdevice+0x12c5/0x1b00 net/core/dev.c:10487 __ip_tunnel_create+0x2b4/0x380 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x21c/0x720 net/ipv4/ip_tunnel.c:1160 vti_init_net+0x2e/0xf0 net/ipv4/ip_vti.c:517 ops_init+0x320/0x590 net/core/net_namespace.c:139 setup_net+0x287/0x9e0 net/core/net_namespace.c:356 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:494 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x619/0xc10 kernel/fork.c:3308 __do_sys_unshare kernel/fork.c:3379 [inline] __se_sys_unshare kernel/fork.c:3377 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3377 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 The buggy address belongs to the object at ffff88802cc42800 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 [ffff88802cc42800, ffff88802cc42820) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2cc42 ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000000 ffff88801ac41780 ffffea00009f5640 dead000000000003 raw: 0000000000000000 0000000000400040 00000001fdffffff 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 4190, tgid 4190 (kworker/u8:1), ts 16905710898, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 alloc_slab_page+0x6a/0x130 mm/slub.c:2413 allocate_slab+0x5a/0x2f0 mm/slub.c:2579 new_slab mm/slub.c:2632 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3819 __slab_alloc+0x58/0xa0 mm/slub.c:3909 __slab_alloc_node mm/slub.c:3962 [inline] slab_alloc_node mm/slub.c:4123 [inline] __kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4291 kmalloc_noprof include/linux/slab.h:878 [inline] slab_free_hook mm/slub.c:2295 [inline] slab_free mm/slub.c:4580 [inline] kmem_cache_free+0x178/0x420 mm/slub.c:4682 __exit_signal kernel/exit.c:212 [inline] release_task+0x111e/0x1830 kernel/exit.c:258 exit_notify kernel/exit.c:776 [inline] do_exit+0x1b01/0x27f0 kernel/exit.c:902 call_usermodehelper_exec_async+0x37a/0x380 kernel/umh.c:123 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page_owner free stack trace missing Memory state around the buggy address: ffff88802cc42700: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff88802cc42780: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc >ffff88802cc42800: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff88802cc42880: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff88802cc42900: 00 00 04 fc fc fc fc fc 00 00 04 fc fc fc fc fc ==================================================================