[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 75.305768][ T27] kauditd_printk_skb: 8 callbacks suppressed [ 75.305781][ T27] audit: type=1400 audit(1576385094.233:41): avc: denied { map } for pid=9511 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 Warning: Permanently added '10.128.0.121' (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 [ 96.205526][ T27] audit: type=1400 audit(1576385115.133:42): avc: denied { map } for pid=9523 comm="syz-executor196" path="/root/syz-executor196734732" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 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 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 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 [ 97.026438][ T9658] ================================================================== [ 97.026497][ T9658] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 97.026509][ T9658] Read of size 1 at addr ffff88809fc49c01 by task syz-executor196/9658 [ 97.026513][ T9658] [ 97.026527][ T9658] CPU: 1 PID: 9658 Comm: syz-executor196 Not tainted 5.5.0-rc1-syzkaller #0 [ 97.026534][ T9658] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 97.026539][ T9658] Call Trace: [ 97.026556][ T9658] dump_stack+0x197/0x210 [ 97.026571][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.026590][ T9658] print_address_description.constprop.0.cold+0xd4/0x30b [ 97.026602][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.026616][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.026629][ T9658] __kasan_report.cold+0x1b/0x41 [ 97.026646][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.026661][ T9658] kasan_report+0x12/0x20 [ 97.026676][ T9658] __asan_report_load1_noabort+0x14/0x20 [ 97.026690][ T9658] n_tty_receive_buf_common+0x270f/0x2b70 [ 97.026702][ T9658] ? __kasan_check_read+0x11/0x20 [ 97.026733][ T9658] n_tty_receive_buf2+0x34/0x40 [ 97.026750][ T9658] tty_ldisc_receive_buf+0xad/0x1c0 [ 97.026762][ T9658] ? add_wait_queue+0x112/0x170 [ 97.026776][ T9658] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 97.026791][ T9658] paste_selection+0x1ff/0x460 [ 97.026808][ T9658] ? vcs_remove_sysfs+0x60/0x60 [ 97.026821][ T9658] ? lock_downgrade+0x920/0x920 [ 97.026839][ T9658] ? wake_up_q+0x140/0x140 [ 97.026864][ T9658] tioclinux+0x133/0x480 [ 97.026887][ T9658] vt_ioctl+0x1a41/0x26d0 [ 97.026910][ T9658] ? complete_change_console+0x3a0/0x3a0 [ 97.026922][ T9658] ? lock_downgrade+0x920/0x920 [ 97.026937][ T9658] ? rwlock_bug.part.0+0x90/0x90 [ 97.026954][ T9658] ? tomoyo_path_number_perm+0x214/0x520 [ 97.026967][ T9658] ? find_held_lock+0x35/0x130 [ 97.026981][ T9658] ? tomoyo_path_number_perm+0x214/0x520 [ 97.026996][ T9658] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 97.027009][ T9658] ? tty_jobctrl_ioctl+0x50/0xd40 [ 97.027024][ T9658] ? complete_change_console+0x3a0/0x3a0 [ 97.027038][ T9658] tty_ioctl+0xa37/0x14f0 [ 97.027053][ T9658] ? tty_vhangup+0x30/0x30 [ 97.027064][ T9658] ? tomoyo_path_number_perm+0x454/0x520 [ 97.027082][ T9658] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 97.027095][ T9658] ? tomoyo_path_number_perm+0x25e/0x520 [ 97.027111][ T9658] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 97.027136][ T9658] ? ___might_sleep+0x163/0x2c0 [ 97.027156][ T9658] ? tty_vhangup+0x30/0x30 [ 97.027171][ T9658] do_vfs_ioctl+0x977/0x14e0 [ 97.027189][ T9658] ? compat_ioctl_preallocate+0x220/0x220 [ 97.027203][ T9658] ? selinux_file_mprotect+0x620/0x620 [ 97.027217][ T9658] ? kmem_cache_free+0x26b/0x320 [ 97.027233][ T9658] ? putname+0xf4/0x130 [ 97.027248][ T9658] ? do_sys_open+0x31d/0x5d0 [ 97.027265][ T9658] ? tomoyo_file_ioctl+0x23/0x30 [ 97.027279][ T9658] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 97.027291][ T9658] ? security_file_ioctl+0x8d/0xc0 [ 97.027306][ T9658] ksys_ioctl+0xab/0xd0 [ 97.027322][ T9658] __x64_sys_ioctl+0x73/0xb0 [ 97.027339][ T9658] do_syscall_64+0xfa/0x790 [ 97.027361][ T9658] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 97.339023][ T9658] RIP: 0033:0x441319 [ 97.339038][ T9658] 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 [ 97.339045][ T9658] RSP: 002b:00007ffc1ecfdfb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 97.339058][ T9658] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319 [ 97.339066][ T9658] RDX: 0000000020000080 RSI: 000000000000541c RDI: 0000000000000004 [ 97.339073][ T9658] RBP: 0000000000017ab4 R08: 000000000000000d R09: 00000000004002c8 [ 97.339079][ T9658] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402090 [ 97.339085][ T9658] R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000 [ 97.339103][ T9658] [ 97.339110][ T9658] Allocated by task 9661: [ 97.339126][ T9658] save_stack+0x23/0x90 [ 97.339137][ T9658] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 97.339147][ T9658] kasan_kmalloc+0x9/0x10 [ 97.339157][ T9658] __kmalloc+0x163/0x770 [ 97.339169][ T9658] set_selection_kernel+0x872/0x13b0 [ 97.339178][ T9658] set_selection_user+0x95/0xd9 [ 97.339191][ T9658] tioclinux+0x11c/0x480 [ 97.339203][ T9658] vt_ioctl+0x1a41/0x26d0 [ 97.339214][ T9658] tty_ioctl+0xa37/0x14f0 [ 97.339225][ T9658] do_vfs_ioctl+0x977/0x14e0 [ 97.339235][ T9658] ksys_ioctl+0xab/0xd0 [ 97.339250][ T9658] __x64_sys_ioctl+0x73/0xb0 [ 97.475923][ T9658] do_syscall_64+0xfa/0x790 [ 97.475937][ T9658] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 97.475942][ T9658] [ 97.475949][ T9658] Freed by task 9662: [ 97.475960][ T9658] save_stack+0x23/0x90 [ 97.475969][ T9658] __kasan_slab_free+0x102/0x150 [ 97.475978][ T9658] kasan_slab_free+0xe/0x10 [ 97.475987][ T9658] kfree+0x10a/0x2c0 [ 97.475999][ T9658] set_selection_kernel+0x88f/0x13b0 [ 97.476009][ T9658] set_selection_user+0x95/0xd9 [ 97.476021][ T9658] tioclinux+0x11c/0x480 [ 97.476033][ T9658] vt_ioctl+0x1a41/0x26d0 [ 97.476044][ T9658] tty_ioctl+0xa37/0x14f0 [ 97.476055][ T9658] do_vfs_ioctl+0x977/0x14e0 [ 97.476066][ T9658] ksys_ioctl+0xab/0xd0 [ 97.476077][ T9658] __x64_sys_ioctl+0x73/0xb0 [ 97.476088][ T9658] do_syscall_64+0xfa/0x790 [ 97.476100][ T9658] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 97.476103][ T9658] [ 97.476113][ T9658] The buggy address belongs to the object at ffff88809fc49c00 [ 97.476113][ T9658] which belongs to the cache kmalloc-512 of size 512 [ 97.476124][ T9658] The buggy address is located 1 bytes inside of [ 97.476124][ T9658] 512-byte region [ffff88809fc49c00, ffff88809fc49e00) [ 97.476128][ T9658] The buggy address belongs to the page: [ 97.476141][ T9658] page:ffffea00027f1240 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 [ 97.476158][ T9658] raw: 00fffe0000000200 ffffea000257fc88 ffffea0002623088 ffff8880aa400a80 [ 97.476173][ T9658] raw: 0000000000000000 ffff88809fc49000 0000000100000004 0000000000000000 [ 97.476179][ T9658] page dumped because: kasan: bad access detected [ 97.476182][ T9658] [ 97.476186][ T9658] Memory state around the buggy address: [ 97.476198][ T9658] ffff88809fc49b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 97.476208][ T9658] ffff88809fc49b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 97.476219][ T9658] >ffff88809fc49c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 97.476223][ T9658] ^ [ 97.476233][ T9658] ffff88809fc49c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 97.476244][ T9658] ffff88809fc49d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 97.476249][ T9658] ================================================================== [ 97.476253][ T9658] Disabling lock debugging due to kernel taint [ 97.476796][ T9658] Kernel panic - not syncing: panic_on_warn set ... [ 97.697859][ T9658] CPU: 1 PID: 9658 Comm: syz-executor196 Tainted: G B 5.5.0-rc1-syzkaller #0 [ 97.697872][ T9658] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 97.717955][ T9658] Call Trace: [ 97.717977][ T9658] dump_stack+0x197/0x210 [ 97.717992][ T9658] panic+0x2e3/0x75c [ 97.718009][ T9658] ? add_taint.cold+0x16/0x16 [ 97.718024][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.718039][ T9658] ? preempt_schedule+0x4b/0x60 [ 97.718052][ T9658] ? ___preempt_schedule+0x16/0x18 [ 97.718066][ T9658] ? trace_hardirqs_on+0x5e/0x240 [ 97.718080][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.718092][ T9658] end_report+0x47/0x4f [ 97.718104][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.718115][ T9658] __kasan_report.cold+0xe/0x41 [ 97.718129][ T9658] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 97.718141][ T9658] kasan_report+0x12/0x20 [ 97.718153][ T9658] __asan_report_load1_noabort+0x14/0x20 [ 97.718166][ T9658] n_tty_receive_buf_common+0x270f/0x2b70 [ 97.718176][ T9658] ? __kasan_check_read+0x11/0x20 [ 97.718197][ T9658] n_tty_receive_buf2+0x34/0x40 [ 97.807008][ T9658] tty_ldisc_receive_buf+0xad/0x1c0 [ 97.807020][ T9658] ? add_wait_queue+0x112/0x170 [ 97.807032][ T9658] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 97.807045][ T9658] paste_selection+0x1ff/0x460 [ 97.807058][ T9658] ? vcs_remove_sysfs+0x60/0x60 [ 97.807069][ T9658] ? lock_downgrade+0x920/0x920 [ 97.807083][ T9658] ? wake_up_q+0x140/0x140 [ 97.807100][ T9658] tioclinux+0x133/0x480 [ 97.807113][ T9658] vt_ioctl+0x1a41/0x26d0 [ 97.807131][ T9658] ? complete_change_console+0x3a0/0x3a0 [ 97.855906][ T9658] ? lock_downgrade+0x920/0x920 [ 97.855918][ T9658] ? rwlock_bug.part.0+0x90/0x90 [ 97.855931][ T9658] ? tomoyo_path_number_perm+0x214/0x520 [ 97.855942][ T9658] ? find_held_lock+0x35/0x130 [ 97.855954][ T9658] ? tomoyo_path_number_perm+0x214/0x520 [ 97.855967][ T9658] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 97.855980][ T9658] ? tty_jobctrl_ioctl+0x50/0xd40 [ 97.856007][ T9658] ? complete_change_console+0x3a0/0x3a0 [ 97.856019][ T9658] tty_ioctl+0xa37/0x14f0 [ 97.856035][ T9658] ? tty_vhangup+0x30/0x30 [ 97.906873][ T9658] ? tomoyo_path_number_perm+0x454/0x520 [ 97.906888][ T9658] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 97.906899][ T9658] ? tomoyo_path_number_perm+0x25e/0x520 [ 97.906912][ T9658] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 97.906929][ T9658] ? ___might_sleep+0x163/0x2c0 [ 97.906945][ T9658] ? tty_vhangup+0x30/0x30 [ 97.906958][ T9658] do_vfs_ioctl+0x977/0x14e0 [ 97.906972][ T9658] ? compat_ioctl_preallocate+0x220/0x220 [ 97.906989][ T9658] ? selinux_file_mprotect+0x620/0x620 [ 97.907002][ T9658] ? kmem_cache_free+0x26b/0x320 [ 97.907016][ T9658] ? putname+0xf4/0x130 [ 97.907028][ T9658] ? do_sys_open+0x31d/0x5d0 [ 97.907042][ T9658] ? tomoyo_file_ioctl+0x23/0x30 [ 97.907055][ T9658] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 97.907066][ T9658] ? security_file_ioctl+0x8d/0xc0 [ 97.907079][ T9658] ksys_ioctl+0xab/0xd0 [ 97.907092][ T9658] __x64_sys_ioctl+0x73/0xb0 [ 97.907107][ T9658] do_syscall_64+0xfa/0x790 [ 97.907124][ T9658] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 97.907135][ T9658] RIP: 0033:0x441319 [ 97.907150][ T9658] 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 [ 97.907156][ T9658] RSP: 002b:00007ffc1ecfdfb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 97.907168][ T9658] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319 [ 97.907175][ T9658] RDX: 0000000020000080 RSI: 000000000000541c RDI: 0000000000000004 [ 97.907187][ T9658] RBP: 0000000000017ab4 R08: 000000000000000d R09: 00000000004002c8 [ 98.060977][ T9658] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402090 [ 98.060984][ T9658] R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000 [ 98.062428][ T9658] Kernel Offset: disabled [ 98.082635][ T9658] Rebooting in 86400 seconds..