================================================================== BUG: KASAN: slab-out-of-bounds in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff88809656791c by task syz-executor.2/12448 CPU: 1 PID: 12448 Comm: syz-executor.2 Not tainted 5.2.0-rc3-next-20190607 #11 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 css_task_iter_start+0x18b/0x230 kernel/cgroup/cgroup.c:4543 mem_cgroup_scan_tasks+0xaf/0x180 mm/memcontrol.c:1167 select_bad_process mm/oom_kill.c:374 [inline] out_of_memory mm/oom_kill.c:1088 [inline] out_of_memory+0x6b2/0x1280 mm/oom_kill.c:1035 mem_cgroup_out_of_memory+0x1ca/0x230 mm/memcontrol.c:1573 mem_cgroup_oom mm/memcontrol.c:1905 [inline] try_charge+0xfbe/0x1480 mm/memcontrol.c:2468 __memcg_kmem_charge_memcg+0x7c/0x130 mm/memcontrol.c:2775 __memcg_kmem_charge+0x136/0x300 mm/memcontrol.c:2808 __alloc_pages_nodemask+0x4bd/0x8d0 mm/page_alloc.c:4697 alloc_pages_current+0x107/0x210 mm/mempolicy.c:2132 alloc_pages include/linux/gfp.h:509 [inline] __vmalloc_area_node mm/vmalloc.c:2383 [inline] __vmalloc_node_range+0x4b0/0x790 mm/vmalloc.c:2445 __vmalloc_node mm/vmalloc.c:2500 [inline] __vmalloc_node_flags_caller+0x71/0x90 mm/vmalloc.c:2522 kvmalloc_node+0xdc/0x100 mm/util.c:515 kvmalloc include/linux/mm.h:637 [inline] kvzalloc include/linux/mm.h:645 [inline] __kvm_set_memory_region+0xbd6/0x2170 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1027 kvm_set_memory_region+0x2f/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1089 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1101 [inline] kvm_vm_ioctl+0x75e/0x19b0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3214 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4590e7 Code: 48 83 c4 08 48 89 d8 5b 5d c3 66 0f 1f 84 00 00 00 00 00 48 89 e8 48 f7 d8 48 39 c3 0f 92 c0 eb 92 66 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 5d b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f48d99fb068 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000014 RCX: 00000000004590e7 RDX: 00007f48d99fb510 RSI: 000000004020ae46 RDI: 0000000000000006 RBP: 0000000020ffb000 R08: 00007f48d99fb070 R09: 000000000075bf20 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000fec00000 R13: 0000000000000006 R14: 00000000004de928 R15: 00000000ffffffff Allocated by task 8815: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:444 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3482 getname_flags fs/namei.c:138 [inline] getname_flags+0xd6/0x5b0 fs/namei.c:128 user_path_at_empty+0x2f/0x50 fs/namei.c:2606 user_path_at include/linux/namei.h:60 [inline] vfs_statx+0x129/0x200 fs/stat.c:187 vfs_lstat include/linux/fs.h:3197 [inline] __do_sys_newlstat+0xa4/0x130 fs/stat.c:354 __se_sys_newlstat fs/stat.c:348 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:348 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8815: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3692 putname+0xef/0x130 fs/namei.c:259 filename_lookup+0x28f/0x410 fs/namei.c:2355 user_path_at_empty+0x43/0x50 fs/namei.c:2606 user_path_at include/linux/namei.h:60 [inline] vfs_statx+0x129/0x200 fs/stat.c:187 vfs_lstat include/linux/fs.h:3197 [inline] __do_sys_newlstat+0xa4/0x130 fs/stat.c:354 __se_sys_newlstat fs/stat.c:348 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:348 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888096566480 which belongs to the cache names_cache of size 4096 The buggy address is located 1180 bytes to the right of 4096-byte region [ffff888096566480, ffff888096567480) The buggy address belongs to the page: page:ffffea0002595980 refcount:1 mapcount:0 mapping:ffff8880aa594c40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00024a4e08 ffffea00026a3988 ffff8880aa594c40 raw: 0000000000000000 ffff888096566480 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096567800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888096567880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888096567900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888096567980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888096567a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================