================================================================== 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 ffff8881380ff470 by task syz.1.8203/30362 CPU: 0 PID: 30362 Comm: syz.1.8203 Tainted: G W 5.10.233-syzkaller-00881-gfbe98d68b6b3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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:985 shrink_page_list+0x1f38/0x4c60 mm/vmscan.c:1498 shrink_inactive_list+0x591/0x1150 mm/vmscan.c:2075 shrink_list mm/vmscan.c:2294 [inline] shrink_lruvec+0xced/0x3860 mm/vmscan.c:5473 shrink_node_memcgs mm/vmscan.c:5660 [inline] shrink_node+0xded/0x2000 mm/vmscan.c:5690 shrink_zones mm/vmscan.c:5896 [inline] do_try_to_free_pages+0x652/0x1630 mm/vmscan.c:5954 try_to_free_mem_cgroup_pages+0x369/0x830 mm/vmscan.c:6272 try_charge+0x4b8/0x15f0 mm/memcontrol.c:2742 __mem_cgroup_charge+0x147/0x6e0 mm/memcontrol.c:6868 mem_cgroup_charge include/linux/memcontrol.h:458 [inline] shmem_add_to_page_cache+0x6a9/0x10c0 mm/shmem.c:699 shmem_getpage_gfp+0xa65/0x2480 mm/shmem.c:1952 shmem_getpage mm/shmem.c:161 [inline] shmem_fallocate+0x9a5/0xe90 mm/shmem.c:2820 vfs_fallocate+0x492/0x570 fs/open.c:310 ksys_fallocate fs/open.c:333 [inline] __do_sys_fallocate fs/open.c:341 [inline] __se_sys_fallocate fs/open.c:339 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:339 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fd5a6cead29 Code: ff ff c3 66 2e 0f 1f 84 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 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd5a535c038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007fd5a6edafa0 RCX: 00007fd5a6cead29 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fd5a6d66b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000008000c65 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd5a6edafa0 R15: 00007ffd91d65df8 Allocated by task 29713: 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] kmem_cache_alloc_trace+0x18a/0x2e0 mm/slub.c:2974 kmalloc include/linux/slab.h:552 [inline] kvm_uevent_notify_change+0x21e/0x3c0 virt/kvm/kvm_main.c:4809 kvm_destroy_vm virt/kvm/kvm_main.c:924 [inline] kvm_put_kvm+0x90/0x1160 virt/kvm/kvm_main.c:968 kvm_vm_release+0x46/0x50 virt/kvm/kvm_main.c:991 __fput+0x33d/0x7b0 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x129/0x190 kernel/task_work.c:189 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+0xa2/0x1a0 kernel/entry/common.c:274 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 29713: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kfree+0xc3/0x270 mm/slub.c:4191 kvm_uevent_notify_change+0x28f/0x3c0 virt/kvm/kvm_main.c:4815 kvm_destroy_vm virt/kvm/kvm_main.c:924 [inline] kvm_put_kvm+0x90/0x1160 virt/kvm/kvm_main.c:968 kvm_vm_release+0x46/0x50 virt/kvm/kvm_main.c:991 __fput+0x33d/0x7b0 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x129/0x190 kernel/task_work.c:189 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+0xa2/0x1a0 kernel/entry/common.c:274 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff8881380fe000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1136 bytes to the right of 4096-byte region [ffff8881380fe000, ffff8881380ff000) The buggy address belongs to the page: page:ffffea0004e03e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1380f8 head:ffffea0004e03e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000100000001 ffff888100042c00 raw: 0000000000000000 0000000000040004 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 11295, ts 467288619190, free_ts 467286208025 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:5348 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_trace+0x1bd/0x2e0 mm/slub.c:2972 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] kobject_uevent_env+0x269/0x700 lib/kobject_uevent.c:539 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:657 rx_queue_add_kobject net/core/net-sysfs.c:1029 [inline] net_rx_queue_update_kobjects+0x1e3/0x430 net/core/net-sysfs.c:1069 register_queue_kobjects net/core/net-sysfs.c:1750 [inline] netdev_register_kobject+0x231/0x320 net/core/net-sysfs.c:2001 register_netdevice+0xe9b/0x13f0 net/core/dev.c:10055 veth_newlink+0x667/0xb50 drivers/net/veth.c:1360 __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:5607 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2485 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:5409 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 __free_slab+0xcf/0x190 mm/slub.c:1894 free_slab mm/slub.c:1909 [inline] discard_slab+0x29/0x40 mm/slub.c:1915 __slab_free+0x30d/0x3a0 mm/slub.c:3131 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 user_path_at_empty+0x2d/0x50 fs/namei.c:2740 user_path_at include/linux/namei.h:60 [inline] ksys_umount fs/namespace.c:1761 [inline] __do_sys_umount fs/namespace.c:1769 [inline] __se_sys_umount fs/namespace.c:1767 [inline] __x64_sys_umount+0xf0/0x170 fs/namespace.c:1767 Memory state around the buggy address: ffff8881380ff300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881380ff380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881380ff400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881380ff480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881380ff500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================