================================================================== 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+0x6d8/0x750 mm/filemap.c:163 Read of size 4 at addr ffff88813a910470 by task syz-executor.4/2446 CPU: 0 PID: 2446 Comm: syz-executor.4 Tainted: G W 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __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+0x6d8/0x750 mm/filemap.c:163 __delete_from_page_cache+0xc6/0x5b0 mm/filemap.c:231 __remove_mapping+0x566/0x690 mm/vmscan.c:1197 shrink_page_list+0x25f1/0x5820 mm/vmscan.c:1789 shrink_inactive_list mm/vmscan.c:2261 [inline] shrink_list mm/vmscan.c:2506 [inline] shrink_lruvec+0x17e9/0x4340 mm/vmscan.c:5694 shrink_node_memcgs mm/vmscan.c:5886 [inline] shrink_node+0x1077/0x24e0 mm/vmscan.c:5916 shrink_zones mm/vmscan.c:6119 [inline] do_try_to_free_pages+0x5b6/0x1570 mm/vmscan.c:6177 try_to_free_mem_cgroup_pages+0x36c/0x850 mm/vmscan.c:6491 memory_high_write+0x243/0x3b0 mm/memcontrol.c:6382 cgroup_file_write+0x290/0x590 kernel/cgroup/cgroup.c:3943 kernfs_fop_write_iter+0x2c4/0x410 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2159 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0xd8a/0x1160 fs/read_write.c:594 ksys_write+0x199/0x2c0 fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:656 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f948d97e169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f948c6d0168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f948da9e050 RCX: 00007f948d97e169 RDX: 0000000000000009 RSI: 0000000020000180 RDI: 0000000000000006 RBP: 00007f948d9d9ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd0ab1a71f R14: 00007f948c6d0300 R15: 0000000000022000 Allocated by task 2409: 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:433 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3238 [inline] slab_alloc mm/slub.c:3246 [inline] kmem_cache_alloc+0xf5/0x200 mm/slub.c:3251 kmem_cache_zalloc include/linux/slab.h:728 [inline] __kernfs_new_node+0xdb/0x6f0 fs/kernfs/dir.c:593 kernfs_new_node+0x97/0x170 fs/kernfs/dir.c:655 __kernfs_create_file+0x4a/0x270 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x273/0x320 fs/sysfs/file.c:317 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:2483 [inline] device_add_attrs+0x8b/0x490 drivers/base/core.c:2631 device_add+0x5f7/0xf10 drivers/base/core.c:3355 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:2014 register_netdevice+0xda5/0x1350 net/core/dev.c:10334 __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x28d/0x750 net/ipv4/ip_tunnel.c:1070 erspan_init_net+0x29/0x30 net/ipv4/ip_gre.c:1715 ops_init+0x1cf/0x4a0 net/core/net_namespace.c:135 setup_net+0x34b/0xb50 net/core/net_namespace.c:329 copy_net_ns+0x381/0x5f0 net/core/net_namespace.c:473 create_new_namespaces+0x416/0x670 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x126/0x180 kernel/nsproxy.c:226 ksys_unshare+0x542/0xa00 kernel/fork.c:3161 __do_sys_unshare kernel/fork.c:3235 [inline] __se_sys_unshare kernel/fork.c:3233 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3233 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88813a9103e8 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 [ffff88813a9103e8, ffff88813a910470) The buggy address belongs to the page: page:ffffea0004ea4400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13a910 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881001b6000 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 2409, ts 983691910277, free_ts 983237194635 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2502 prep_new_page mm/page_alloc.c:2508 [inline] get_page_from_freelist+0x2c14/0x2cf0 mm/page_alloc.c:4291 __alloc_pages+0x386/0x7b0 mm/page_alloc.c:5569 allocate_slab mm/slub.c:1930 [inline] new_slab+0x92/0x490 mm/slub.c:1993 ___slab_alloc+0x39e/0x830 mm/slub.c:3026 __slab_alloc+0x4a/0x90 mm/slub.c:3113 slab_alloc_node mm/slub.c:3204 [inline] slab_alloc mm/slub.c:3246 [inline] kmem_cache_alloc+0x134/0x200 mm/slub.c:3251 kmem_cache_zalloc include/linux/slab.h:728 [inline] __kernfs_new_node+0xdb/0x6f0 fs/kernfs/dir.c:593 kernfs_new_node+0x97/0x170 fs/kernfs/dir.c:655 __kernfs_create_file+0x4a/0x270 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x273/0x320 fs/sysfs/file.c:317 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:2483 [inline] device_add_attrs+0x8b/0x490 drivers/base/core.c:2631 device_add+0x5f7/0xf10 drivers/base/core.c:3355 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:2014 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1370 [inline] free_pcp_prepare mm/page_alloc.c:1442 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3441 free_unref_page+0xac/0x2c0 mm/page_alloc.c:3521 free_the_page mm/page_alloc.c:711 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5645 __free_slab+0xec/0x1d0 mm/slub.c:2018 free_slab mm/slub.c:2033 [inline] discard_slab mm/slub.c:2039 [inline] __unfreeze_partials+0x165/0x1a0 mm/slub.c:2525 put_cpu_partial+0xc4/0x120 mm/slub.c:2605 __slab_free+0x1c8/0x290 mm/slub.c:3386 do_slab_free mm/slub.c:3505 [inline] ___cache_free+0x109/0x120 mm/slub.c:3524 qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x44/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:443 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3238 [inline] slab_alloc mm/slub.c:3246 [inline] kmem_cache_alloc+0xf5/0x200 mm/slub.c:3251 getname_flags+0xba/0x520 fs/namei.c:138 user_path_at_empty+0x2d/0x1a0 fs/namei.c:2852 Memory state around the buggy address: ffff88813a910300: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813a910380: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 >ffff88813a910400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ^ ffff88813a910480: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ffff88813a910500: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 ==================================================================