================================================================== BUG: KASAN: use-after-free in is_idle_task include/linux/sched.h:1558 [inline] BUG: KASAN: use-after-free in wake_up_if_idle+0x482/0x580 kernel/sched/core.c:1809 Read of size 4 at addr ffff8881bf600464 by task syz-executor2/25860 CPU: 1 PID: 25860 Comm: syz-executor2 Not tainted 4.20.0-rc6+ #372 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 is_idle_task include/linux/sched.h:1558 [inline] wake_up_if_idle+0x482/0x580 kernel/sched/core.c:1809 wake_up_all_idle_cpus+0x72/0xc0 kernel/smp.c:753 cpuidle_latency_notify+0xe/0x20 drivers/cpuidle/cpuidle.c:666 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __blocking_notifier_call_chain kernel/notifier.c:317 [inline] blocking_notifier_call_chain+0x147/0x190 kernel/notifier.c:328 pm_qos_update_target+0x49d/0xd50 kernel/power/qos.c:316 pm_qos_remove_request+0x1c0/0x640 kernel/power/qos.c:542 snd_pcm_release_substream.part.45+0x261/0x330 sound/core/pcm_native.c:2392 snd_pcm_release_substream+0x61/0x80 sound/core/pcm_native.c:2380 snd_pcm_oss_release_file.part.23+0x71/0xa0 sound/core/oss/pcm_oss.c:2382 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2377 [inline] snd_pcm_oss_release+0x114/0x290 sound/core/oss/pcm_oss.c:2562 __fput+0x385/0xa30 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457659 Code: fd b3 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 b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007faa25d71c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000457659 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007faa25d726d4 R13: 00000000004f16d2 R14: 00000000004cd578 R15: 00000000ffffffff Allocated by task 25837: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc_node+0x144/0x730 mm/slab.c:3644 alloc_task_struct_node kernel/fork.c:158 [inline] dup_task_struct kernel/fork.c:843 [inline] copy_process+0x2026/0x87a0 kernel/fork.c:1751 _do_fork+0x1cb/0x11d0 kernel/fork.c:2216 __do_sys_clone kernel/fork.c:2323 [inline] __se_sys_clone kernel/fork.c:2317 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2317 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 25867: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3760 free_task_struct kernel/fork.c:163 [inline] free_task+0x16e/0x1f0 kernel/fork.c:457 __put_task_struct+0x2e6/0x620 kernel/fork.c:730 put_task_struct include/linux/sched/task.h:96 [inline] finish_task_switch+0x628/0x910 kernel/sched/core.c:2715 schedule_tail+0xe/0x130 kernel/sched/core.c:2777 ret_from_fork+0x8/0x50 arch/x86/entry/entry_64.S:336 The buggy address belongs to the object at ffff8881bf600440 which belongs to the cache task_struct(17:syz0) of size 6080 The buggy address is located 36 bytes inside of 6080-byte region [ffff8881bf600440, ffff8881bf601c00) The buggy address belongs to the page: page:ffffea0006fd8000 count:1 mapcount:0 mapping:ffff8881b5261c40 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0006449a88 ffffea0006eabc08 ffff8881b5261c40 raw: 0000000000000000 ffff8881bf600440 0000000100000001 ffff88818d89a000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88818d89a000 Memory state around the buggy address: ffff8881bf600300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881bf600380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881bf600400: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8881bf600480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881bf600500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================