[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 72.037544][ T27] audit: type=1800 audit(1576237766.388:25): pid=8817 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 72.064078][ T27] audit: type=1800 audit(1576237766.388:26): pid=8817 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 72.108688][ T27] audit: type=1800 audit(1576237766.388:27): pid=8817 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.1.8' (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 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: [ 83.162331][ T9057] ================================================================== [ 83.162387][ T9057] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 83.162399][ T9057] Read of size 1 at addr ffff8880986fbc01 by task syz-executor135/9057 [ 83.162402][ T9057] [ 83.162417][ T9057] CPU: 0 PID: 9057 Comm: syz-executor135 Not tainted 5.5.0-rc1-syzkaller #0 [ 83.162424][ T9057] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 83.162429][ T9057] Call Trace: [ 83.162446][ T9057] dump_stack+0x197/0x210 [ 83.162460][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.162478][ T9057] print_address_description.constprop.0.cold+0xd4/0x30b [ 83.162491][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.162505][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.162518][ T9057] __kasan_report.cold+0x1b/0x41 [ 83.162534][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.162549][ T9057] kasan_report+0x12/0x20 [ 83.162563][ T9057] __asan_report_load1_noabort+0x14/0x20 [ 83.162577][ T9057] n_tty_receive_buf_common+0x270f/0x2b70 [ 83.162589][ T9057] ? __kasan_check_read+0x11/0x20 [ 83.162616][ T9057] n_tty_receive_buf2+0x34/0x40 [ 83.162634][ T9057] tty_ldisc_receive_buf+0xad/0x1c0 [ 83.162645][ T9057] ? add_wait_queue+0x112/0x170 [ 83.162658][ T9057] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 83.162673][ T9057] paste_selection+0x1ff/0x460 [ 83.162694][ T9057] ? vcs_remove_sysfs+0x60/0x60 [ 83.162708][ T9057] ? lock_downgrade+0x920/0x920 [ 83.162724][ T9057] ? wake_up_q+0x140/0x140 [ 83.162755][ T9057] tioclinux+0x133/0x480 [ 83.162773][ T9057] vt_ioctl+0x1a41/0x26d0 [ 83.162789][ T9057] ? complete_change_console+0x3a0/0x3a0 [ 83.162801][ T9057] ? lock_downgrade+0x920/0x920 [ 83.162815][ T9057] ? rwlock_bug.part.0+0x90/0x90 [ 83.162831][ T9057] ? tomoyo_path_number_perm+0x214/0x520 [ 83.162844][ T9057] ? find_held_lock+0x35/0x130 [ 83.162857][ T9057] ? tomoyo_path_number_perm+0x214/0x520 [ 83.162872][ T9057] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 83.162886][ T9057] ? tty_jobctrl_ioctl+0x50/0xd40 [ 83.162899][ T9057] ? complete_change_console+0x3a0/0x3a0 [ 83.162914][ T9057] tty_ioctl+0xa37/0x14f0 [ 83.162929][ T9057] ? tty_vhangup+0x30/0x30 [ 83.162941][ T9057] ? tomoyo_path_number_perm+0x454/0x520 [ 83.162958][ T9057] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 83.162974][ T9057] ? tomoyo_path_number_perm+0x25e/0x520 [ 83.393919][ T9057] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 83.399714][ T9057] ? __do_page_fault+0x56a/0xd80 [ 83.404661][ T9057] ? tty_vhangup+0x30/0x30 [ 83.409061][ T9057] do_vfs_ioctl+0x977/0x14e0 [ 83.413636][ T9057] ? compat_ioctl_preallocate+0x220/0x220 [ 83.419344][ T9057] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 83.425568][ T9057] ? debug_smp_processor_id+0x33/0x18a [ 83.431013][ T9057] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 83.437150][ T9057] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 83.442680][ T9057] ? tomoyo_file_ioctl+0x23/0x30 [ 83.447599][ T9057] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 83.453935][ T9057] ? security_file_ioctl+0x8d/0xc0 [ 83.459034][ T9057] ksys_ioctl+0xab/0xd0 [ 83.463176][ T9057] __x64_sys_ioctl+0x73/0xb0 [ 83.467758][ T9057] do_syscall_64+0xfa/0x790 [ 83.472250][ T9057] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.478146][ T9057] RIP: 0033:0x441319 [ 83.482030][ T9057] 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 [ 83.501626][ T9057] RSP: 002b:00007ffd5f341248 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 83.510022][ T9057] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319 [ 83.517983][ T9057] RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000003 [ 83.526117][ T9057] RBP: 000000000001447b R08: 000000000000000d R09: 00000000004002c8 [ 83.534072][ T9057] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402090 [ 83.542038][ T9057] R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000 [ 83.550012][ T9057] [ 83.552321][ T9057] Allocated by task 9054: [ 83.556637][ T9057] save_stack+0x23/0x90 [ 83.560774][ T9057] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 83.566383][ T9057] kasan_kmalloc+0x9/0x10 [ 83.570692][ T9057] __kmalloc+0x163/0x770 [ 83.574914][ T9057] set_selection_kernel+0x872/0x13b0 [ 83.580177][ T9057] set_selection_user+0x95/0xd9 [ 83.585010][ T9057] tioclinux+0x11c/0x480 [ 83.589242][ T9057] vt_ioctl+0x1a41/0x26d0 [ 83.593555][ T9057] tty_ioctl+0xa37/0x14f0 [ 83.597867][ T9057] do_vfs_ioctl+0x977/0x14e0 [ 83.602464][ T9057] ksys_ioctl+0xab/0xd0 [ 83.606598][ T9057] __x64_sys_ioctl+0x73/0xb0 [ 83.611169][ T9057] do_syscall_64+0xfa/0x790 [ 83.615653][ T9057] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.621518][ T9057] [ 83.623828][ T9057] Freed by task 9056: [ 83.627790][ T9057] save_stack+0x23/0x90 [ 83.631925][ T9057] __kasan_slab_free+0x102/0x150 [ 83.636848][ T9057] kasan_slab_free+0xe/0x10 [ 83.641346][ T9057] kfree+0x10a/0x2c0 [ 83.645239][ T9057] set_selection_kernel+0x88f/0x13b0 [ 83.650511][ T9057] set_selection_user+0x95/0xd9 [ 83.655354][ T9057] tioclinux+0x11c/0x480 [ 83.661420][ T9057] vt_ioctl+0x1a41/0x26d0 [ 83.665734][ T9057] tty_ioctl+0xa37/0x14f0 [ 83.670060][ T9057] do_vfs_ioctl+0x977/0x14e0 [ 83.674630][ T9057] ksys_ioctl+0xab/0xd0 [ 83.678766][ T9057] __x64_sys_ioctl+0x73/0xb0 [ 83.683350][ T9057] do_syscall_64+0xfa/0x790 [ 83.687835][ T9057] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.693703][ T9057] [ 83.696023][ T9057] The buggy address belongs to the object at ffff8880986fbc00 [ 83.696023][ T9057] which belongs to the cache kmalloc-512 of size 512 [ 83.710056][ T9057] The buggy address is located 1 bytes inside of [ 83.710056][ T9057] 512-byte region [ffff8880986fbc00, ffff8880986fbe00) [ 83.723126][ T9057] The buggy address belongs to the page: [ 83.728741][ T9057] page:ffffea000261bec0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 [ 83.737831][ T9057] raw: 00fffe0000000200 ffffea00029c8288 ffffea00028f7748 ffff8880aa400a80 [ 83.746399][ T9057] raw: 0000000000000000 ffff8880986fb000 0000000100000004 0000000000000000 [ 83.754970][ T9057] page dumped because: kasan: bad access detected [ 83.761361][ T9057] [ 83.763671][ T9057] Memory state around the buggy address: [ 83.769291][ T9057] ffff8880986fbb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 83.777344][ T9057] ffff8880986fbb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 83.785384][ T9057] >ffff8880986fbc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 83.793421][ T9057] ^ [ 83.797467][ T9057] ffff8880986fbc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 83.805519][ T9057] ffff8880986fbd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program [ 83.813565][ T9057] ================================================================== [ 83.821620][ T9057] Disabling lock debugging due to kernel taint [ 83.834034][ T9057] Kernel panic - not syncing: panic_on_warn set ... [ 83.834052][ T9057] CPU: 0 PID: 9057 Comm: syz-executor135 Tainted: G B 5.5.0-rc1-syzkaller #0 [ 83.834060][ T9057] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 83.834064][ T9057] Call Trace: [ 83.834083][ T9057] dump_stack+0x197/0x210 [ 83.834098][ T9057] panic+0x2e3/0x75c [ 83.834108][ T9057] ? add_taint.cold+0x16/0x16 [ 83.834120][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.834131][ T9057] ? preempt_schedule+0x4b/0x60 [ 83.834144][ T9057] ? ___preempt_schedule+0x16/0x18 [ 83.834156][ T9057] ? trace_hardirqs_on+0x5e/0x240 [ 83.834167][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.834178][ T9057] end_report+0x47/0x4f [ 83.834194][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.834208][ T9057] __kasan_report.cold+0xe/0x41 [ 83.834220][ T9057] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 83.834229][ T9057] kasan_report+0x12/0x20 [ 83.834239][ T9057] __asan_report_load1_noabort+0x14/0x20 [ 83.834255][ T9057] n_tty_receive_buf_common+0x270f/0x2b70 [ 83.834265][ T9057] ? __kasan_check_read+0x11/0x20 [ 83.834282][ T9057] n_tty_receive_buf2+0x34/0x40 [ 83.834294][ T9057] tty_ldisc_receive_buf+0xad/0x1c0 [ 83.834303][ T9057] ? add_wait_queue+0x112/0x170 [ 83.834313][ T9057] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 83.834323][ T9057] paste_selection+0x1ff/0x460 [ 83.834334][ T9057] ? vcs_remove_sysfs+0x60/0x60 [ 83.834344][ T9057] ? lock_downgrade+0x920/0x920 [ 83.834356][ T9057] ? wake_up_q+0x140/0x140 [ 83.834373][ T9057] tioclinux+0x133/0x480 [ 83.834387][ T9057] vt_ioctl+0x1a41/0x26d0 [ 83.834402][ T9057] ? complete_change_console+0x3a0/0x3a0 [ 83.834412][ T9057] ? lock_downgrade+0x920/0x920 [ 83.834426][ T9057] ? rwlock_bug.part.0+0x90/0x90 [ 83.834440][ T9057] ? tomoyo_path_number_perm+0x214/0x520 [ 83.834452][ T9057] ? find_held_lock+0x35/0x130 [ 83.834465][ T9057] ? tomoyo_path_number_perm+0x214/0x520 [ 83.834479][ T9057] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 83.834496][ T9057] ? tty_jobctrl_ioctl+0x50/0xd40 [ 84.035911][ T9057] ? complete_change_console+0x3a0/0x3a0 [ 84.035924][ T9057] tty_ioctl+0xa37/0x14f0 [ 84.035937][ T9057] ? tty_vhangup+0x30/0x30 [ 84.035956][ T9057] ? tomoyo_path_number_perm+0x454/0x520 [ 84.035973][ T9057] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 84.035985][ T9057] ? tomoyo_path_number_perm+0x25e/0x520 [ 84.035998][ T9057] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 84.036017][ T9057] ? __do_page_fault+0x56a/0xd80 [ 84.036029][ T9057] ? tty_vhangup+0x30/0x30 [ 84.036047][ T9057] do_vfs_ioctl+0x977/0x14e0 [ 84.087416][ T9057] ? compat_ioctl_preallocate+0x220/0x220 [ 84.087432][ T9057] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 84.087445][ T9057] ? debug_smp_processor_id+0x33/0x18a [ 84.087459][ T9057] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 84.087474][ T9057] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 84.087489][ T9057] ? tomoyo_file_ioctl+0x23/0x30 [ 84.087502][ T9057] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 84.087514][ T9057] ? security_file_ioctl+0x8d/0xc0 [ 84.087525][ T9057] ksys_ioctl+0xab/0xd0 [ 84.087542][ T9057] __x64_sys_ioctl+0x73/0xb0 [ 84.141619][ T9057] do_syscall_64+0xfa/0x790 [ 84.141635][ T9057] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 84.141644][ T9057] RIP: 0033:0x441319 [ 84.141657][ T9057] 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 [ 84.141663][ T9057] RSP: 002b:00007ffd5f341248 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 84.141675][ T9057] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441319 [ 84.141682][ T9057] RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000003 [ 84.141688][ T9057] RBP: 000000000001447b R08: 000000000000000d R09: 00000000004002c8 [ 84.141695][ T9057] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402090 [ 84.141702][ T9057] R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000 [ 84.143203][ T9057] Kernel Offset: disabled [ 84.229498][ T9057] Rebooting in 86400 seconds..