[ 80.275720][ T28] audit: type=1800 audit(1577340387.391:25): pid=9396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 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. [ 81.363489][ T28] kauditd_printk_skb: 3 callbacks suppressed [ 81.363502][ T28] audit: type=1800 audit(1577340388.481:29): pid=9396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 81.389722][ T28] audit: type=1800 audit(1577340388.481:30): pid=9396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.7' (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 executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 495.569676][ T9602] ================================================================== [ 495.578670][ T9602] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 495.578691][ T9602] Read of size 1 at addr ffff88809a2e2c01 by task syz-executor081/9602 [ 495.578695][ T9602] [ 495.578712][ T9602] CPU: 1 PID: 9602 Comm: syz-executor081 Not tainted 5.5.0-rc2-next-20191220-syzkaller #0 [ 495.578720][ T9602] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 495.578746][ T9602] Call Trace: [ 495.578784][ T9602] dump_stack+0x197/0x210 [ 495.578800][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 495.578858][ T9602] print_address_description.constprop.0.cold+0xd4/0x30b [ 495.578869][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 495.578881][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 495.578893][ T9602] __kasan_report.cold+0x1b/0x41 [ 495.578907][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 495.578922][ T9602] kasan_report+0x12/0x20 [ 495.578936][ T9602] __asan_report_load1_noabort+0x14/0x20 [ 495.578949][ T9602] n_tty_receive_buf_common+0x270f/0x2b70 [ 495.578961][ T9602] ? __kasan_check_read+0x11/0x20 [ 495.578992][ T9602] n_tty_receive_buf2+0x34/0x40 [ 495.579008][ T9602] tty_ldisc_receive_buf+0xad/0x1c0 [ 495.579041][ T9602] ? add_wait_queue+0x112/0x170 [ 495.579053][ T9602] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 495.579076][ T9602] paste_selection+0x1ff/0x460 [ 495.579096][ T9602] ? vcs_remove_sysfs+0x60/0x60 [ 495.579129][ T9602] ? lock_downgrade+0x920/0x920 [ 495.579167][ T9602] ? wake_up_q+0x140/0x140 [ 495.579196][ T9602] tioclinux+0x133/0x480 [ 495.579214][ T9602] vt_ioctl+0x1a41/0x26d0 [ 495.579232][ T9602] ? complete_change_console+0x3a0/0x3a0 [ 495.579303][ T9602] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 495.744460][ T9602] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 495.744486][ T9602] ? tty_jobctrl_ioctl+0x50/0xd40 [ 495.755563][ T9602] ? complete_change_console+0x3a0/0x3a0 [ 495.755578][ T9602] tty_ioctl+0xa37/0x14f0 [ 495.755595][ T9602] ? tty_vhangup+0x30/0x30 [ 495.755614][ T9602] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 495.755711][ T9602] ? do_vfs_ioctl+0x11b/0x1340 [ 495.755734][ T9602] ? ioctl_file_clone+0x180/0x180 [ 495.755750][ T9602] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 495.792610][ T9602] ? debug_smp_processor_id+0x33/0x18a [ 495.792675][ T9602] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 495.792696][ T9602] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 495.792716][ T9602] ? tomoyo_file_ioctl+0x23/0x30 [ 495.792733][ T9602] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 495.792781][ T9602] ? security_file_ioctl+0x8d/0xc0 [ 495.792801][ T9602] ? tty_vhangup+0x30/0x30 [ 495.792818][ T9602] ksys_ioctl+0x123/0x180 [ 495.835165][ T9602] __x64_sys_ioctl+0x73/0xb0 [ 495.835262][ T9602] do_syscall_64+0xfa/0x790 [ 495.835303][ T9602] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 495.835320][ T9602] RIP: 0033:0x441329 [ 495.854255][ T9602] 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 [ 495.854263][ T9602] RSP: 002b:00007ffdde10f798 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 495.854276][ T9602] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441329 [ 495.854285][ T9602] RDX: 00000000200001c0 RSI: 000000000000541c RDI: 0000000000000003 [ 495.854293][ T9602] RBP: 0000000000078f6e R08: 000000000000000d R09: 00000000004002c8 [ 495.854302][ T9602] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004020a0 [ 495.854309][ T9602] R13: 0000000000402130 R14: 0000000000000000 R15: 0000000000000000 [ 495.854332][ T9602] [ 495.854408][ T9602] Allocated by task 9596: [ 495.854431][ T9602] save_stack+0x23/0x90 [ 495.854445][ T9602] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 495.854457][ T9602] kasan_kmalloc+0x9/0x10 [ 495.854467][ T9602] __kmalloc+0x163/0x770 [ 495.854484][ T9602] set_selection_kernel+0x872/0x13b0 [ 495.854497][ T9602] set_selection_user+0x95/0xd9 [ 495.854508][ T9602] tioclinux+0x11c/0x480 [ 495.854519][ T9602] vt_ioctl+0x1a41/0x26d0 [ 495.854536][ T9602] tty_ioctl+0xa37/0x14f0 [ 495.982272][ T9602] ksys_ioctl+0x123/0x180 [ 495.982284][ T9602] __x64_sys_ioctl+0x73/0xb0 [ 495.982301][ T9602] do_syscall_64+0xfa/0x790 [ 495.982316][ T9602] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 495.982320][ T9602] [ 495.982328][ T9602] Freed by task 9598: [ 495.982342][ T9602] save_stack+0x23/0x90 [ 495.982354][ T9602] __kasan_slab_free+0x102/0x150 [ 495.982366][ T9602] kasan_slab_free+0xe/0x10 [ 495.982376][ T9602] kfree+0x10a/0x2c0 [ 495.982392][ T9602] set_selection_kernel+0x88f/0x13b0 [ 495.982410][ T9602] set_selection_user+0x95/0xd9 [ 496.036114][ T9602] tioclinux+0x11c/0x480 [ 496.036128][ T9602] vt_ioctl+0x1a41/0x26d0 [ 496.036138][ T9602] tty_ioctl+0xa37/0x14f0 [ 496.036152][ T9602] ksys_ioctl+0x123/0x180 [ 496.036164][ T9602] __x64_sys_ioctl+0x73/0xb0 [ 496.036181][ T9602] do_syscall_64+0xfa/0x790 [ 496.036195][ T9602] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 496.036200][ T9602] [ 496.036211][ T9602] The buggy address belongs to the object at ffff88809a2e2c00 [ 496.036211][ T9602] which belongs to the cache kmalloc-512 of size 512 [ 496.036223][ T9602] The buggy address is located 1 bytes inside of [ 496.036223][ T9602] 512-byte region [ffff88809a2e2c00, ffff88809a2e2e00) [ 496.036228][ T9602] The buggy address belongs to the page: [ 496.036241][ T9602] page:ffffea000268b880 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 [ 496.036260][ T9602] raw: 00fffe0000000200 ffffea00028cc388 ffffea000277a7c8 ffff8880aa400a80 [ 496.121577][ T9602] raw: 0000000000000000 ffff88809a2e2000 0000000100000004 0000000000000000 [ 496.121584][ T9602] page dumped because: kasan: bad access detected [ 496.121589][ T9602] [ 496.121593][ T9602] Memory state around the buggy address: [ 496.121604][ T9602] ffff88809a2e2b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 496.121615][ T9602] ffff88809a2e2b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 496.121625][ T9602] >ffff88809a2e2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 496.121631][ T9602] ^ [ 496.121642][ T9602] ffff88809a2e2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 496.121652][ T9602] ffff88809a2e2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 496.121657][ T9602] ================================================================== [ 496.121662][ T9602] Disabling lock debugging due to kernel taint [ 496.124414][ T9602] Kernel panic - not syncing: panic_on_warn set ... [ 496.213147][ T9602] CPU: 1 PID: 9602 Comm: syz-executor081 Tainted: G B 5.5.0-rc2-next-20191220-syzkaller #0 [ 496.213154][ T9602] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 496.213158][ T9602] Call Trace: [ 496.213184][ T9602] dump_stack+0x197/0x210 [ 496.213283][ T9602] panic+0x2e3/0x75c [ 496.213325][ T9602] ? add_taint.cold+0x16/0x16 [ 496.250958][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 496.250974][ T9602] ? preempt_schedule+0x4b/0x60 [ 496.250990][ T9602] ? ___preempt_schedule+0x16/0x18 [ 496.251084][ T9602] ? trace_hardirqs_on+0x5e/0x240 [ 496.251105][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 496.278355][ T9602] end_report+0x47/0x4f [ 496.278373][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 496.278386][ T9602] __kasan_report.cold+0xe/0x41 [ 496.278401][ T9602] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 496.278415][ T9602] kasan_report+0x12/0x20 [ 496.278430][ T9602] __asan_report_load1_noabort+0x14/0x20 [ 496.278443][ T9602] n_tty_receive_buf_common+0x270f/0x2b70 [ 496.278455][ T9602] ? __kasan_check_read+0x11/0x20 [ 496.278476][ T9602] n_tty_receive_buf2+0x34/0x40 [ 496.278491][ T9602] tty_ldisc_receive_buf+0xad/0x1c0 [ 496.278503][ T9602] ? add_wait_queue+0x112/0x170 [ 496.278516][ T9602] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 496.278531][ T9602] paste_selection+0x1ff/0x460 [ 496.278547][ T9602] ? vcs_remove_sysfs+0x60/0x60 [ 496.278560][ T9602] ? lock_downgrade+0x920/0x920 [ 496.278575][ T9602] ? wake_up_q+0x140/0x140 [ 496.278592][ T9602] tioclinux+0x133/0x480 [ 496.278612][ T9602] vt_ioctl+0x1a41/0x26d0 [ 496.369165][ T9602] ? complete_change_console+0x3a0/0x3a0 [ 496.369185][ T9602] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 496.369207][ T9602] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 496.369223][ T9602] ? tty_jobctrl_ioctl+0x50/0xd40 [ 496.369237][ T9602] ? complete_change_console+0x3a0/0x3a0 [ 496.369253][ T9602] tty_ioctl+0xa37/0x14f0 [ 496.369265][ T9602] ? tty_vhangup+0x30/0x30 [ 496.369279][ T9602] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 496.369306][ T9602] ? do_vfs_ioctl+0x11b/0x1340 [ 496.417752][ T9602] ? ioctl_file_clone+0x180/0x180 [ 496.417771][ T9602] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 496.417787][ T9602] ? debug_smp_processor_id+0x33/0x18a [ 496.417805][ T9602] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 496.417821][ T9602] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 496.417837][ T9602] ? tomoyo_file_ioctl+0x23/0x30 [ 496.417851][ T9602] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 496.417866][ T9602] ? security_file_ioctl+0x8d/0xc0 [ 496.417886][ T9602] ? tty_vhangup+0x30/0x30 [ 496.467056][ T9602] ksys_ioctl+0x123/0x180 [ 496.467072][ T9602] __x64_sys_ioctl+0x73/0xb0 [ 496.467092][ T9602] do_syscall_64+0xfa/0x790 [ 496.467109][ T9602] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 496.467119][ T9602] RIP: 0033:0x441329 [ 496.467135][ T9602] 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 [ 496.467141][ T9602] RSP: 002b:00007ffdde10f798 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 496.467154][ T9602] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441329 [ 496.467161][ T9602] RDX: 00000000200001c0 RSI: 000000000000541c RDI: 0000000000000003 [ 496.467167][ T9602] RBP: 0000000000078f6e R08: 000000000000000d R09: 00000000004002c8 [ 496.467173][ T9602] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004020a0 [ 496.467188][ T9602] R13: 0000000000402130 R14: 0000000000000000 R15: 0000000000000000 [ 496.561150][ T9602] Kernel Offset: disabled [ 496.565487][ T9602] Rebooting in 86400 seconds..