Warning: Permanently added '10.128.10.25' (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 syzkaller login: [ 77.581953][ T9472] ================================================================== [ 77.581995][ T9472] BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x270f/0x2b70 [ 77.582003][ T9472] Read of size 1 at addr ffff88809feac402 by task syz-executor384/9472 [ 77.582006][ T9472] [ 77.582016][ T9472] CPU: 1 PID: 9472 Comm: syz-executor384 Not tainted 5.5.0-rc2-next-20191220-syzkaller #0 [ 77.582022][ T9472] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 77.582025][ T9472] Call Trace: [ 77.582036][ T9472] dump_stack+0x197/0x210 [ 77.582045][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.582062][ T9472] print_address_description.constprop.0.cold+0xd4/0x30b [ 77.582070][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.582078][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.582087][ T9472] __kasan_report.cold+0x1b/0x41 [ 77.582097][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.582107][ T9472] kasan_report+0x12/0x20 [ 77.582116][ T9472] __asan_report_load1_noabort+0x14/0x20 [ 77.582125][ T9472] n_tty_receive_buf_common+0x270f/0x2b70 [ 77.582133][ T9472] ? __kasan_check_read+0x11/0x20 [ 77.582152][ T9472] n_tty_receive_buf2+0x34/0x40 [ 77.582162][ T9472] tty_ldisc_receive_buf+0xad/0x1c0 [ 77.582170][ T9472] ? add_wait_queue+0x112/0x170 [ 77.582178][ T9472] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 77.582189][ T9472] paste_selection+0x1ff/0x460 [ 77.582201][ T9472] ? vcs_remove_sysfs+0x60/0x60 [ 77.582210][ T9472] ? lock_downgrade+0x920/0x920 [ 77.582221][ T9472] ? wake_up_q+0x140/0x140 [ 77.582236][ T9472] tioclinux+0x133/0x480 [ 77.582245][ T9472] vt_ioctl+0x1a41/0x26d0 [ 77.582255][ T9472] ? complete_change_console+0x3a0/0x3a0 [ 77.582268][ T9472] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 77.582283][ T9472] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 77.582293][ T9472] ? tty_jobctrl_ioctl+0x50/0xd40 [ 77.582301][ T9472] ? complete_change_console+0x3a0/0x3a0 [ 77.582310][ T9472] tty_ioctl+0xa37/0x14f0 [ 77.582319][ T9472] ? tty_vhangup+0x30/0x30 [ 77.582328][ T9472] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 77.582337][ T9472] ? do_vfs_ioctl+0x11b/0x1340 [ 77.582348][ T9472] ? ioctl_file_clone+0x180/0x180 [ 77.582356][ T9472] ? __fget+0x37f/0x550 [ 77.582367][ T9472] ? do_dup2+0x4f0/0x4f0 [ 77.582377][ T9472] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 77.582388][ T9472] ? tomoyo_file_ioctl+0x23/0x30 [ 77.582397][ T9472] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.582406][ T9472] ? security_file_ioctl+0x8d/0xc0 [ 77.582413][ T9472] ? tty_vhangup+0x30/0x30 [ 77.582422][ T9472] ksys_ioctl+0x123/0x180 [ 77.582433][ T9472] __x64_sys_ioctl+0x73/0xb0 [ 77.582444][ T9472] do_syscall_64+0xfa/0x790 [ 77.582454][ T9472] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.582461][ T9472] RIP: 0033:0x446859 [ 77.582470][ T9472] Code: e8 0c 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 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 77.582475][ T9472] RSP: 002b:00007f5771329db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 77.582483][ T9472] RAX: ffffffffffffffda RBX: 00000000006dbc38 RCX: 0000000000446859 [ 77.582488][ T9472] RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000004 [ 77.582492][ T9472] RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 [ 77.582497][ T9472] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c [ 77.582502][ T9472] R13: 00007ffc95f1b55f R14: 00007f577132a9c0 R15: 0000000000000001 [ 77.582513][ T9472] [ 77.582517][ T9472] Allocated by task 9474: [ 77.582525][ T9472] save_stack+0x23/0x90 [ 77.582533][ T9472] __kasan_kmalloc.constprop.0+0xcf/0xe0 [ 77.582544][ T9472] kasan_kmalloc+0x9/0x10 [ 77.582551][ T9472] __kmalloc+0x163/0x770 [ 77.582562][ T9472] set_selection_kernel+0x872/0x13b0 [ 77.582570][ T9472] set_selection_user+0x95/0xd9 [ 77.582576][ T9472] tioclinux+0x11c/0x480 [ 77.582583][ T9472] vt_ioctl+0x1a41/0x26d0 [ 77.582589][ T9472] tty_ioctl+0xa37/0x14f0 [ 77.582596][ T9472] ksys_ioctl+0x123/0x180 [ 77.582603][ T9472] __x64_sys_ioctl+0x73/0xb0 [ 77.582611][ T9472] do_syscall_64+0xfa/0x790 [ 77.582618][ T9472] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.582620][ T9472] [ 77.582623][ T9472] Freed by task 9478: [ 77.582630][ T9472] save_stack+0x23/0x90 [ 77.582637][ T9472] __kasan_slab_free+0x102/0x150 [ 77.582645][ T9472] kasan_slab_free+0xe/0x10 [ 77.582654][ T9472] kfree+0x10a/0x2c0 [ 77.582667][ T9472] set_selection_kernel+0x88f/0x13b0 [ 77.582681][ T9472] set_selection_user+0x95/0xd9 [ 77.582693][ T9472] tioclinux+0x11c/0x480 [ 77.582706][ T9472] vt_ioctl+0x1a41/0x26d0 [ 77.582716][ T9472] tty_ioctl+0xa37/0x14f0 [ 77.582728][ T9472] ksys_ioctl+0x123/0x180 [ 77.582741][ T9472] __x64_sys_ioctl+0x73/0xb0 [ 77.582755][ T9472] do_syscall_64+0xfa/0x790 [ 77.582768][ T9472] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.582772][ T9472] [ 77.582784][ T9472] The buggy address belongs to the object at ffff88809feac400 [ 77.582784][ T9472] which belongs to the cache kmalloc-512 of size 512 [ 77.582797][ T9472] The buggy address is located 2 bytes inside of [ 77.582797][ T9472] 512-byte region [ffff88809feac400, ffff88809feac600) [ 77.582801][ T9472] The buggy address belongs to the page: [ 77.582811][ T9472] page:ffffea00027fab00 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 [ 77.582823][ T9472] raw: 00fffe0000000200 ffffea0002a6a008 ffffea00029a1608 ffff8880aa400a80 [ 77.582833][ T9472] raw: 0000000000000000 ffff88809feac000 0000000100000004 0000000000000000 [ 77.582836][ T9472] page dumped because: kasan: bad access detected [ 77.582839][ T9472] [ 77.582841][ T9472] Memory state around the buggy address: [ 77.582848][ T9472] ffff88809feac300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 77.582854][ T9472] ffff88809feac380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 77.582860][ T9472] >ffff88809feac400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 77.582863][ T9472] ^ [ 77.582869][ T9472] ffff88809feac480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 77.582876][ T9472] ffff88809feac500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 77.582879][ T9472] ================================================================== [ 77.582882][ T9472] Disabling lock debugging due to kernel taint [ 77.582918][ T9472] Kernel panic - not syncing: panic_on_warn set ... [ 77.582933][ T9472] CPU: 1 PID: 9472 Comm: syz-executor384 Tainted: G B 5.5.0-rc2-next-20191220-syzkaller #0 [ 77.582940][ T9472] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 77.582944][ T9472] Call Trace: [ 77.582954][ T9472] dump_stack+0x197/0x210 [ 77.582965][ T9472] panic+0x2e3/0x75c [ 77.582973][ T9472] ? add_taint.cold+0x16/0x16 [ 77.582979][ T9472] ? retint_kernel+0x2b/0x2b [ 77.582991][ T9472] ? trace_hardirqs_on+0x5e/0x240 [ 77.582999][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.583007][ T9472] end_report+0x47/0x4f [ 77.583014][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.583021][ T9472] __kasan_report.cold+0xe/0x41 [ 77.583030][ T9472] ? n_tty_receive_buf_common+0x270f/0x2b70 [ 77.583037][ T9472] kasan_report+0x12/0x20 [ 77.583046][ T9472] __asan_report_load1_noabort+0x14/0x20 [ 77.583054][ T9472] n_tty_receive_buf_common+0x270f/0x2b70 [ 77.583063][ T9472] ? __kasan_check_read+0x11/0x20 [ 77.583075][ T9472] n_tty_receive_buf2+0x34/0x40 [ 77.583083][ T9472] tty_ldisc_receive_buf+0xad/0x1c0 [ 77.583090][ T9472] ? add_wait_queue+0x112/0x170 [ 77.583097][ T9472] ? n_tty_receive_buf_common+0x2b70/0x2b70 [ 77.583106][ T9472] paste_selection+0x1ff/0x460 [ 77.583115][ T9472] ? vcs_remove_sysfs+0x60/0x60 [ 77.583122][ T9472] ? lock_downgrade+0x920/0x920 [ 77.583130][ T9472] ? wake_up_q+0x140/0x140 [ 77.583140][ T9472] tioclinux+0x133/0x480 [ 77.583148][ T9472] vt_ioctl+0x1a41/0x26d0 [ 77.583157][ T9472] ? complete_change_console+0x3a0/0x3a0 [ 77.583166][ T9472] ? tomoyo_execute_permission+0x4a0/0x4a0 [ 77.583177][ T9472] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 77.583186][ T9472] ? tty_jobctrl_ioctl+0x50/0xd40 [ 77.583193][ T9472] ? complete_change_console+0x3a0/0x3a0 [ 77.583200][ T9472] tty_ioctl+0xa37/0x14f0 [ 77.583207][ T9472] ? tty_vhangup+0x30/0x30 [ 77.583215][ T9472] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 77.583222][ T9472] ? do_vfs_ioctl+0x11b/0x1340 [ 77.583231][ T9472] ? ioctl_file_clone+0x180/0x180 [ 77.583238][ T9472] ? __fget+0x37f/0x550 [ 77.583247][ T9472] ? do_dup2+0x4f0/0x4f0 [ 77.583254][ T9472] ? rcu_read_lock_sched_held+0x9c/0xd0 [ 77.583263][ T9472] ? tomoyo_file_ioctl+0x23/0x30 [ 77.583271][ T9472] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 77.583279][ T9472] ? security_file_ioctl+0x8d/0xc0 [ 77.583285][ T9472] ? tty_vhangup+0x30/0x30 [ 77.583293][ T9472] ksys_ioctl+0x123/0x180 [ 77.583301][ T9472] __x64_sys_ioctl+0x73/0xb0 [ 77.583309][ T9472] do_syscall_64+0xfa/0x790 [ 77.583317][ T9472] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.583323][ T9472] RIP: 0033:0x446859 [ 77.583330][ T9472] Code: e8 0c 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 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 77.583334][ T9472] RSP: 002b:00007f5771329db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 77.583341][ T9472] RAX: ffffffffffffffda RBX: 00000000006dbc38 RCX: 0000000000446859 [ 77.583345][ T9472] RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000004 [ 77.583349][ T9472] RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000 [ 77.583353][ T9472] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c [ 77.583357][ T9472] R13: 00007ffc95f1b55f R14: 00007f577132a9c0 R15: 0000000000000001 [ 77.584830][ T9472] Kernel Offset: disabled