================================================================== BUG: KASAN: slab-out-of-bounds in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff8880a087cfe4 by task syz-executor.3/23945 CPU: 0 PID: 23945 Comm: syz-executor.3 Not tainted 5.2.0-rc3-next-20190605 #9 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] pipe_write+0x659/0xf30 fs/pipe.c:441 call_write_iter include/linux/fs.h:1870 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459279 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe8878a5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459279 RDX: 000000010000014c RSI: 0000000020000340 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe8878a66d4 R13: 00000000004c53ca R14: 00000000004deda0 R15: 00000000ffffffff Allocated by task 24925: 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 vm_area_dup+0x21/0x170 kernel/fork.c:343 dup_mmap kernel/fork.c:528 [inline] dup_mm+0x8c4/0x13b0 kernel/fork.c:1341 copy_mm kernel/fork.c:1397 [inline] copy_process.part.0+0x2cb1/0x6800 kernel/fork.c:2058 copy_process kernel/fork.c:1826 [inline] _do_fork+0x25d/0xfe0 kernel/fork.c:2395 __do_sys_clone kernel/fork.c:2502 [inline] __se_sys_clone kernel/fork.c:2496 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2496 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 22031: 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 vm_area_free+0x1d/0x30 kernel/fork.c:354 remove_vma+0x13f/0x180 mm/mmap.c:187 exit_mmap+0x354/0x510 mm/mmap.c:3171 __mmput kernel/fork.c:1059 [inline] mmput+0x15f/0x4c0 kernel/fork.c:1080 exit_mm kernel/exit.c:547 [inline] do_exit+0x816/0x2fa0 kernel/exit.c:864 do_group_exit+0x135/0x360 kernel/exit.c:981 get_signal+0x463/0x2490 kernel/signal.c:2728 do_signal+0x87/0x1990 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:279 [inline] do_syscall_64+0x58e/0x680 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a087ceb0 which belongs to the cache vm_area_struct(81:syz2) of size 200 The buggy address is located 108 bytes to the right of 200-byte region [ffff8880a087ceb0, ffff8880a087cf78) The buggy address belongs to the page: page:ffffea0002821f00 refcount:1 mapcount:0 mapping:ffff88808715cdc0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00025802c8 ffffea00023658c8 ffff88808715cdc0 raw: 0000000000000000 ffff8880a087c040 000000010000000f ffff8880872ba800 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880872ba800 Memory state around the buggy address: ffff8880a087ce80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ffff8880a087cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc >ffff8880a087cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a087d000: 00 00 00 00 00 fc fc 00 00 00 00 00 fc fc 00 00 ffff8880a087d080: 00 00 00 fc fc 00 00 00 00 00 fc fc 00 00 00 00 ==================================================================