================================================================== BUG: KASAN: slab-out-of-bounds in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff888089f9f49c by task syz-executor.3/14565 CPU: 1 PID: 14565 Comm: syz-executor.3 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 mem_cgroup_try_charge+0x24d/0x5e0 mm/memcontrol.c:6073 mem_cgroup_try_charge_delay+0x1f/0xa0 mm/memcontrol.c:6088 do_anonymous_page mm/memory.c:3036 [inline] handle_pte_fault mm/memory.c:3890 [inline] __handle_mm_fault+0x1e1a/0x3eb0 mm/memory.c:4016 handle_mm_fault+0x3b7/0xa90 mm/memory.c:4053 do_user_addr_fault arch/x86/mm/fault.c:1455 [inline] __do_page_fault+0x5ef/0xda0 arch/x86/mm/fault.c:1521 do_page_fault+0x71/0x57d arch/x86/mm/fault.c:1552 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1156 RIP: 0033:0x410bbf Code: 0f 84 c8 02 00 00 48 83 bd 78 ff ff ff 00 0f 84 f9 04 00 00 48 8b 95 68 ff ff ff 44 89 95 38 ff ff ff 4c 8d ac 10 00 f7 ff ff <49> 89 85 90 06 00 00 49 8d 85 10 03 00 00 49 89 95 98 06 00 00 41 RSP: 002b:00007ffca3149680 EFLAGS: 00010206 RAX: 00007f0ac6879000 RBX: 0000000000020000 RCX: 00000000004592ca RDX: 0000000000021000 RSI: 0000000000021000 RDI: 0000000000000000 RBP: 00007ffca3149760 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffca3149850 R13: 00007f0ac6899700 R14: 0000000000000001 R15: 000000000075bfcc Allocated by task 3882: 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_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x151/0x750 mm/slab.c:3549 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] kernfs_iop_get_link fs/kernfs/symlink.c:136 [inline] kernfs_iop_get_link+0x6a/0x680 fs/kernfs/symlink.c:127 vfs_readlink+0x201/0x3e0 fs/namei.c:4734 do_readlinkat+0x2ab/0x320 fs/stat.c:411 __do_sys_readlink fs/stat.c:432 [inline] __se_sys_readlink fs/stat.c:429 [inline] __x64_sys_readlink+0x78/0xb0 fs/stat.c:429 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3882: 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] kfree+0x106/0x2a0 mm/slab.c:3753 kfree_link+0x16/0x20 fs/libfs.c:1108 do_delayed_call include/linux/delayed_call.h:28 [inline] vfs_readlink+0x16e/0x3e0 fs/namei.c:4739 do_readlinkat+0x2ab/0x320 fs/stat.c:411 __do_sys_readlink fs/stat.c:432 [inline] __se_sys_readlink fs/stat.c:429 [inline] __x64_sys_readlink+0x78/0xb0 fs/stat.c:429 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 ffff888089f9e2c0 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 476 bytes to the right of 4096-byte region [ffff888089f9e2c0, ffff888089f9f2c0) The buggy address belongs to the page: page:ffffea000227e780 refcount:1 mapcount:0 mapping:ffff8880aa400dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000260b388 ffffea00027f6888 ffff8880aa400dc0 raw: 0000000000000000 ffff888089f9e2c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888089f9f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888089f9f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888089f9f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888089f9f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888089f9f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================