[ 65.644122][ T27] audit: type=1800 audit(1576217701.269:27): pid=9089 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. [ 66.780252][ T27] kauditd_printk_skb: 1 callbacks suppressed [ 66.780263][ T27] audit: type=1800 audit(1576217702.449:29): pid=9089 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 [ 66.806900][ T27] audit: type=1800 audit(1576217702.449:30): pid=9089 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.1.18' (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 syzkaller login: [ 76.767921][ T9274] ================================================================== [ 76.776724][ T9274] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 76.776742][ T9274] Read of size 1 at addr ffff8880a7ba1401 by task syz-executor389/9274 [ 76.776745][ T9274] [ 76.776762][ T9274] CPU: 1 PID: 9274 Comm: syz-executor389 Not tainted 5.5.0-rc1-syzkaller #0 [ 76.776770][ T9274] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 76.776775][ T9274] Call Trace: [ 76.776795][ T9274] dump_stack+0x197/0x210 [ 76.776810][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 76.776829][ T9274] print_address_description.constprop.0.cold+0xd4/0x30b [ 76.776891][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 76.776905][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 76.776918][ T9274] __kasan_report.cold+0x1b/0x41 [ 76.776933][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 76.776953][ T9274] kasan_report+0x12/0x20 [ 76.862382][ T9274] __asan_report_load1_noabort+0x14/0x20 [ 76.862399][ T9274] n_tty_receive_buf_common+0x270f/0x2b70 [ 76.862411][ T9274] ? __kasan_check_read+0x11/0x20 [ 76.862443][ T9274] n_tty_receive_buf2+0x34/0x40 [ 76.862461][ T9274] tty_ldisc_receive_buf+0xad/0x1c0 [ 76.862472][ T9274] ? add_wait_queue+0x112/0x170 [ 76.862485][ T9274] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 76.862502][ T9274] paste_selection+0x1ff/0x460 [ 76.862519][ T9274] ? vcs_remove_sysfs+0x60/0x60 [ 76.862533][ T9274] ? lock_downgrade+0x920/0x920 [ 76.862550][ T9274] ? wake_up_q+0x140/0x140 [ 76.862574][ T9274] tioclinux+0x133/0x480 [ 76.862593][ T9274] vt_ioctl+0x1a41/0x26d0 [ 76.862608][ T9274] ? complete_change_console+0x3a0/0x3a0 [ 76.932978][ T9274] ? lock_downgrade+0x920/0x920 [ 76.932995][ T9274] ? rwlock_bug.part.0+0x90/0x90 [ 76.933011][ T9274] ? tomoyo_path_number_perm+0x214/0x520 [ 76.933024][ T9274] ? find_held_lock+0x35/0x130 [ 76.933038][ T9274] ? tomoyo_path_number_perm+0x214/0x520 [ 76.933057][ T9274] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 76.933080][ T9274] ? tty_jobctrl_ioctl+0x50/0xd40 [ 76.933099][ T9274] ? complete_change_console+0x3a0/0x3a0 [ 76.933122][ T9274] tty_ioctl+0xa37/0x14f0 [ 76.933148][ T9274] ? tty_vhangup+0x30/0x30 [ 76.933160][ T9274] ? tomoyo_path_number_perm+0x454/0x520 [ 76.933180][ T9274] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 76.933192][ T9274] ? tomoyo_path_number_perm+0x25e/0x520 [ 76.933208][ T9274] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 76.933234][ T9274] ? __do_page_fault+0x56a/0xd80 [ 76.933252][ T9274] ? tty_vhangup+0x30/0x30 [ 76.933269][ T9274] do_vfs_ioctl+0x977/0x14e0 [ 76.933288][ T9274] ? compat_ioctl_preallocate+0x220/0x220 [ 77.031365][ T9274] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.031385][ T9274] ? debug_smp_processor_id+0x33/0x18a [ 77.031401][ T9274] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 77.031416][ T9274] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 77.031433][ T9274] ? tomoyo_file_ioctl+0x23/0x30 [ 77.031445][ T9274] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.031458][ T9274] ? security_file_ioctl+0x8d/0xc0 [ 77.031477][ T9274] ksys_ioctl+0xab/0xd0 [ 77.031494][ T9274] __x64_sys_ioctl+0x73/0xb0 [ 77.031514][ T9274] do_syscall_64+0xfa/0x790 [ 77.031534][ T9274] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.031545][ T9274] RIP: 0033:0x441339 [ 77.031565][ T9274] 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.115694][ T9274] RSP: 002b:00007fff2e5d9508 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 77.115707][ T9274] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441339 [ 77.115714][ T9274] RDX: 00000000200000c0 RSI: 000000000000541c RDI: 0000000000000003 [ 77.115721][ T9274] RBP: 0000000000012b85 R08: 000000000000000d R09: 00000000004002c8 [ 77.115726][ T9274] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004020b0 [ 77.115734][ T9274] R13: 0000000000402140 R14: 0000000000000000 R15: 0000000000000000 [ 77.115756][ T9274] [ 77.115764][ T9274] Allocated by task 9271: [ 77.115787][ T9274] save_stack+0x23/0x90 [ 77.115800][ T9274] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 77.115809][ T9274] kasan_kmalloc+0x9/0x10 [ 77.115819][ T9274] __kmalloc+0x163/0x770 [ 77.115829][ T9274] set_selection_kernel+0x872/0x13b0 [ 77.115845][ T9274] set_selection_user+0x95/0xd9 [ 77.201564][ T9274] tioclinux+0x11c/0x480 [ 77.201578][ T9274] vt_ioctl+0x1a41/0x26d0 [ 77.201590][ T9274] tty_ioctl+0xa37/0x14f0 [ 77.201604][ T9274] do_vfs_ioctl+0x977/0x14e0 [ 77.201614][ T9274] ksys_ioctl+0xab/0xd0 [ 77.201624][ T9274] __x64_sys_ioctl+0x73/0xb0 [ 77.201641][ T9274] do_syscall_64+0xfa/0x790 [ 77.201658][ T9274] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.201663][ T9274] [ 77.201670][ T9274] Freed by task 9272: [ 77.201682][ T9274] save_stack+0x23/0x90 [ 77.201692][ T9274] __kasan_slab_free+0x102/0x150 [ 77.201703][ T9274] kasan_slab_free+0xe/0x10 [ 77.201712][ T9274] kfree+0x10a/0x2c0 [ 77.201723][ T9274] set_selection_kernel+0x88f/0x13b0 [ 77.201733][ T9274] set_selection_user+0x95/0xd9 [ 77.201744][ T9274] tioclinux+0x11c/0x480 [ 77.201755][ T9274] vt_ioctl+0x1a41/0x26d0 [ 77.201766][ T9274] tty_ioctl+0xa37/0x14f0 [ 77.201776][ T9274] do_vfs_ioctl+0x977/0x14e0 [ 77.201785][ T9274] ksys_ioctl+0xab/0xd0 [ 77.201802][ T9274] __x64_sys_ioctl+0x73/0xb0 [ 77.300848][ T9274] do_syscall_64+0xfa/0x790 [ 77.300898][ T9274] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.300903][ T9274] [ 77.300914][ T9274] The buggy address belongs to the object at ffff8880a7ba1400 [ 77.300914][ T9274] which belongs to the cache kmalloc-512 of size 512 [ 77.300925][ T9274] The buggy address is located 1 bytes inside of [ 77.300925][ T9274] 512-byte region [ffff8880a7ba1400, ffff8880a7ba1600) [ 77.300930][ T9274] The buggy address belongs to the page: [ 77.300944][ T9274] page:ffffea00029ee840 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0xffff8880a7ba1000 [ 77.300970][ T9274] raw: 00fffe0000000200 ffffea00029e0908 ffffea0002537308 ffff8880aa400a80 executing program executing program [ 77.366509][ T9274] raw: ffff8880a7ba1000 ffff8880a7ba1000 0000000100000002 0000000000000000 [ 77.366516][ T9274] page dumped because: kasan: bad access detected [ 77.366521][ T9274] [ 77.366524][ T9274] Memory state around the buggy address: [ 77.366535][ T9274] ffff8880a7ba1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 77.366544][ T9274] ffff8880a7ba1380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 77.366554][ T9274] >ffff8880a7ba1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 77.366559][ T9274] ^ [ 77.366568][ T9274] ffff8880a7ba1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 77.366577][ T9274] ffff8880a7ba1500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 77.366582][ T9274] ================================================================== [ 77.366586][ T9274] Disabling lock debugging due to kernel taint [ 77.368202][ T9274] Kernel panic - not syncing: panic_on_warn set ... [ 77.454760][ T9274] CPU: 1 PID: 9274 Comm: syz-executor389 Tainted: G B 5.5.0-rc1-syzkaller #0 [ 77.454795][ T9274] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 77.474961][ T9274] Call Trace: [ 77.474988][ T9274] dump_stack+0x197/0x210 [ 77.475009][ T9274] panic+0x2e3/0x75c [ 77.487105][ T9274] ? add_taint.cold+0x16/0x16 [ 77.487124][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.487139][ T9274] ? preempt_schedule+0x4b/0x60 [ 77.487155][ T9274] ? ___preempt_schedule+0x16/0x18 [ 77.487172][ T9274] ? trace_hardirqs_on+0x5e/0x240 [ 77.487186][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.487200][ T9274] end_report+0x47/0x4f [ 77.487211][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.487221][ T9274] __kasan_report.cold+0xe/0x41 [ 77.487235][ T9274] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.487247][ T9274] kasan_report+0x12/0x20 [ 77.487260][ T9274] __asan_report_load1_noabort+0x14/0x20 [ 77.487272][ T9274] n_tty_receive_buf_common+0x270f/0x2b70 [ 77.487283][ T9274] ? __kasan_check_read+0x11/0x20 [ 77.487304][ T9274] n_tty_receive_buf2+0x34/0x40 [ 77.487318][ T9274] tty_ldisc_receive_buf+0xad/0x1c0 [ 77.487328][ T9274] ? add_wait_queue+0x112/0x170 [ 77.487346][ T9274] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 77.581539][ T9274] paste_selection+0x1ff/0x460 [ 77.581553][ T9274] ? vcs_remove_sysfs+0x60/0x60 [ 77.581567][ T9274] ? lock_downgrade+0x920/0x920 [ 77.581582][ T9274] ? wake_up_q+0x140/0x140 [ 77.581602][ T9274] tioclinux+0x133/0x480 [ 77.581616][ T9274] vt_ioctl+0x1a41/0x26d0 [ 77.581631][ T9274] ? complete_change_console+0x3a0/0x3a0 [ 77.581642][ T9274] ? lock_downgrade+0x920/0x920 [ 77.581654][ T9274] ? rwlock_bug.part.0+0x90/0x90 [ 77.581674][ T9274] ? tomoyo_path_number_perm+0x214/0x520 [ 77.630358][ T9274] ? find_held_lock+0x35/0x130 [ 77.630376][ T9274] ? tomoyo_path_number_perm+0x214/0x520 [ 77.630391][ T9274] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 77.630407][ T9274] ? tty_jobctrl_ioctl+0x50/0xd40 [ 77.630421][ T9274] ? complete_change_console+0x3a0/0x3a0 [ 77.630435][ T9274] tty_ioctl+0xa37/0x14f0 [ 77.630449][ T9274] ? tty_vhangup+0x30/0x30 [ 77.630459][ T9274] ? tomoyo_path_number_perm+0x454/0x520 [ 77.630472][ T9274] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 77.630490][ T9274] ? tomoyo_path_number_perm+0x25e/0x520 [ 77.683956][ T9274] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 77.683976][ T9274] ? __do_page_fault+0x56a/0xd80 [ 77.683990][ T9274] ? tty_vhangup+0x30/0x30 [ 77.684006][ T9274] do_vfs_ioctl+0x977/0x14e0 [ 77.684021][ T9274] ? compat_ioctl_preallocate+0x220/0x220 [ 77.684036][ T9274] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.684051][ T9274] ? debug_smp_processor_id+0x33/0x18a [ 77.684067][ T9274] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 77.684080][ T9274] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 77.684095][ T9274] ? tomoyo_file_ioctl+0x23/0x30 [ 77.684107][ T9274] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.684119][ T9274] ? security_file_ioctl+0x8d/0xc0 [ 77.684131][ T9274] ksys_ioctl+0xab/0xd0 [ 77.684144][ T9274] __x64_sys_ioctl+0x73/0xb0 [ 77.684158][ T9274] do_syscall_64+0xfa/0x790 [ 77.684177][ T9274] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.684192][ T9274] RIP: 0033:0x441339 [ 77.774334][ T9274] 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.774341][ T9274] RSP: 002b:00007fff2e5d9508 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 77.774352][ T9274] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441339 [ 77.774358][ T9274] RDX: 00000000200000c0 RSI: 000000000000541c RDI: 0000000000000003 [ 77.774364][ T9274] RBP: 0000000000012b85 R08: 000000000000000d R09: 00000000004002c8 [ 77.774370][ T9274] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004020b0 [ 77.774377][ T9274] R13: 0000000000402140 R14: 0000000000000000 R15: 0000000000000000 [ 77.776180][ T9274] Kernel Offset: disabled [ 77.848410][ T9274] Rebooting in 86400 seconds..