================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff88809b687d5c by task syz-executor.5/13787 CPU: 1 PID: 13787 Comm: syz-executor.5 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 __cgroup_procs_start.isra.0+0x32f/0x400 kernel/cgroup/cgroup.c:4638 cgroup_threads_start+0x23/0x30 kernel/cgroup/cgroup.c:4745 cgroup_seqfile_start+0xa4/0xd0 kernel/cgroup/cgroup.c:3752 kernfs_seq_start+0xdc/0x190 fs/kernfs/file.c:118 seq_read+0x2a7/0x1110 fs/seq_file.c:224 kernfs_fop_read+0xed/0x560 fs/kernfs/file.c:252 do_loop_readv_writev fs/read_write.c:714 [inline] do_loop_readv_writev fs/read_write.c:701 [inline] do_iter_read+0x4a4/0x660 fs/read_write.c:935 vfs_readv+0xf0/0x160 fs/read_write.c:997 do_readv+0x15b/0x330 fs/read_write.c:1034 __do_sys_readv fs/read_write.c:1125 [inline] __se_sys_readv fs/read_write.c:1122 [inline] __x64_sys_readv+0x75/0xb0 fs/read_write.c:1122 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:00007f5c9cf06c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459279 RDX: 000000000000018f RSI: 00000000200002c0 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5c9cf076d4 R13: 00000000004c6392 R14: 00000000004db1c0 R15: 00000000ffffffff Allocated by task 27915: 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 __sigqueue_alloc+0x268/0x4d0 kernel/signal.c:424 __send_signal+0x831/0x1050 kernel/signal.c:1105 send_signal+0x4c1/0x7d0 kernel/signal.c:1231 force_sig_info_to_task+0x278/0x340 kernel/signal.c:1323 force_sig_fault_to_task kernel/signal.c:1666 [inline] force_sig_fault+0xbe/0x100 kernel/signal.c:1673 __bad_area_nosemaphore+0x32e/0x420 arch/x86/mm/fault.c:920 __bad_area arch/x86/mm/fault.c:949 [inline] bad_area_access_error+0x29a/0x390 arch/x86/mm/fault.c:1009 do_user_addr_fault arch/x86/mm/fault.c:1438 [inline] __do_page_fault+0x3f6/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 Freed by task 27915: 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 __sigqueue_free.part.0+0x74/0x90 kernel/signal.c:447 __sigqueue_free kernel/signal.c:443 [inline] dequeue_synchronous_signal kernel/signal.c:734 [inline] get_signal+0xe9a/0x2490 kernel/signal.c:2616 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+0x2e4/0x350 arch/x86/entry/common.c:199 retint_user+0x8/0x18 The buggy address belongs to the object at ffff88809b687d20 which belongs to the cache sigqueue of size 80 The buggy address is located 60 bytes inside of 80-byte region [ffff88809b687d20, ffff88809b687d70) The buggy address belongs to the page: page:ffffea00026da1c0 refcount:1 mapcount:0 mapping:ffff88821bc48800 index:0xffff88809b687230 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00021edd88 ffffea0002620408 ffff88821bc48800 raw: ffff88809b687230 ffff88809b687000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b687c00: fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb fb ffff88809b687c80: fb fb fc fc fc fc fb fb fb fb fb fb fb fb fb fb >ffff88809b687d00: fc fc fc fc fb fb fb fb fb fb fb fb fb fb fc fc ^ ffff88809b687d80: fc fc fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88809b687e00: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fb fb ==================================================================