[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 19.764354] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 22.412833] random: sshd: uninitialized urandom read (32 bytes read) [ 22.864075] random: sshd: uninitialized urandom read (32 bytes read) [ 23.617989] random: sshd: uninitialized urandom read (32 bytes read) [ 23.777355] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.10.26' (ECDSA) to the list of known hosts. [ 29.238489] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 29.364980] ================================================================== [ 29.372457] BUG: KASAN: use-after-free in tls_sk_proto_close+0x8ab/0x9c0 [ 29.379294] Read of size 1 at addr ffff8801acfc2e98 by task syz-executor450/4494 [ 29.386836] [ 29.388454] CPU: 0 PID: 4494 Comm: syz-executor450 Not tainted 4.17.0-rc3+ #34 [ 29.395789] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.405128] Call Trace: [ 29.407703] dump_stack+0x1b9/0x294 [ 29.411312] ? dump_stack_print_info.cold.2+0x52/0x52 [ 29.416484] ? printk+0x9e/0xba [ 29.419745] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 29.424487] ? kasan_check_write+0x14/0x20 [ 29.428713] print_address_description+0x6c/0x20b [ 29.433551] ? tls_sk_proto_close+0x8ab/0x9c0 [ 29.438035] kasan_report.cold.7+0x242/0x2fe [ 29.442433] __asan_report_load1_noabort+0x14/0x20 [ 29.447343] tls_sk_proto_close+0x8ab/0x9c0 [ 29.451646] ? unwind_get_return_address+0x61/0xa0 [ 29.456557] ? tcp_check_oom+0x520/0x520 [ 29.460604] ? tls_write_space+0x340/0x340 [ 29.464822] ? graph_lock+0x170/0x170 [ 29.468613] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 29.474132] ? ipv6_sock_ac_close+0x34e/0x480 [ 29.478612] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 29.484139] ? ipv6_sock_mc_close+0x161/0x1c0 [ 29.488620] ? ip_mc_drop_socket+0x20f/0x270 [ 29.493025] inet_release+0x104/0x1f0 [ 29.496816] inet6_release+0x50/0x70 [ 29.500521] sock_release+0x96/0x1b0 [ 29.504221] ? sock_alloc_file+0x4e0/0x4e0 [ 29.508438] sock_close+0x16/0x20 [ 29.511873] __fput+0x34d/0x890 [ 29.515136] ? fput+0x1a0/0x1a0 [ 29.518409] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.522890] ____fput+0x15/0x20 [ 29.526165] task_work_run+0x1e4/0x290 [ 29.530041] ? task_work_cancel+0x240/0x240 [ 29.534348] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 29.539870] ? switch_task_namespaces+0xa2/0xd0 [ 29.544530] do_exit+0x1aee/0x2730 [ 29.548054] ? trace_hardirqs_off+0xd/0x10 [ 29.552283] ? mm_update_next_owner+0x980/0x980 [ 29.556942] ? mark_held_locks+0xc9/0x160 [ 29.561076] ? quarantine_put+0xeb/0x190 [ 29.565125] ? kfree+0x111/0x260 [ 29.568476] ? kzfree+0x28/0x30 [ 29.571738] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.576734] ? trace_hardirqs_on+0xd/0x10 [ 29.580863] ? kzfree+0x28/0x30 [ 29.584124] ? crypto_destroy_tfm+0x15d/0x300 [ 29.588604] ? graph_lock+0x170/0x170 [ 29.592384] ? graph_lock+0x170/0x170 [ 29.596180] ? find_held_lock+0x36/0x1c0 [ 29.600226] ? lock_downgrade+0x8e0/0x8e0 [ 29.604355] ? lock_downgrade+0x8e0/0x8e0 [ 29.608487] ? kasan_check_read+0x11/0x20 [ 29.612614] ? do_raw_spin_unlock+0x9e/0x2e0 [ 29.617010] ? __local_bh_enable_ip+0x161/0x230 [ 29.621672] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.626676] ? release_sock+0x1e2/0x2b0 [ 29.630635] ? trace_hardirqs_on+0xd/0x10 [ 29.634764] ? __local_bh_enable_ip+0x161/0x230 [ 29.639427] ? _raw_spin_unlock_bh+0x30/0x40 [ 29.643815] ? release_sock+0x1e2/0x2b0 [ 29.647776] ? __release_sock+0x3a0/0x3a0 [ 29.651911] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 29.657436] ? _copy_from_user+0xdf/0x150 [ 29.661564] ? sk_stream_wait_memory+0x1260/0x1260 [ 29.666486] ? tls_setsockopt+0xb2/0x780 [ 29.670543] ? sock_common_setsockopt+0x9a/0xe0 [ 29.675194] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 29.680709] ? __sys_setsockopt+0x24f/0x390 [ 29.685023] do_group_exit+0x16f/0x430 [ 29.689137] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 29.694669] ? __ia32_sys_exit+0x50/0x50 [ 29.698723] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 29.703553] ? do_syscall_64+0x92/0x800 [ 29.707521] __x64_sys_exit_group+0x3e/0x50 [ 29.711825] do_syscall_64+0x1b1/0x800 [ 29.715699] ? syscall_return_slowpath+0x5c0/0x5c0 [ 29.720609] ? syscall_return_slowpath+0x30f/0x5c0 [ 29.725523] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 29.730874] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.735708] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.740890] RIP: 0033:0x43eb58 [ 29.744061] RSP: 002b:00007ffcd00cdb78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 29.751753] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043eb58 [ 29.759008] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 29.766266] RBP: 00000000004be500 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 29.773519] R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000001 [ 29.780774] R13: 00000000006cc160 R14: 0000000000000000 R15: 0000000000000000 [ 29.788044] [ 29.789654] Allocated by task 4494: [ 29.793268] save_stack+0x43/0xd0 [ 29.796724] kasan_kmalloc+0xc4/0xe0 [ 29.800417] kmem_cache_alloc_trace+0x152/0x780 [ 29.805076] tls_init+0x1f9/0xb00 [ 29.808515] tcp_set_ulp+0x1bc/0x520 [ 29.812211] do_tcp_setsockopt.isra.39+0x44a/0x2600 [ 29.817203] tcp_setsockopt+0xc1/0xe0 [ 29.820999] sock_common_setsockopt+0x9a/0xe0 [ 29.825480] __sys_setsockopt+0x1bd/0x390 [ 29.829606] __x64_sys_setsockopt+0xbe/0x150 [ 29.833992] do_syscall_64+0x1b1/0x800 [ 29.837868] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.843032] [ 29.844648] Freed by task 4494: [ 29.847909] save_stack+0x43/0xd0 [ 29.851338] __kasan_slab_free+0x11a/0x170 [ 29.855559] kasan_slab_free+0xe/0x10 [ 29.859336] kfree+0xd9/0x260 [ 29.862427] tls_sw_free_resources+0x2a3/0x360 [ 29.866990] tls_sk_proto_close+0x67c/0x9c0 [ 29.871300] inet_release+0x104/0x1f0 [ 29.875102] inet6_release+0x50/0x70 [ 29.878799] sock_release+0x96/0x1b0 [ 29.882491] sock_close+0x16/0x20 [ 29.885925] __fput+0x34d/0x890 [ 29.889183] ____fput+0x15/0x20 [ 29.892442] task_work_run+0x1e4/0x290 [ 29.896307] do_exit+0x1aee/0x2730 [ 29.899825] do_group_exit+0x16f/0x430 [ 29.903698] __x64_sys_exit_group+0x3e/0x50 [ 29.908005] do_syscall_64+0x1b1/0x800 [ 29.911890] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.917059] [ 29.918673] The buggy address belongs to the object at ffff8801acfc2e40 [ 29.918673] which belongs to the cache kmalloc-256 of size 256 [ 29.931309] The buggy address is located 88 bytes inside of [ 29.931309] 256-byte region [ffff8801acfc2e40, ffff8801acfc2f40) [ 29.943076] The buggy address belongs to the page: [ 29.947985] page:ffffea0006b3f080 count:1 mapcount:0 mapping:ffff8801acfc2080 index:0x0 [ 29.956114] flags: 0x2fffc0000000100(slab) [ 29.960332] raw: 02fffc0000000100 ffff8801acfc2080 0000000000000000 000000010000000c [ 29.968193] raw: ffffea0006f8c120 ffff8801da801648 ffff8801da8007c0 0000000000000000 [ 29.976049] page dumped because: kasan: bad access detected [ 29.981735] [ 29.983339] Memory state around the buggy address: [ 29.988247] ffff8801acfc2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.995586] ffff8801acfc2e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 30.002928] >ffff8801acfc2e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.010271] ^ [ 30.014402] ffff8801acfc2f00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 30.021749] ffff8801acfc2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.029096] ================================================================== [ 30.036441] Disabling lock debugging due to kernel taint [ 30.041982] Kernel panic - not syncing: panic_on_warn set ... [ 30.041982] [ 30.049354] CPU: 0 PID: 4494 Comm: syz-executor450 Tainted: G B 4.17.0-rc3+ #34 [ 30.058091] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.067431] Call Trace: [ 30.070002] dump_stack+0x1b9/0x294 [ 30.073617] ? dump_stack_print_info.cold.2+0x52/0x52 [ 30.078785] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.083522] ? tls_sk_proto_close+0x7f0/0x9c0 [ 30.087993] panic+0x22f/0x4de [ 30.091166] ? add_taint.cold.5+0x16/0x16 [ 30.095296] ? do_raw_spin_unlock+0x9e/0x2e0 [ 30.099682] ? do_raw_spin_unlock+0x9e/0x2e0 [ 30.104074] ? tls_sk_proto_close+0x8ab/0x9c0 [ 30.108549] kasan_end_report+0x47/0x4f [ 30.113115] kasan_report.cold.7+0x76/0x2fe [ 30.117419] __asan_report_load1_noabort+0x14/0x20 [ 30.122501] tls_sk_proto_close+0x8ab/0x9c0 [ 30.126808] ? unwind_get_return_address+0x61/0xa0 [ 30.131714] ? tcp_check_oom+0x520/0x520 [ 30.135766] ? tls_write_space+0x340/0x340 [ 30.139978] ? graph_lock+0x170/0x170 [ 30.143757] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.149271] ? ipv6_sock_ac_close+0x34e/0x480 [ 30.153747] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 30.159269] ? ipv6_sock_mc_close+0x161/0x1c0 [ 30.163747] ? ip_mc_drop_socket+0x20f/0x270 [ 30.168138] inet_release+0x104/0x1f0 [ 30.171921] inet6_release+0x50/0x70 [ 30.175619] sock_release+0x96/0x1b0 [ 30.179313] ? sock_alloc_file+0x4e0/0x4e0 [ 30.183526] sock_close+0x16/0x20 [ 30.186955] __fput+0x34d/0x890 [ 30.190213] ? fput+0x1a0/0x1a0 [ 30.193474] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.197948] ____fput+0x15/0x20 [ 30.201205] task_work_run+0x1e4/0x290 [ 30.205071] ? task_work_cancel+0x240/0x240 [ 30.209379] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 30.214897] ? switch_task_namespaces+0xa2/0xd0 [ 30.219542] do_exit+0x1aee/0x2730 [ 30.223058] ? trace_hardirqs_off+0xd/0x10 [ 30.227273] ? mm_update_next_owner+0x980/0x980 [ 30.231919] ? mark_held_locks+0xc9/0x160 [ 30.236057] ? quarantine_put+0xeb/0x190 [ 30.240097] ? kfree+0x111/0x260 [ 30.243439] ? kzfree+0x28/0x30 [ 30.246696] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.251688] ? trace_hardirqs_on+0xd/0x10 [ 30.255815] ? kzfree+0x28/0x30 [ 30.259073] ? crypto_destroy_tfm+0x15d/0x300 [ 30.263549] ? graph_lock+0x170/0x170 [ 30.267325] ? graph_lock+0x170/0x170 [ 30.271106] ? find_held_lock+0x36/0x1c0 [ 30.275148] ? lock_downgrade+0x8e0/0x8e0 [ 30.279277] ? lock_downgrade+0x8e0/0x8e0 [ 30.283404] ? kasan_check_read+0x11/0x20 [ 30.287530] ? do_raw_spin_unlock+0x9e/0x2e0 [ 30.291924] ? __local_bh_enable_ip+0x161/0x230 [ 30.296571] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.301564] ? release_sock+0x1e2/0x2b0 [ 30.305515] ? trace_hardirqs_on+0xd/0x10 [ 30.309640] ? __local_bh_enable_ip+0x161/0x230 [ 30.314295] ? _raw_spin_unlock_bh+0x30/0x40 [ 30.318681] ? release_sock+0x1e2/0x2b0 [ 30.322632] ? __release_sock+0x3a0/0x3a0 [ 30.326761] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 30.332279] ? _copy_from_user+0xdf/0x150 [ 30.336405] ? sk_stream_wait_memory+0x1260/0x1260 [ 30.341322] ? tls_setsockopt+0xb2/0x780 [ 30.345370] ? sock_common_setsockopt+0x9a/0xe0 [ 30.350034] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.355572] ? __sys_setsockopt+0x24f/0x390 [ 30.359879] do_group_exit+0x16f/0x430 [ 30.363752] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.369284] ? __ia32_sys_exit+0x50/0x50 [ 30.373325] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 30.378153] ? do_syscall_64+0x92/0x800 [ 30.382107] __x64_sys_exit_group+0x3e/0x50 [ 30.386416] do_syscall_64+0x1b1/0x800 [ 30.390287] ? syscall_return_slowpath+0x5c0/0x5c0 [ 30.395194] ? syscall_return_slowpath+0x30f/0x5c0 [ 30.400104] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 30.405445] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.410268] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.415433] RIP: 0033:0x43eb58 [ 30.418602] RSP: 002b:00007ffcd00cdb78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 30.426287] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043eb58 [ 30.433537] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 30.440788] RBP: 00000000004be500 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 30.448042] R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000001 [ 30.455290] R13: 00000000006cc160 R14: 0000000000000000 R15: 0000000000000000 [ 30.463028] Dumping ftrace buffer: [ 30.466547] (ftrace buffer empty) [ 30.470233] Kernel Offset: disabled [ 30.473837] Rebooting in 86400 seconds..