[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 74.022949][ T27] audit: type=1800 audit(1577331669.720:25): pid=9230 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 74.043288][ T27] audit: type=1800 audit(1577331669.720:26): pid=9230 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 74.100651][ T27] audit: type=1800 audit(1577331669.730:27): pid=9230 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.166' (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 syzkaller login: [ 529.206812][ T9415] ================================================================== [ 529.206928][ T9415] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 529.206936][ T9415] Read of size 1 at addr ffff88809608b001 by task syz-executor905/9415 [ 529.206939][ T9415] [ 529.206950][ T9415] CPU: 1 PID: 9415 Comm: syz-executor905 Not tainted 5.5.0-rc2-next-20191220-syzkaller #0 [ 529.206955][ T9415] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 529.206979][ T9415] Call Trace: [ 529.207011][ T9415] dump_stack+0x197/0x210 [ 529.207021][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.207073][ T9415] print_address_description.constprop.0.cold+0xd4/0x30b [ 529.207081][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.207089][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.207098][ T9415] __kasan_report.cold+0x1b/0x41 [ 529.207108][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.207124][ T9415] kasan_report+0x12/0x20 [ 529.207140][ T9415] __asan_report_load1_noabort+0x14/0x20 [ 529.207155][ T9415] n_tty_receive_buf_common+0x270f/0x2b70 [ 529.207169][ T9415] ? __kasan_check_read+0x11/0x20 [ 529.207210][ T9415] n_tty_receive_buf2+0x34/0x40 [ 529.207230][ T9415] tty_ldisc_receive_buf+0xad/0x1c0 [ 529.207262][ T9415] ? add_wait_queue+0x112/0x170 [ 529.207271][ T9415] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 529.207288][ T9415] paste_selection+0x1ff/0x460 [ 529.207300][ T9415] ? vcs_remove_sysfs+0x60/0x60 [ 529.207327][ T9415] ? lock_downgrade+0x920/0x920 [ 529.207352][ T9415] ? wake_up_q+0x140/0x140 [ 529.207369][ T9415] tioclinux+0x133/0x480 [ 529.207379][ T9415] vt_ioctl+0x1a41/0x26d0 [ 529.207389][ T9415] ? complete_change_console+0x3a0/0x3a0 [ 529.207431][ T9415] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 529.207475][ T9415] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 529.207485][ T9415] ? tty_jobctrl_ioctl+0x50/0xd40 [ 529.207494][ T9415] ? complete_change_console+0x3a0/0x3a0 [ 529.207502][ T9415] tty_ioctl+0xa37/0x14f0 [ 529.207511][ T9415] ? tty_vhangup+0x30/0x30 [ 529.207520][ T9415] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 529.207558][ T9415] ? do_vfs_ioctl+0x11b/0x1340 [ 529.207570][ T9415] ? ioctl_file_clone+0x180/0x180 [ 529.207580][ T9415] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 529.207624][ T9415] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 529.207635][ T9415] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 529.207647][ T9415] ? tomoyo_file_ioctl+0x23/0x30 [ 529.207656][ T9415] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 529.207703][ T9415] ? security_file_ioctl+0x8d/0xc0 [ 529.207711][ T9415] ? tty_vhangup+0x30/0x30 [ 529.207721][ T9415] ksys_ioctl+0x123/0x180 [ 529.207731][ T9415] __x64_sys_ioctl+0x73/0xb0 [ 529.207764][ T9415] do_syscall_64+0xfa/0x790 [ 529.207790][ T9415] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 529.207797][ T9415] RIP: 0033:0x441319 [ 529.207807][ T9415] 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 [ 529.207811][ T9415] RSP: 002b:00007ffe6e0de9a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 529.207820][ T9415] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319 [ 529.207825][ T9415] RDX: 0000000020000080 RSI: 000000000000541c RDI: 0000000000000003 [ 529.207830][ T9415] RBP: 00000000000812dc R08: 00000000004002c8 R09: 00000000004002c8 [ 529.207834][ T9415] R10: 000000000000000d R11: 0000000000000246 R12: 0000000000402090 [ 529.207839][ T9415] R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000 [ 529.207850][ T9415] [ 529.207871][ T9415] Allocated by task 9414: [ 529.207879][ T9415] save_stack+0x23/0x90 [ 529.207887][ T9415] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 529.207894][ T9415] kasan_kmalloc+0x9/0x10 [ 529.207900][ T9415] __kmalloc+0x163/0x770 [ 529.207908][ T9415] set_selection_kernel+0x872/0x13b0 [ 529.207915][ T9415] set_selection_user+0x95/0xd9 [ 529.207922][ T9415] tioclinux+0x11c/0x480 [ 529.207929][ T9415] vt_ioctl+0x1a41/0x26d0 [ 529.207935][ T9415] tty_ioctl+0xa37/0x14f0 [ 529.207941][ T9415] ksys_ioctl+0x123/0x180 [ 529.207948][ T9415] __x64_sys_ioctl+0x73/0xb0 [ 529.207956][ T9415] do_syscall_64+0xfa/0x790 [ 529.207963][ T9415] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 529.207965][ T9415] [ 529.207969][ T9415] Freed by task 9417: [ 529.207975][ T9415] save_stack+0x23/0x90 [ 529.207982][ T9415] __kasan_slab_free+0x102/0x150 [ 529.207989][ T9415] kasan_slab_free+0xe/0x10 [ 529.207995][ T9415] kfree+0x10a/0x2c0 [ 529.208003][ T9415] set_selection_kernel+0x88f/0x13b0 [ 529.208010][ T9415] set_selection_user+0x95/0xd9 [ 529.208017][ T9415] tioclinux+0x11c/0x480 [ 529.208023][ T9415] vt_ioctl+0x1a41/0x26d0 [ 529.208029][ T9415] tty_ioctl+0xa37/0x14f0 [ 529.208036][ T9415] ksys_ioctl+0x123/0x180 [ 529.208043][ T9415] __x64_sys_ioctl+0x73/0xb0 [ 529.208051][ T9415] do_syscall_64+0xfa/0x790 [ 529.208057][ T9415] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 529.208060][ T9415] [ 529.208066][ T9415] The buggy address belongs to the object at ffff88809608b000 [ 529.208066][ T9415] which belongs to the cache kmalloc-512 of size 512 [ 529.208073][ T9415] The buggy address is located 1 bytes inside of [ 529.208073][ T9415] 512-byte region [ffff88809608b000, ffff88809608b200) [ 529.208076][ T9415] The buggy address belongs to the page: [ 529.208083][ T9415] page:ffffea00025822c0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 [ 529.208095][ T9415] raw: 00fffe0000000200 ffffea00027ccdc8 ffffea0002828448 ffff8880aa400a80 [ 529.208104][ T9415] raw: 0000000000000000 ffff88809608b000 0000000100000004 0000000000000000 [ 529.208108][ T9415] page dumped because: kasan: bad access detected [ 529.208110][ T9415] [ 529.208113][ T9415] Memory state around the buggy address: [ 529.208121][ T9415] ffff88809608af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 529.208128][ T9415] ffff88809608af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 529.208134][ T9415] >ffff88809608b000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 529.208137][ T9415] ^ [ 529.208143][ T9415] ffff88809608b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 529.208149][ T9415] ffff88809608b100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 529.208152][ T9415] ================================================================== [ 529.208155][ T9415] Disabling lock debugging due to kernel taint [ 529.208201][ T9415] Kernel panic - not syncing: panic_on_warn set ... [ 529.208216][ T9415] CPU: 1 PID: 9415 Comm: syz-executor905 Tainted: G B 5.5.0-rc2-next-20191220-syzkaller #0 [ 529.208222][ T9415] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 529.208224][ T9415] Call Trace: [ 529.208233][ T9415] dump_stack+0x197/0x210 [ 529.208287][ T9415] panic+0x2e3/0x75c [ 529.208303][ T9415] ? add_taint.cold+0x16/0x16 [ 529.208314][ T9415] ? retint_kernel+0x2b/0x2b [ 529.208359][ T9415] ? trace_hardirqs_on+0x5e/0x240 [ 529.208369][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.208376][ T9415] end_report+0x47/0x4f [ 529.208384][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.208391][ T9415] __kasan_report.cold+0xe/0x41 [ 529.208399][ T9415] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 529.208407][ T9415] kasan_report+0x12/0x20 [ 529.208416][ T9415] __asan_report_load1_noabort+0x14/0x20 [ 529.208423][ T9415] n_tty_receive_buf_common+0x270f/0x2b70 [ 529.208430][ T9415] ? __kasan_check_read+0x11/0x20 [ 529.208442][ T9415] n_tty_receive_buf2+0x34/0x40 [ 529.208451][ T9415] tty_ldisc_receive_buf+0xad/0x1c0 [ 529.208458][ T9415] ? add_wait_queue+0x112/0x170 [ 529.208465][ T9415] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 529.208474][ T9415] paste_selection+0x1ff/0x460 [ 529.208483][ T9415] ? vcs_remove_sysfs+0x60/0x60 [ 529.208490][ T9415] ? lock_downgrade+0x920/0x920 [ 529.208498][ T9415] ? wake_up_q+0x140/0x140 [ 529.208508][ T9415] tioclinux+0x133/0x480 [ 529.208516][ T9415] vt_ioctl+0x1a41/0x26d0 [ 529.208525][ T9415] ? complete_change_console+0x3a0/0x3a0 [ 529.208535][ T9415] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 529.208545][ T9415] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 529.208554][ T9415] ? tty_jobctrl_ioctl+0x50/0xd40 [ 529.208562][ T9415] ? complete_change_console+0x3a0/0x3a0 [ 529.208568][ T9415] tty_ioctl+0xa37/0x14f0 [ 529.208575][ T9415] ? tty_vhangup+0x30/0x30 [ 529.208584][ T9415] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 529.208591][ T9415] ? do_vfs_ioctl+0x11b/0x1340 [ 529.208599][ T9415] ? ioctl_file_clone+0x180/0x180 [ 529.208608][ T9415] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 529.208618][ T9415] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 529.208626][ T9415] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 529.208635][ T9415] ? tomoyo_file_ioctl+0x23/0x30 [ 529.208643][ T9415] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 529.208651][ T9415] ? security_file_ioctl+0x8d/0xc0 [ 529.208657][ T9415] ? tty_vhangup+0x30/0x30 [ 529.208665][ T9415] ksys_ioctl+0x123/0x180 [ 529.208673][ T9415] __x64_sys_ioctl+0x73/0xb0 [ 529.208682][ T9415] do_syscall_64+0xfa/0x790 [ 529.208690][ T9415] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 529.208695][ T9415] RIP: 0033:0x441319 [ 529.208703][ T9415] 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 [ 529.208706][ T9415] RSP: 002b:00007ffe6e0de9a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 529.208713][ T9415] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319 [ 529.208717][ T9415] RDX: 0000000020000080 RSI: 000000000000541c RDI: 0000000000000003 [ 529.208721][ T9415] RBP: 00000000000812dc R08: 00000000004002c8 R09: 00000000004002c8 [ 529.208725][ T9415] R10: 000000000000000d R11: 0000000000000246 R12: 0000000000402090 [ 529.208729][ T9415] R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000 [ 529.210191][ T9415] Kernel Offset: disabled