================================================================== BUG: KASAN: slab-out-of-bounds in cleancache_fs_enabled_mapping include/linux/cleancache.h:56 [inline] BUG: KASAN: slab-out-of-bounds in cleancache_invalidate_page include/linux/cleancache.h:110 [inline] BUG: KASAN: slab-out-of-bounds in unaccount_page_cache_page+0x99f/0xa80 mm/filemap.c:175 Read of size 4 at addr ffff888195134470 by task syz-executor.2/11345 CPU: 1 PID: 11345 Comm: syz-executor.2 Tainted: G W 5.10.194-syzkaller-00508-ga27512601c2d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 cleancache_fs_enabled_mapping include/linux/cleancache.h:56 [inline] cleancache_invalidate_page include/linux/cleancache.h:110 [inline] unaccount_page_cache_page+0x99f/0xa80 mm/filemap.c:175 __delete_from_page_cache+0xd0/0x5d0 mm/filemap.c:243 __remove_mapping+0x567/0x690 mm/vmscan.c:978 shrink_page_list+0x1f38/0x4c60 mm/vmscan.c:1491 shrink_inactive_list+0x591/0x1150 mm/vmscan.c:2048 shrink_list mm/vmscan.c:2267 [inline] shrink_lruvec+0xced/0x3860 mm/vmscan.c:5434 shrink_node_memcgs mm/vmscan.c:5621 [inline] shrink_node+0xdf3/0x1fb0 mm/vmscan.c:5651 shrink_zones mm/vmscan.c:5854 [inline] do_try_to_free_pages+0x67e/0x15e0 mm/vmscan.c:5912 try_to_free_mem_cgroup_pages+0x369/0x830 mm/vmscan.c:6230 try_charge+0x4b8/0x15f0 mm/memcontrol.c:2742 __mem_cgroup_charge+0x147/0x6e0 mm/memcontrol.c:6847 mem_cgroup_charge include/linux/memcontrol.h:458 [inline] wp_page_copy+0x295/0x1940 mm/memory.c:3161 do_wp_page+0x71b/0xca0 handle_pte_fault+0x1652/0x3de0 mm/memory.c:4776 ___handle_speculative_fault mm/memory.c:5163 [inline] __handle_speculative_fault+0x1156/0x1c60 mm/memory.c:5207 handle_speculative_fault include/linux/mm.h:1824 [inline] do_user_addr_fault arch/x86/mm/fault.c:1319 [inline] handle_page_fault arch/x86/mm/fault.c:1462 [inline] exc_page_fault+0x234/0x5b0 arch/x86/mm/fault.c:1518 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 RIP: 0033:0x7f809c8de925 Code: 0c 48 89 df 41 83 c6 01 e8 18 e1 ff ff 48 83 c3 20 49 39 dc 75 df 44 89 75 00 8b 05 e5 26 16 00 48 8b 15 ae fd c8 00 83 c0 01 <89> 05 d5 26 16 00 89 02 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f RSP: 002b:00007ffc14c9c8c0 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000001b2ff20018 RCX: 0000001b2ff20000 RDX: 0000001b2ff20000 RSI: 0000001b2ff20018 RDI: 00000000812b5831 RBP: 0000001b2ff20020 R08: 0000001b30320000 R09: 0000000000000076 R10: 00000000812b5835 R11: 0000000000000246 R12: 0000001b2ff2001c R13: 00007f809ca44f80 R14: 00007ffc14c9ca80 R15: 00007f809ca44f80 Allocated by task 5220: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] __kmalloc+0x1aa/0x330 mm/slub.c:4033 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] __register_sysctl_table+0xea/0x1240 fs/proc/proc_sysctl.c:1321 register_net_sysctl+0x2c/0x40 net/sysctl_net.c:121 __devinet_sysctl_register+0x1d3/0x2a0 net/ipv4/devinet.c:2572 devinet_sysctl_register+0x16a/0x1e0 net/ipv4/devinet.c:2612 inetdev_init+0x25f/0x460 net/ipv4/devinet.c:276 inetdev_event+0x205/0x1040 net/ipv4/devinet.c:1531 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2080 register_netdevice+0x1066/0x13f0 net/core/dev.c:10059 register_vlan_dev+0x280/0x5e0 net/8021q/vlan.c:176 register_vlan_device+0x450/0x590 net/8021q/vlan.c:274 vlan_ioctl_handler+0x29b/0x9d0 net/8021q/vlan.c:619 sock_ioctl+0x562/0x760 net/socket.c:1146 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl+0x114/0x190 fs/ioctl.c:739 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 insert_work+0x56/0x310 kernel/workqueue.c:1352 __queue_work+0x970/0xd10 kernel/workqueue.c:1518 queue_work_on+0x105/0x160 kernel/workqueue.c:1545 queue_work include/linux/workqueue.h:514 [inline] schedule_work include/linux/workqueue.h:575 [inline] destroy_super_rcu+0xd1/0xe0 fs/super.c:172 rcu_do_batch+0x597/0xc40 kernel/rcu/tree.c:2493 rcu_core+0x5ad/0xe40 kernel/rcu/tree.c:2734 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2747 __do_softirq+0x268/0x5bb kernel/softirq.c:309 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2975 [inline] call_rcu+0x135/0x11f0 kernel/rcu/tree.c:3049 __put_super+0x25c/0x2b0 fs/super.c:299 put_super fs/super.c:313 [inline] deactivate_locked_super+0xe1/0x110 fs/super.c:346 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1118 __cleanup_mnt+0x19/0x20 fs/namespace.c:1125 task_work_run+0x129/0x190 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xbf/0xd0 kernel/entry/common.c:172 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0xc5/0x1d0 kernel/entry/common.c:274 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The buggy address belongs to the object at ffff888195134000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1136 bytes inside of 2048-byte region [ffff888195134000, ffff888195134800) The buggy address belongs to the page: page:ffffea0006544c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x195130 head:ffffea0006544c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042d80 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 25214, ts 907324310525, free_ts 821747188093 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5346 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] __kmalloc+0x204/0x330 mm/slub.c:4029 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] ops_init+0x8e/0x4a0 net/core/net_namespace.c:131 setup_net+0x367/0xbf0 net/core/net_namespace.c:342 copy_net_ns+0x331/0x520 net/core/net_namespace.c:483 create_new_namespaces+0x410/0x660 kernel/nsproxy.c:110 copy_namespaces+0x1d1/0x220 kernel/nsproxy.c:179 copy_process+0x11a0/0x3340 kernel/fork.c:2178 kernel_clone+0x21e/0x9e0 kernel/fork.c:2566 __do_sys_clone3 kernel/fork.c:2850 [inline] __se_sys_clone3 kernel/fork.c:2834 [inline] __x64_sys_clone3+0x376/0x3a0 kernel/fork.c:2834 do_syscall_64+0x34/0x70 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page+0x9e/0x370 mm/page_alloc.c:5405 __free_pages+0x67/0xc0 mm/page_alloc.c:5416 __vunmap+0x7bc/0x8f0 mm/vmalloc.c:2301 __vfree mm/vmalloc.c:2349 [inline] vfree+0x5c/0x80 mm/vmalloc.c:2380 __do_replace+0x298/0xab0 net/ipv4/netfilter/ip_tables.c:1098 do_replace net/ipv4/netfilter/ip_tables.c:1138 [inline] do_ipt_set_ctl+0x2cf7/0x3e80 net/ipv4/netfilter/ip_tables.c:1628 nf_setsockopt+0x274/0x2a0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x2b0a/0x4760 net/ipv4/ip_sockglue.c:1442 tcp_setsockopt+0x22d/0x3660 net/ipv4/tcp.c:3463 sock_common_setsockopt+0xa2/0xc0 net/core/sock.c:3302 __sys_setsockopt+0x502/0x870 net/socket.c:2127 __do_sys_setsockopt net/socket.c:2138 [inline] __se_sys_setsockopt net/socket.c:2135 [inline] __x64_sys_setsockopt+0xbf/0xd0 net/socket.c:2135 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Memory state around the buggy address: ffff888195134300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888195134380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888195134400: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff888195134480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888195134500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================