[ 38.458315] audit: type=1800 audit(1582921268.120:33): pid=7387 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="startpar" name="rc.local" dev="sda1" ino=2465 res=0 [ 38.485899] audit: type=1800 audit(1582921268.120:34): pid=7387 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="startpar" name="rmnologin" dev="sda1" ino=2456 res=0 Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 41.768302] random: sshd: uninitialized urandom read (32 bytes read) [ 42.073943] audit: type=1400 audit(1582921271.740:35): avc: denied { map } for pid=7557 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 [ 42.120551] random: sshd: uninitialized urandom read (32 bytes read) [ 42.888750] random: sshd: uninitialized urandom read (32 bytes read) [ 43.082872] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.65' (ECDSA) to the list of known hosts. [ 48.663282] random: sshd: uninitialized urandom read (32 bytes read) executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 48.783109] audit: type=1400 audit(1582921278.450:36): avc: denied { map } for pid=7569 comm="syz-executor851" path="/root/syz-executor851448614" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 48.865014] ================================================================== [ 48.865046] BUG: KASAN: use-after-free in con_shutdown+0x7f/0x90 [ 48.865052] Write of size 8 at addr ffff8880a4aad588 by task syz-executor851/7588 [ 48.865055] [ 48.865063] CPU: 1 PID: 7588 Comm: syz-executor851 Not tainted 4.14.172-syzkaller #0 [ 48.865067] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.865070] Call Trace: [ 48.865082] dump_stack+0x13e/0x194 [ 48.865091] ? con_shutdown+0x7f/0x90 [ 48.865102] print_address_description.cold+0x7c/0x1e2 [ 48.865110] ? con_shutdown+0x7f/0x90 [ 48.865118] kasan_report.cold+0xa9/0x2ae [ 48.865125] ? set_palette+0x130/0x130 [ 48.865133] con_shutdown+0x7f/0x90 [ 48.865142] release_tty+0xb6/0x7a0 [ 48.865151] tty_release_struct+0x37/0x50 [ 48.865159] tty_release+0xaa6/0xd60 [ 48.865180] ? tty_release_struct+0x50/0x50 [ 48.865188] __fput+0x25f/0x790 [ 48.865203] task_work_run+0x113/0x190 [ 48.865214] do_exit+0x9f2/0x2b00 [ 48.865224] ? __do_page_fault+0x4e4/0xb40 [ 48.865238] ? mm_update_next_owner+0x5b0/0x5b0 [ 48.865248] ? lock_downgrade+0x6e0/0x6e0 [ 48.865261] do_group_exit+0x100/0x310 [ 48.865271] SyS_exit_group+0x19/0x20 [ 48.865278] ? do_group_exit+0x310/0x310 [ 48.865285] do_syscall_64+0x1d5/0x640 [ 48.865297] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.865303] RIP: 0033:0x43ff38 [ 48.865307] RSP: 002b:00007ffd06f9d5a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 48.865314] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ff38 [ 48.865318] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 48.865323] RBP: 00000000004bf950 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 48.865327] R10: 0000000000000064 R11: 0000000000000246 R12: 0000000000000001 [ 48.865331] R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000 [ 48.865344] [ 48.865348] Allocated by task 7588: [ 48.865355] save_stack+0x32/0xa0 [ 48.865361] kasan_kmalloc+0xbf/0xe0 [ 48.865367] kmem_cache_alloc_trace+0x14d/0x7b0 [ 48.865373] vc_allocate+0x142/0x550 [ 48.865380] con_install+0x4f/0x3e0 [ 48.865386] tty_init_dev+0xe1/0x3a0 [ 48.865392] tty_open+0x410/0x9c0 [ 48.865398] chrdev_open+0x1fc/0x540 [ 48.865405] do_dentry_open+0x732/0xe90 [ 48.865410] vfs_open+0x105/0x220 [ 48.865416] path_openat+0x8ca/0x3c50 [ 48.865422] do_filp_open+0x18e/0x250 [ 48.865428] do_sys_open+0x29d/0x3f0 [ 48.865434] do_syscall_64+0x1d5/0x640 [ 48.865441] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.865443] [ 48.865446] Freed by task 7590: [ 48.865452] save_stack+0x32/0xa0 [ 48.865458] kasan_slab_free+0x75/0xc0 [ 48.865463] kfree+0xcb/0x260 [ 48.865472] vt_disallocate_all+0x25c/0x340 [ 48.865477] vt_ioctl+0x6e3/0x1f00 [ 48.865483] tty_ioctl+0x6c5/0x1220 [ 48.865489] do_vfs_ioctl+0x75a/0xfe0 [ 48.865495] SyS_ioctl+0x7f/0xb0 [ 48.865502] do_syscall_64+0x1d5/0x640 [ 48.865508] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.865510] [ 48.865516] The buggy address belongs to the object at ffff8880a4aad480 [ 48.865516] which belongs to the cache kmalloc-2048 of size 2048 [ 48.865521] The buggy address is located 264 bytes inside of [ 48.865521] 2048-byte region [ffff8880a4aad480, ffff8880a4aadc80) [ 48.865524] The buggy address belongs to the page: [ 48.865530] page:ffffea000292ab00 count:1 mapcount:0 mapping:ffff8880a4aac380 index:0x0 compound_mapcount: 0 [ 48.865541] flags: 0xfffe0000008100(slab|head) [ 48.865550] raw: 00fffe0000008100 ffff8880a4aac380 0000000000000000 0000000100000003 [ 48.865559] raw: ffffea0001da1ba0 ffffea0002261ca0 ffff88812fe56c40 0000000000000000 [ 48.865562] page dumped because: kasan: bad access detected [ 48.865564] [ 48.865566] Memory state around the buggy address: [ 48.865572] ffff8880a4aad480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.865578] ffff8880a4aad500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.865584] >ffff8880a4aad580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.865587] ^ [ 48.865592] ffff8880a4aad600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.865598] ffff8880a4aad680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.865601] ================================================================== [ 48.865603] Disabling lock debugging due to kernel taint [ 48.865666] Kernel panic - not syncing: panic_on_warn set ... [ 48.865666] [ 48.865673] CPU: 1 PID: 7588 Comm: syz-executor851 Tainted: G B 4.14.172-syzkaller #0 [ 48.865676] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.865678] Call Trace: [ 48.865687] dump_stack+0x13e/0x194 [ 48.865694] panic+0x1f9/0x42d [ 48.865700] ? add_taint.cold+0x16/0x16 [ 48.865708] ? preempt_schedule_common+0x4a/0xc0 [ 48.865715] ? con_shutdown+0x7f/0x90 [ 48.865721] ? ___preempt_schedule+0x16/0x18 [ 48.865729] ? con_shutdown+0x7f/0x90 [ 48.865735] kasan_end_report+0x43/0x49 [ 48.865741] kasan_report.cold+0x12f/0x2ae [ 48.865748] ? set_palette+0x130/0x130 [ 48.865754] con_shutdown+0x7f/0x90 [ 48.865761] release_tty+0xb6/0x7a0 [ 48.865769] tty_release_struct+0x37/0x50 [ 48.865775] tty_release+0xaa6/0xd60 [ 48.865784] ? tty_release_struct+0x50/0x50 [ 48.865789] __fput+0x25f/0x790 [ 48.865799] task_work_run+0x113/0x190 [ 48.865806] do_exit+0x9f2/0x2b00 [ 48.865812] ? __do_page_fault+0x4e4/0xb40 [ 48.865820] ? mm_update_next_owner+0x5b0/0x5b0 [ 48.865827] ? lock_downgrade+0x6e0/0x6e0 [ 48.865836] do_group_exit+0x100/0x310 [ 48.865843] SyS_exit_group+0x19/0x20 [ 48.865849] ? do_group_exit+0x310/0x310 [ 48.865855] do_syscall_64+0x1d5/0x640 [ 48.865863] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.865867] RIP: 0033:0x43ff38 [ 48.865871] RSP: 002b:00007ffd06f9d5a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 48.865877] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ff38 [ 48.865880] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 48.865884] RBP: 00000000004bf950 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 48.865888] R10: 0000000000000064 R11: 0000000000000246 R12: 0000000000000001 [ 48.865891] R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000 [ 48.867191] Kernel Offset: disabled [ 49.461336] Rebooting in 86400 seconds..