================================================================== 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 ffff888166349470 by task syz-executor.5/24881 CPU: 0 PID: 24881 Comm: syz-executor.5 Not tainted 5.10.199-syzkaller-00307-gd30b996835c0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/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:2068 shrink_list mm/vmscan.c:2287 [inline] shrink_lruvec+0xced/0x3860 mm/vmscan.c:5466 shrink_node_memcgs mm/vmscan.c:5653 [inline] shrink_node+0xdf3/0x1fb0 mm/vmscan.c:5683 shrink_zones mm/vmscan.c:5886 [inline] do_try_to_free_pages+0x67e/0x15e0 mm/vmscan.c:5944 try_to_free_mem_cgroup_pages+0x369/0x830 mm/vmscan.c:6262 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] __add_to_page_cache_locked+0x29d/0xba0 mm/filemap.c:854 add_to_page_cache_lru+0x117/0x2c0 mm/filemap.c:948 pagecache_get_page+0x71e/0x950 mm/filemap.c:1859 grab_cache_page_write_begin+0x5d/0xa0 mm/filemap.c:3459 ext4_da_write_begin+0x587/0xf60 fs/ext4/inode.c:3055 generic_perform_write+0x2cd/0x570 mm/filemap.c:3509 ext4_buffered_write_iter+0x482/0x610 fs/ext4/file.c:271 ext4_file_write_iter+0x193/0x1c80 fs/ext4/file.c:685 __kernel_write+0x5ab/0x9d0 fs/read_write.c:550 dump_emit+0x261/0x3a0 fs/coredump.c:849 dump_user_range+0x71/0x1a0 fs/coredump.c:902 elf_core_dump+0x33bd/0x3c10 fs/binfmt_elf.c:2287 do_coredump+0x1eb8/0x2d60 fs/coredump.c:811 get_signal+0x102c/0x1410 kernel/signal.c:2768 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] irqentry_exit_to_user_mode+0x5a/0x80 kernel/entry/common.c:287 irqentry_exit+0x12/0x60 kernel/entry/common.c:375 exc_general_protection+0x415/0x490 arch/x86/kernel/traps.c:557 asm_exc_general_protection+0x1e/0x30 arch/x86/include/asm/idtentry.h:565 RIP: 0033:0x7fb44cffdaf1 Code: c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 48 3d 01 f0 ff ff 73 01 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:00000000200001a0 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fb44d11cf80 RCX: 00007fb44cffdae9 RDX: 00000000200001c0 RSI: 00000000200001a0 RDI: 0000000100000000 RBP: 00007fb44d04947a R08: 0000000020000280 R09: 0000000020000280 R10: 0000000020000240 R11: 0000000000000206 R12: 0000000000000000 R13: 000000000000000b R14: 00007fb44d11cf80 R15: 00007fffced14348 Allocated by task 20708: 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_slab_alloc+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_zalloc include/linux/slab.h:654 [inline] __kernfs_new_node+0xdb/0x700 fs/kernfs/dir.c:635 kernfs_new_node+0x97/0x170 fs/kernfs/dir.c:699 __kernfs_create_file+0x4a/0x270 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x273/0x320 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x573/0xf00 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x5b/0x130 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2346 [inline] device_add_attrs+0x8b/0x3e0 drivers/base/core.c:2494 device_add+0x4da/0xbc0 drivers/base/core.c:3206 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:1997 register_netdevice+0xe9b/0x13f0 net/core/dev.c:10028 __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x28d/0x750 net/ipv4/ip_tunnel.c:1069 ipip_init_net+0x29/0x30 net/ipv4/ipip.c:645 ops_init+0x1cf/0x4a0 net/core/net_namespace.c:141 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 unshare_nsproxy_namespaces+0x126/0x180 kernel/nsproxy.c:231 ksys_unshare+0x54c/0x9a0 kernel/fork.c:3080 __do_sys_unshare kernel/fork.c:3148 [inline] __se_sys_unshare kernel/fork.c:3146 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3146 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The buggy address belongs to the object at ffff8881663493e8 which belongs to the cache kernfs_node_cache of size 136 The buggy address is located 0 bytes to the right of 136-byte region [ffff8881663493e8, ffff888166349470) The buggy address belongs to the page: page:ffffea000598d240 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x166349 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888100192300 raw: 0000000000000000 0000000000140014 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 20708, ts 656535761927, free_ts 656418505094 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] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 kmem_cache_zalloc include/linux/slab.h:654 [inline] __kernfs_new_node+0xdb/0x700 fs/kernfs/dir.c:635 kernfs_new_node+0x97/0x170 fs/kernfs/dir.c:699 __kernfs_create_file+0x4a/0x270 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x273/0x320 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x573/0xf00 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x5b/0x130 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2346 [inline] device_add_attrs+0x8b/0x3e0 drivers/base/core.c:2494 device_add+0x4da/0xbc0 drivers/base/core.c:3206 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:1997 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_list+0x122/0xb20 mm/page_alloc.c:3443 release_pages+0xea0/0xef0 mm/swap.c:1103 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:356 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:326 exit_mmap+0x312/0x5c0 mm/mmap.c:3352 __mmput+0x95/0x2d0 kernel/fork.c:1153 mmput+0x59/0x170 kernel/fork.c:1176 exit_mm kernel/exit.c:537 [inline] do_exit+0xbda/0x2a50 kernel/exit.c:848 do_group_exit+0x141/0x310 kernel/exit.c:983 get_signal+0x10a0/0x1410 kernel/signal.c:2782 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 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 Memory state around the buggy address: ffff888166349300: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ffff888166349380: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 >ffff888166349400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ^ ffff888166349480: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ffff888166349500: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 ==================================================================