[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 66.480613][ T27] audit: type=1800 audit(1577148229.769:25): pid=9137 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 66.501330][ T27] audit: type=1800 audit(1577148229.779:26): pid=9137 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 66.568480][ T27] audit: type=1800 audit(1577148229.779:27): pid=9137 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.239' (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 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: [ 94.511322][ T9399] ================================================================== [ 94.511365][ T9399] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 94.511373][ T9399] Read of size 1 at addr ffff8880a86e5c01 by task syz-executor751/9399 [ 94.511375][ T9399] [ 94.511387][ T9399] CPU: 1 PID: 9399 Comm: syz-executor751 Not tainted 5.5.0-rc2-next-20191220-syzkaller #0 [ 94.511392][ T9399] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 94.511396][ T9399] Call Trace: [ 94.511407][ T9399] dump_stack+0x197/0x210 [ 94.511416][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.511429][ T9399] print_address_description.constprop.0.cold+0xd4/0x30b [ 94.511437][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.511445][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.511454][ T9399] __kasan_report.cold+0x1b/0x41 [ 94.511464][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.511474][ T9399] kasan_report+0x12/0x20 [ 94.511483][ T9399] __asan_report_load1_noabort+0x14/0x20 [ 94.511492][ T9399] n_tty_receive_buf_common+0x270f/0x2b70 [ 94.511500][ T9399] ? __kasan_check_read+0x11/0x20 [ 94.511519][ T9399] n_tty_receive_buf2+0x34/0x40 [ 94.511529][ T9399] tty_ldisc_receive_buf+0xad/0x1c0 [ 94.511537][ T9399] ? add_wait_queue+0x112/0x170 [ 94.511544][ T9399] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 94.511556][ T9399] paste_selection+0x1ff/0x460 [ 94.511574][ T9399] ? vcs_remove_sysfs+0x60/0x60 [ 94.511583][ T9399] ? lock_downgrade+0x920/0x920 [ 94.511594][ T9399] ? wake_up_q+0x140/0x140 [ 94.511609][ T9399] tioclinux+0x133/0x480 [ 94.511618][ T9399] vt_ioctl+0x1a41/0x26d0 [ 94.511628][ T9399] ? complete_change_console+0x3a0/0x3a0 [ 94.511642][ T9399] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 94.511656][ T9399] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 94.511666][ T9399] ? tty_jobctrl_ioctl+0x50/0xd40 [ 94.511678][ T9399] ? complete_change_console+0x3a0/0x3a0 [ 94.511687][ T9399] tty_ioctl+0xa37/0x14f0 [ 94.511696][ T9399] ? tty_vhangup+0x30/0x30 [ 94.511704][ T9399] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 94.511713][ T9399] ? do_vfs_ioctl+0x11b/0x1340 [ 94.511724][ T9399] ? ioctl_file_clone+0x180/0x180 [ 94.511732][ T9399] ? file_open_root+0x5f0/0x5f0 [ 94.511741][ T9399] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 94.511754][ T9399] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 94.511768][ T9399] ? tomoyo_file_ioctl+0x23/0x30 [ 94.511777][ T9399] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 94.511790][ T9399] ? security_file_ioctl+0x8d/0xc0 [ 94.511801][ T9399] ? tty_vhangup+0x30/0x30 [ 94.511824][ T9399] ksys_ioctl+0x123/0x180 [ 94.511844][ T9399] __x64_sys_ioctl+0x73/0xb0 [ 94.511864][ T9399] do_syscall_64+0xfa/0x790 [ 94.511883][ T9399] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 94.511895][ T9399] RIP: 0033:0x441329 [ 94.511910][ T9399] 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 [ 94.511918][ T9399] RSP: 002b:00007ffced83b198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 94.511933][ T9399] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441329 [ 94.511942][ T9399] RDX: 0000000020000040 RSI: 000000000000541c RDI: 0000000000000004 [ 94.511952][ T9399] RBP: 00000000000170dc R08: 000000000000000d R09: 00000000004002c8 [ 94.511960][ T9399] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004020a0 [ 94.511970][ T9399] R13: 0000000000402130 R14: 0000000000000000 R15: 0000000000000000 [ 94.511990][ T9399] [ 94.511997][ T9399] Allocated by task 9396: [ 94.512010][ T9399] save_stack+0x23/0x90 [ 94.512024][ T9399] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 94.512037][ T9399] kasan_kmalloc+0x9/0x10 [ 94.512049][ T9399] __kmalloc+0x163/0x770 [ 94.512062][ T9399] set_selection_kernel+0x872/0x13b0 [ 94.512071][ T9399] set_selection_user+0x95/0xd9 [ 94.512078][ T9399] tioclinux+0x11c/0x480 [ 94.512085][ T9399] vt_ioctl+0x1a41/0x26d0 [ 94.512091][ T9399] tty_ioctl+0xa37/0x14f0 [ 94.512098][ T9399] ksys_ioctl+0x123/0x180 [ 94.512105][ T9399] __x64_sys_ioctl+0x73/0xb0 [ 94.512112][ T9399] do_syscall_64+0xfa/0x790 [ 94.512119][ T9399] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 94.512122][ T9399] [ 94.512125][ T9399] Freed by task 9400: [ 94.512132][ T9399] save_stack+0x23/0x90 [ 94.512139][ T9399] __kasan_slab_free+0x102/0x150 [ 94.512145][ T9399] kasan_slab_free+0xe/0x10 [ 94.512152][ T9399] kfree+0x10a/0x2c0 [ 94.512159][ T9399] set_selection_kernel+0x88f/0x13b0 [ 94.512167][ T9399] set_selection_user+0x95/0xd9 [ 94.512173][ T9399] tioclinux+0x11c/0x480 [ 94.512180][ T9399] vt_ioctl+0x1a41/0x26d0 [ 94.512186][ T9399] tty_ioctl+0xa37/0x14f0 [ 94.512192][ T9399] ksys_ioctl+0x123/0x180 [ 94.512199][ T9399] __x64_sys_ioctl+0x73/0xb0 [ 94.512207][ T9399] do_syscall_64+0xfa/0x790 [ 94.512214][ T9399] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 94.512216][ T9399] [ 94.512222][ T9399] The buggy address belongs to the object at ffff8880a86e5c00 [ 94.512222][ T9399] which belongs to the cache kmalloc-512 of size 512 [ 94.512229][ T9399] The buggy address is located 1 bytes inside of [ 94.512229][ T9399] 512-byte region [ffff8880a86e5c00, ffff8880a86e5e00) [ 94.512232][ T9399] The buggy address belongs to the page: [ 94.512240][ T9399] page:ffffea0002a1b940 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 [ 94.512251][ T9399] raw: 00fffe0000000200 ffffea00025b4448 ffffea00028e49c8 ffff8880aa400a80 [ 94.512260][ T9399] raw: 0000000000000000 ffff8880a86e5000 0000000100000004 0000000000000000 [ 94.512264][ T9399] page dumped because: kasan: bad access detected [ 94.512266][ T9399] [ 94.512269][ T9399] Memory state around the buggy address: [ 94.512276][ T9399] ffff8880a86e5b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.512282][ T9399] ffff8880a86e5b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.512288][ T9399] >ffff8880a86e5c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 94.512291][ T9399] ^ [ 94.512297][ T9399] ffff8880a86e5c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 94.512303][ T9399] ffff8880a86e5d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 94.512306][ T9399] ================================================================== [ 94.512309][ T9399] Disabling lock debugging due to kernel taint [ 94.512313][ T9399] Kernel panic - not syncing: panic_on_warn set ... [ 94.512322][ T9399] CPU: 1 PID: 9399 Comm: syz-executor751 Tainted: G B 5.5.0-rc2-next-20191220-syzkaller #0 [ 94.512326][ T9399] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 94.512329][ T9399] Call Trace: [ 94.512336][ T9399] dump_stack+0x197/0x210 [ 94.512347][ T9399] panic+0x2e3/0x75c [ 94.512355][ T9399] ? add_taint.cold+0x16/0x16 [ 94.512367][ T9399] ? trace_hardirqs_on+0x67/0x240 [ 94.512374][ T9399] ? trace_hardirqs_on+0x5e/0x240 [ 94.512383][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.512390][ T9399] end_report+0x47/0x4f [ 94.512398][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.512407][ T9399] __kasan_report.cold+0xe/0x41 [ 94.512416][ T9399] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 94.512423][ T9399] kasan_report+0x12/0x20 [ 94.512432][ T9399] __asan_report_load1_noabort+0x14/0x20 [ 94.512439][ T9399] n_tty_receive_buf_common+0x270f/0x2b70 [ 94.512446][ T9399] ? __kasan_check_read+0x11/0x20 [ 94.512458][ T9399] n_tty_receive_buf2+0x34/0x40 [ 94.512467][ T9399] tty_ldisc_receive_buf+0xad/0x1c0 [ 94.512478][ T9399] ? add_wait_queue+0x112/0x170 [ 94.512486][ T9399] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 94.512494][ T9399] paste_selection+0x1ff/0x460 [ 94.512503][ T9399] ? vcs_remove_sysfs+0x60/0x60 [ 94.512510][ T9399] ? lock_downgrade+0x920/0x920 [ 94.512518][ T9399] ? wake_up_q+0x140/0x140 [ 94.512528][ T9399] tioclinux+0x133/0x480 [ 94.512536][ T9399] vt_ioctl+0x1a41/0x26d0 [ 94.512544][ T9399] ? complete_change_console+0x3a0/0x3a0 [ 94.512554][ T9399] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 94.512564][ T9399] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 94.512572][ T9399] ? tty_jobctrl_ioctl+0x50/0xd40 [ 94.512580][ T9399] ? complete_change_console+0x3a0/0x3a0 [ 94.512587][ T9399] tty_ioctl+0xa37/0x14f0 [ 94.512594][ T9399] ? tty_vhangup+0x30/0x30 [ 94.512602][ T9399] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 94.512609][ T9399] ? do_vfs_ioctl+0x11b/0x1340 [ 94.512617][ T9399] ? ioctl_file_clone+0x180/0x180 [ 94.512624][ T9399] ? file_open_root+0x5f0/0x5f0 [ 94.512632][ T9399] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 94.512641][ T9399] ? rcu_lockdep_current_cpu_online+0xe3/0x130 [ 94.512651][ T9399] ? tomoyo_file_ioctl+0x23/0x30 [ 94.512659][ T9399] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 94.512667][ T9399] ? security_file_ioctl+0x8d/0xc0 [ 94.512673][ T9399] ? tty_vhangup+0x30/0x30 [ 94.512681][ T9399] ksys_ioctl+0x123/0x180 [ 94.512689][ T9399] __x64_sys_ioctl+0x73/0xb0 [ 94.512700][ T9399] do_syscall_64+0xfa/0x790 [ 94.512708][ T9399] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 94.512713][ T9399] RIP: 0033:0x441329 [ 94.512721][ T9399] 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 [ 94.512724][ T9399] RSP: 002b:00007ffced83b198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 94.512731][ T9399] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441329 [ 94.512735][ T9399] RDX: 0000000020000040 RSI: 000000000000541c RDI: 0000000000000004 [ 94.512739][ T9399] RBP: 00000000000170dc R08: 000000000000000d R09: 00000000004002c8 [ 94.512743][ T9399] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004020a0 [ 94.512752][ T9399] R13: 0000000000402130 R14: 0000000000000000 R15: 0000000000000000 [ 94.514204][ T9399] Kernel Offset: disabled