================================================================== 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 ffff888119590470 by task syz-executor.3/22488 CPU: 1 PID: 22488 Comm: syz-executor.3 Tainted: G W 5.10.194-syzkaller-00524-ga568188d538c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/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] __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:3456 ext4_da_write_begin+0x587/0xf60 fs/ext4/inode.c:3055 generic_perform_write+0x2cd/0x570 mm/filemap.c:3506 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_page_fault+0x33d/0x5b0 arch/x86/mm/fault.c:1521 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 RIP: 0033:0x0 Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. RSP: 002b:0000000020000288 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fe0cba0ff80 RCX: 00007fe0cb8f0ae9 RDX: 0000000020000040 RSI: 0000000020000280 RDI: 0000000000000080 RBP: 00007fe0cb93c47a R08: 0000000020000500 R09: 0000000020000500 R10: 0000000020000140 R11: 0000000000000202 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe0cba0ff80 R15: 00007ffc178dd008 The buggy address belongs to the page: page:ffffea0004656000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x119580 head:ffffea0004656000 order:5 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010000(head) raw: 4000000000010000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 5, migratetype Unmovable, gfp_mask 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 3376, ts 245737976650, free_ts 218000225555 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 __alloc_pages include/linux/gfp.h:544 [inline] __alloc_pages_node include/linux/gfp.h:557 [inline] alloc_pages_node include/linux/gfp.h:571 [inline] alloc_pages include/linux/gfp.h:590 [inline] kmalloc_order+0x4c/0x170 mm/slab_common.c:843 kmalloc_order_trace+0x18/0x90 mm/slab_common.c:859 kmalloc_large include/linux/slab.h:481 [inline] __kmalloc+0x1f1/0x330 mm/slub.c:4022 __kmalloc_node include/linux/slab.h:418 [inline] kmalloc_node include/linux/slab.h:575 [inline] kvmalloc_node+0x82/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:822 [inline] wg_index_hashtable_alloc+0x1e/0x50 drivers/net/wireguard/peerlookup.c:85 wg_newlink+0x159/0x740 drivers/net/wireguard/device.c:313 __rtnl_newlink net/core/rtnetlink.c:3479 [inline] rtnl_newlink+0x1516/0x2000 net/core/rtnetlink.c:3527 rtnetlink_rcv_msg+0x955/0xc50 net/core/rtnetlink.c:5608 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2497 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5626 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x8df/0xac0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0xa46/0xd00 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2357 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_pages_ok+0x82c/0x850 mm/page_alloc.c:1629 free_the_page+0x76/0x370 mm/page_alloc.c:5407 __free_pages+0x67/0xc0 mm/page_alloc.c:5416 __free_slab+0xcf/0x190 mm/slub.c:1894 free_slab mm/slub.c:1909 [inline] discard_slab mm/slub.c:1915 [inline] unfreeze_partials+0x15e/0x190 mm/slub.c:2410 put_cpu_partial+0xbf/0x180 mm/slub.c:2446 __slab_free+0x2c8/0x3a0 mm/slub.c:3095 do_slab_free mm/slub.c:3191 [inline] ___cache_free+0x111/0x130 mm/slub.c:3210 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x47/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 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 getname_flags+0xba/0x520 fs/namei.c:141 getname+0x19/0x20 fs/namei.c:212 Memory state around the buggy address: ffff888119590300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff888119590380: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >ffff888119590400: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ ffff888119590480: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff888119590500: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ==================================================================