[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 68.438585][ T27] audit: type=1800 audit(1575872227.052:25): pid=8833 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 68.469589][ T27] audit: type=1800 audit(1575872227.052:26): pid=8833 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 68.502266][ T27] audit: type=1800 audit(1575872227.052:27): pid=8833 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.242' (ECDSA) to the list of known hosts. 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 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 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 executing program syzkaller login: [ 77.152691][ T9030] ================================================================== [ 77.161373][ T9030] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 77.161391][ T9030] Read of size 1 at addr ffff88809f900b01 by task syz-executor920/9030 [ 77.161395][ T9030] [ 77.161411][ T9030] CPU: 1 PID: 9030 Comm: syz-executor920 Not tainted 5.4.0-syzkaller #0 [ 77.161420][ T9030] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 77.161425][ T9030] Call Trace: [ 77.161443][ T9030] dump_stack+0x197/0x210 [ 77.161460][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.161480][ T9030] print_address_description.constprop.0.cold+0xd4/0x30b [ 77.161491][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.161504][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.161517][ T9030] __kasan_report.cold+0x1b/0x41 [ 77.161533][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.161548][ T9030] kasan_report+0x12/0x20 [ 77.161563][ T9030] __asan_report_load1_noabort+0x14/0x20 [ 77.161577][ T9030] n_tty_receive_buf_common+0x270f/0x2b70 [ 77.161589][ T9030] ? __kasan_check_read+0x11/0x20 [ 77.161620][ T9030] n_tty_receive_buf2+0x34/0x40 [ 77.161638][ T9030] tty_ldisc_receive_buf+0xad/0x1c0 [ 77.161656][ T9030] ? add_wait_queue+0x112/0x170 [ 77.161669][ T9030] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 77.161684][ T9030] paste_selection+0x1ff/0x460 [ 77.161702][ T9030] ? vcs_remove_sysfs+0x60/0x60 [ 77.161720][ T9030] ? lock_downgrade+0x920/0x920 [ 77.297984][ T9030] ? wake_up_q+0x140/0x140 [ 77.298008][ T9030] tioclinux+0x133/0x480 [ 77.298027][ T9030] vt_ioctl+0x1a41/0x26d0 [ 77.298044][ T9030] ? complete_change_console+0x3a0/0x3a0 [ 77.298057][ T9030] ? lock_downgrade+0x920/0x920 [ 77.298070][ T9030] ? rwlock_bug.part.0+0x90/0x90 [ 77.298086][ T9030] ? tomoyo_path_number_perm+0x214/0x520 [ 77.298099][ T9030] ? find_held_lock+0x35/0x130 [ 77.298117][ T9030] ? tomoyo_path_number_perm+0x214/0x520 [ 77.298130][ T9030] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 77.348330][ T9030] ? tty_jobctrl_ioctl+0x50/0xd40 [ 77.348347][ T9030] ? complete_change_console+0x3a0/0x3a0 [ 77.348362][ T9030] tty_ioctl+0xa37/0x14f0 [ 77.348379][ T9030] ? tty_vhangup+0x30/0x30 [ 77.348394][ T9030] ? tomoyo_path_number_perm+0x454/0x520 [ 77.348413][ T9030] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 77.348425][ T9030] ? tomoyo_path_number_perm+0x25e/0x520 [ 77.348442][ T9030] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 77.348465][ T9030] ? __do_page_fault+0x56a/0xd80 [ 77.348483][ T9030] ? tty_vhangup+0x30/0x30 [ 77.348500][ T9030] do_vfs_ioctl+0x977/0x14e0 [ 77.348517][ T9030] ? compat_ioctl_preallocate+0x220/0x220 [ 77.348537][ T9030] ? __kasan_check_write+0x14/0x20 [ 77.348550][ T9030] ? up_read+0x1cd/0x810 [ 77.348577][ T9030] ? tomoyo_file_ioctl+0x23/0x30 [ 77.426363][ T9030] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.426379][ T9030] ? security_file_ioctl+0x8d/0xc0 [ 77.426398][ T9030] ksys_ioctl+0xab/0xd0 [ 77.426416][ T9030] __x64_sys_ioctl+0x73/0xb0 [ 77.426435][ T9030] do_syscall_64+0xfa/0x790 [ 77.426456][ T9030] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.426467][ T9030] RIP: 0033:0x441309 [ 77.426482][ T9030] Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 77.426488][ T9030] RSP: 002b:00007fffea28a108 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 77.426499][ T9030] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441309 [ 77.426506][ T9030] RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000003 [ 77.426513][ T9030] RBP: 0000000000012d00 R08: 000000000000000d R09: 00000000004002c8 [ 77.426526][ T9030] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402080 [ 77.426534][ T9030] R13: 0000000000402110 R14: 0000000000000000 R15: 0000000000000000 [ 77.426553][ T9030] [ 77.426560][ T9030] Allocated by task 9027: [ 77.426573][ T9030] save_stack+0x23/0x90 [ 77.426584][ T9030] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 77.426594][ T9030] kasan_kmalloc+0x9/0x10 [ 77.426603][ T9030] __kmalloc+0x163/0x770 [ 77.426620][ T9030] set_selection_kernel+0x872/0x13b0 [ 77.559095][ T9030] set_selection_user+0x95/0xd9 [ 77.559107][ T9030] tioclinux+0x11c/0x480 [ 77.559118][ T9030] vt_ioctl+0x1a41/0x26d0 [ 77.559130][ T9030] tty_ioctl+0xa37/0x14f0 [ 77.559143][ T9030] do_vfs_ioctl+0x977/0x14e0 [ 77.559153][ T9030] ksys_ioctl+0xab/0xd0 [ 77.559163][ T9030] __x64_sys_ioctl+0x73/0xb0 [ 77.559178][ T9030] do_syscall_64+0xfa/0x790 [ 77.559193][ T9030] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.559197][ T9030] [ 77.559216][ T9030] Freed by task 9028: [ 77.559235][ T9030] save_stack+0x23/0x90 [ 77.610962][ T9030] __kasan_slab_free+0x102/0x150 [ 77.610972][ T9030] kasan_slab_free+0xe/0x10 [ 77.610980][ T9030] kfree+0x10a/0x2c0 [ 77.610991][ T9030] set_selection_kernel+0x88f/0x13b0 [ 77.611001][ T9030] set_selection_user+0x95/0xd9 [ 77.611013][ T9030] tioclinux+0x11c/0x480 [ 77.611025][ T9030] vt_ioctl+0x1a41/0x26d0 [ 77.611036][ T9030] tty_ioctl+0xa37/0x14f0 [ 77.611048][ T9030] do_vfs_ioctl+0x977/0x14e0 [ 77.611058][ T9030] ksys_ioctl+0xab/0xd0 [ 77.611068][ T9030] __x64_sys_ioctl+0x73/0xb0 [ 77.611081][ T9030] do_syscall_64+0xfa/0x790 [ 77.611094][ T9030] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.611098][ T9030] [ 77.611108][ T9030] The buggy address belongs to the object at ffff88809f900b00 [ 77.611108][ T9030] which belongs to the cache kmalloc-96 of size 96 [ 77.611119][ T9030] The buggy address is located 1 bytes inside of [ 77.611119][ T9030] 96-byte region [ffff88809f900b00, ffff88809f900b60) [ 77.611124][ T9030] The buggy address belongs to the page: [ 77.611137][ T9030] page:ffffea00027e4000 refcount:1 mapcount:0 mapping:ffff8880aa400540 index:0x0 [ 77.611155][ T9030] raw: 00fffe0000000200 ffffea0002871bc8 ffffea00027dc148 ffff8880aa400540 [ 77.611170][ T9030] raw: 0000000000000000 ffff88809f900000 0000000100000020 0000000000000000 [ 77.611175][ T9030] page dumped because: kasan: bad access detected [ 77.611179][ T9030] [ 77.611183][ T9030] Memory state around the buggy address: [ 77.611200][ T9030] ffff88809f900a00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 77.754695][ T9030] ffff88809f900a80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 77.754705][ T9030] >ffff88809f900b00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 77.754710][ T9030] ^ [ 77.754717][ T9030] ffff88809f900b80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 77.754726][ T9030] ffff88809f900c00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 77.754731][ T9030] ================================================================== [ 77.754735][ T9030] Disabling lock debugging due to kernel taint [ 77.756554][ T9030] Kernel panic - not syncing: panic_on_warn set ... [ 77.812361][ T9030] CPU: 1 PID: 9030 Comm: syz-executor920 Tainted: G B 5.4.0-syzkaller #0 [ 77.812368][ T9030] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 77.812371][ T9030] Call Trace: [ 77.812393][ T9030] dump_stack+0x197/0x210 [ 77.812410][ T9030] panic+0x2e3/0x75c [ 77.812426][ T9030] ? add_taint.cold+0x16/0x16 [ 77.812442][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.812457][ T9030] ? preempt_schedule+0x4b/0x60 [ 77.812477][ T9030] ? ___preempt_schedule+0x16/0x18 [ 77.812493][ T9030] ? trace_hardirqs_on+0x5e/0x240 [ 77.812509][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.812523][ T9030] end_report+0x47/0x4f [ 77.812535][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.812549][ T9030] __kasan_report.cold+0xe/0x41 [ 77.812564][ T9030] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.812575][ T9030] kasan_report+0x12/0x20 [ 77.812594][ T9030] __asan_report_load1_noabort+0x14/0x20 [ 77.905635][ T9030] n_tty_receive_buf_common+0x270f/0x2b70 [ 77.905647][ T9030] ? __kasan_check_read+0x11/0x20 [ 77.905668][ T9030] n_tty_receive_buf2+0x34/0x40 [ 77.905682][ T9030] tty_ldisc_receive_buf+0xad/0x1c0 [ 77.905693][ T9030] ? add_wait_queue+0x112/0x170 [ 77.905705][ T9030] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 77.905717][ T9030] paste_selection+0x1ff/0x460 [ 77.905731][ T9030] ? vcs_remove_sysfs+0x60/0x60 [ 77.905743][ T9030] ? lock_downgrade+0x920/0x920 [ 77.905755][ T9030] ? wake_up_q+0x140/0x140 [ 77.905772][ T9030] tioclinux+0x133/0x480 [ 77.905786][ T9030] vt_ioctl+0x1a41/0x26d0 [ 77.905800][ T9030] ? complete_change_console+0x3a0/0x3a0 [ 77.905811][ T9030] ? lock_downgrade+0x920/0x920 [ 77.905823][ T9030] ? rwlock_bug.part.0+0x90/0x90 [ 77.905836][ T9030] ? tomoyo_path_number_perm+0x214/0x520 [ 77.905846][ T9030] ? find_held_lock+0x35/0x130 [ 77.905859][ T9030] ? tomoyo_path_number_perm+0x214/0x520 [ 77.905873][ T9030] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 77.905885][ T9030] ? tty_jobctrl_ioctl+0x50/0xd40 [ 77.905899][ T9030] ? complete_change_console+0x3a0/0x3a0 [ 77.905913][ T9030] tty_ioctl+0xa37/0x14f0 [ 77.905927][ T9030] ? tty_vhangup+0x30/0x30 [ 77.905940][ T9030] ? tomoyo_path_number_perm+0x454/0x520 [ 77.905952][ T9030] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 77.905969][ T9030] ? tomoyo_path_number_perm+0x25e/0x520 [ 78.038738][ T9030] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 78.038757][ T9030] ? __do_page_fault+0x56a/0xd80 [ 78.038774][ T9030] ? tty_vhangup+0x30/0x30 [ 78.038787][ T9030] do_vfs_ioctl+0x977/0x14e0 [ 78.038803][ T9030] ? compat_ioctl_preallocate+0x220/0x220 [ 78.038818][ T9030] ? __kasan_check_write+0x14/0x20 [ 78.038831][ T9030] ? up_read+0x1cd/0x810 [ 78.038847][ T9030] ? tomoyo_file_ioctl+0x23/0x30 [ 78.038867][ T9030] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 78.084611][ T9030] ? security_file_ioctl+0x8d/0xc0 [ 78.084624][ T9030] ksys_ioctl+0xab/0xd0 [ 78.084642][ T9030] __x64_sys_ioctl+0x73/0xb0 [ 78.084659][ T9030] do_syscall_64+0xfa/0x790 [ 78.084675][ T9030] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 78.084685][ T9030] RIP: 0033:0x441309 [ 78.084699][ T9030] Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 78.084705][ T9030] RSP: 002b:00007fffea28a108 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 78.084717][ T9030] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441309 [ 78.084723][ T9030] RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000003 [ 78.084736][ T9030] RBP: 0000000000012d00 R08: 000000000000000d R09: 00000000004002c8 [ 78.164713][ T9030] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402080 [ 78.164720][ T9030] R13: 0000000000402110 R14: 0000000000000000 R15: 0000000000000000 [ 78.166135][ T9030] Kernel Offset: disabled [ 78.186363][ T9030] Rebooting in 86400 seconds..