================================================================== BUG: KASAN: use-after-free in cleancache_fs_enabled_mapping include/linux/cleancache.h:54 [inline] BUG: KASAN: use-after-free in cleancache_invalidate_page include/linux/cleancache.h:108 [inline] BUG: KASAN: use-after-free in unaccount_page_cache_page+0x714/0x780 mm/filemap.c:169 Read of size 4 at addr ffff8881e5ee4488 by task syz.4.1259/4717 CPU: 0 PID: 4717 Comm: syz.4.1259 Not tainted 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack+0x1e/0x20 lib/dump_stack.c:77 dump_stack+0x15b/0x1b8 lib/dump_stack.c:118 print_address_description+0x8d/0x4c0 mm/kasan/report.c:384 __kasan_report+0xef/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 cleancache_fs_enabled_mapping include/linux/cleancache.h:54 [inline] cleancache_invalidate_page include/linux/cleancache.h:108 [inline] unaccount_page_cache_page+0x714/0x780 mm/filemap.c:169 __delete_from_page_cache+0xc3/0x4b0 mm/filemap.c:237 __remove_mapping+0x4ba/0x590 mm/vmscan.c:985 shrink_page_list+0x201b/0x3be0 mm/vmscan.c:1489 shrink_inactive_list+0x479/0xd30 mm/vmscan.c:2008 shrink_list mm/vmscan.c:2300 [inline] shrink_node_memcg+0xaf8/0x1af0 mm/vmscan.c:2630 shrink_node+0x433/0x1430 mm/vmscan.c:2843 shrink_zones mm/vmscan.c:3063 [inline] do_try_to_free_pages+0x5aa/0x11c0 mm/vmscan.c:3121 try_to_free_mem_cgroup_pages+0x22e/0x6a0 mm/vmscan.c:3422 try_charge+0x482/0x1310 mm/memcontrol.c:2627 mem_cgroup_try_charge+0x2c4/0x400 mm/memcontrol.c:6600 mem_cgroup_try_charge_delay+0x13/0x50 mm/memcontrol.c:6615 shmem_getpage_gfp+0x1067/0x2370 mm/shmem.c:1886 shmem_getpage mm/shmem.c:154 [inline] shmem_write_begin+0xce/0x1b0 mm/shmem.c:2447 generic_perform_write+0x2b8/0x500 mm/filemap.c:3450 __generic_file_write_iter+0x24b/0x480 mm/filemap.c:3579 generic_file_write_iter+0x48d/0x620 mm/filemap.c:3611 call_write_iter include/linux/fs.h:1991 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0x480/0x5d0 fs/read_write.c:496 __kernel_write+0xea/0x320 fs/read_write.c:515 dump_emit+0x1c0/0x2c0 fs/coredump.c:838 elf_core_dump+0x3465/0x3bd0 fs/binfmt_elf.c:2352 do_coredump+0x1d8c/0x2ab0 fs/coredump.c:801 get_signal+0xdb7/0x13d0 kernel/signal.c:2732 do_signal+0xad/0xda0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x18e/0x1f0 arch/x86/entry/common.c:194 ret_from_intr+0x1c/0x1c RIP: 0033:0x7fd6f0d35971 Code: 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:00000000fffffe10 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fd6f0f5d080 RCX: 00007fd6f0d35969 RDX: 0000000000000000 RSI: 00000000fffffe10 RDI: 0000000000000000 RBP: 00007fd6f0db7ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd6f0f5d080 R15: 00007fffddce6aa8 Allocated by task 4480: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] __kmalloc_track_caller+0x10d/0x2d0 mm/slub.c:4449 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xdc/0x500 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1080 [inline] nlmsg_new include/net/netlink.h:888 [inline] audit_buffer_alloc kernel/audit.c:1747 [inline] audit_log_start+0x3bc/0x850 kernel/audit.c:1862 common_lsm_audit+0xd1/0x1500 security/lsm_audit.c:452 slow_avc_audit+0x1ac/0x220 security/selinux/avc.c:790 avc_audit security/selinux/include/avc.h:140 [inline] avc_has_perm+0x1e6/0x240 security/selinux/avc.c:1193 selinux_bpf+0xc7/0xf0 security/selinux/hooks.c:6816 security_bpf+0x72/0xa0 security/security.c:2413 __do_sys_bpf kernel/bpf/syscall.c:2867 [inline] __se_sys_bpf+0x29b/0x570 kernel/bpf/syscall.c:2849 __x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:2849 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 23: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kfree+0xbe/0x260 mm/slub.c:4071 skb_free_head net/core/skbuff.c:601 [inline] skb_release_data+0x4ea/0x610 net/core/skbuff.c:621 skb_release_all net/core/skbuff.c:675 [inline] __kfree_skb net/core/skbuff.c:689 [inline] kfree_skb+0xbc/0x3a0 net/core/skbuff.c:708 kauditd_hold_skb+0x116/0x210 kernel/audit.c:608 kauditd_send_queue+0x299/0x2e0 kernel/audit.c:763 kauditd_thread+0x4ff/0x870 kernel/audit.c:887 kthread+0x31e/0x3a0 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 The buggy address belongs to the object at ffff8881e5ee4000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1160 bytes inside of 2048-byte region [ffff8881e5ee4000, ffff8881e5ee4800) The buggy address belongs to the page: page:ffffea000797b800 refcount:1 mapcount:0 mapping:ffff8881f5c0c000 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 0000000000000000 0000000200000001 ffff8881f5c0c000 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) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4894 alloc_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc_trace+0x130/0x290 mm/slub.c:2854 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] alloc_super+0x5e/0x7a0 fs/super.c:203 sget+0x1e4/0x4c0 fs/super.c:615 mount_bdev+0xef/0x390 fs/super.c:1401 f2fs_mount+0x34/0x40 fs/f2fs/super.c:4316 legacy_get_tree+0xea/0x190 fs/fs_context.c:648 vfs_get_tree+0x89/0x260 fs/super.c:1558 do_new_mount+0x234/0x480 fs/namespace.c:2850 do_mount+0x63a/0xd40 fs/namespace.c:3170 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x7e4/0x910 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4956 [inline] __free_pages+0x8c/0x110 mm/page_alloc.c:4962 __free_slab+0x218/0x2d0 mm/slub.c:1774 free_slab mm/slub.c:1789 [inline] discard_slab mm/slub.c:1795 [inline] unfreeze_partials+0x165/0x1a0 mm/slub.c:2288 put_cpu_partial+0xc1/0x180 mm/slub.c:2324 __slab_free+0x2be/0x380 mm/slub.c:2971 do_slab_free mm/slub.c:3068 [inline] ___cache_free+0xbb/0xd0 mm/slub.c:3087 qlink_free+0x23/0x30 mm/kasan/quarantine.c:148 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:167 quarantine_reduce+0x1a8/0x200 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x42/0x200 mm/kasan/common.c:507 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 __d_alloc+0x2d/0x6a0 fs/dcache.c:1695 d_alloc_pseudo+0x1d/0x70 fs/dcache.c:1824 alloc_file_pseudo+0xc8/0x1f0 fs/file_table.c:226 Memory state around the buggy address: ffff8881e5ee4380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e5ee4400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881e5ee4480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e5ee4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e5ee4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== syz.4.1259 (4717) used greatest stack depth: 16352 bytes left