[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 19.885518] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. [ 21.002337] random: sshd: uninitialized urandom read (32 bytes read) Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 21.348976] random: sshd: uninitialized urandom read (32 bytes read) [ 22.065674] random: sshd: uninitialized urandom read (32 bytes read) [ 26.552547] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.10.2' (ECDSA) to the list of known hosts. [ 32.017793] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 32.120586] ================================================================== [ 32.128047] BUG: KASAN: use-after-free in tls_sk_proto_close+0x8ab/0x9c0 [ 32.134890] Read of size 1 at addr ffff8801acd74898 by task syz-executor733/4509 [ 32.142843] [ 32.144456] CPU: 1 PID: 4509 Comm: syz-executor733 Not tainted 4.17.0-rc3+ #34 [ 32.151798] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.161135] Call Trace: [ 32.163714] dump_stack+0x1b9/0x294 [ 32.167336] ? dump_stack_print_info.cold.2+0x52/0x52 [ 32.172521] ? printk+0x9e/0xba [ 32.175793] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 32.180558] ? kasan_check_write+0x14/0x20 [ 32.184779] print_address_description+0x6c/0x20b [ 32.189617] ? tls_sk_proto_close+0x8ab/0x9c0 [ 32.194097] kasan_report.cold.7+0x242/0x2fe [ 32.198498] __asan_report_load1_noabort+0x14/0x20 [ 32.203418] tls_sk_proto_close+0x8ab/0x9c0 [ 32.207725] ? unwind_get_return_address+0x61/0xa0 [ 32.212646] ? tcp_check_oom+0x520/0x520 [ 32.216705] ? tls_write_space+0x340/0x340 [ 32.220929] ? graph_lock+0x170/0x170 [ 32.224728] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.230262] ? ipv6_sock_ac_close+0x34e/0x480 [ 32.234756] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 32.240285] ? ipv6_sock_mc_close+0x161/0x1c0 [ 32.244762] ? ip_mc_drop_socket+0x20f/0x270 [ 32.249156] inet_release+0x104/0x1f0 [ 32.252942] inet6_release+0x50/0x70 [ 32.256639] sock_release+0x96/0x1b0 [ 32.260334] ? sock_alloc_file+0x4e0/0x4e0 [ 32.264554] sock_close+0x16/0x20 [ 32.267990] __fput+0x34d/0x890 [ 32.271251] ? fput+0x1a0/0x1a0 [ 32.274512] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.278999] ____fput+0x15/0x20 [ 32.282263] task_work_run+0x1e4/0x290 [ 32.286142] ? task_work_cancel+0x240/0x240 [ 32.290449] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 32.296005] ? switch_task_namespaces+0xa2/0xd0 [ 32.300670] do_exit+0x1aee/0x2730 [ 32.304191] ? trace_hardirqs_off+0xd/0x10 [ 32.308419] ? mm_update_next_owner+0x980/0x980 [ 32.313069] ? mark_held_locks+0xc9/0x160 [ 32.317199] ? quarantine_put+0xeb/0x190 [ 32.321252] ? kfree+0x111/0x260 [ 32.324602] ? kzfree+0x28/0x30 [ 32.327859] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.332853] ? trace_hardirqs_on+0xd/0x10 [ 32.336992] ? kzfree+0x28/0x30 [ 32.340253] ? crypto_destroy_tfm+0x15d/0x300 [ 32.344725] ? graph_lock+0x170/0x170 [ 32.348526] ? graph_lock+0x170/0x170 [ 32.352318] ? find_held_lock+0x36/0x1c0 [ 32.356884] ? lock_downgrade+0x8e0/0x8e0 [ 32.361011] ? lock_downgrade+0x8e0/0x8e0 [ 32.365150] ? kasan_check_read+0x11/0x20 [ 32.369281] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.373674] ? __local_bh_enable_ip+0x161/0x230 [ 32.378325] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.383320] ? release_sock+0x1e2/0x2b0 [ 32.387276] ? trace_hardirqs_on+0xd/0x10 [ 32.391409] ? __local_bh_enable_ip+0x161/0x230 [ 32.396062] ? _raw_spin_unlock_bh+0x30/0x40 [ 32.400842] ? release_sock+0x1e2/0x2b0 [ 32.404813] ? __release_sock+0x3a0/0x3a0 [ 32.408961] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 32.414487] ? _copy_from_user+0xdf/0x150 [ 32.418631] ? sk_stream_wait_memory+0x1260/0x1260 [ 32.423548] ? tls_setsockopt+0xb2/0x780 [ 32.427606] ? sock_common_setsockopt+0x9a/0xe0 [ 32.432259] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.437778] ? __sys_setsockopt+0x24f/0x390 [ 32.442092] do_group_exit+0x16f/0x430 [ 32.445963] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.451493] ? __ia32_sys_exit+0x50/0x50 [ 32.455540] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 32.460364] ? do_syscall_64+0x92/0x800 [ 32.464323] __x64_sys_exit_group+0x3e/0x50 [ 32.468629] do_syscall_64+0x1b1/0x800 [ 32.472499] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 32.477327] ? syscall_return_slowpath+0x5c0/0x5c0 [ 32.482243] ? syscall_return_slowpath+0x30f/0x5c0 [ 32.487157] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 32.492505] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.497334] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.502505] RIP: 0033:0x43eb58 [ 32.505678] RSP: 002b:00007ffef706ef88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 32.513367] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043eb58 [ 32.520617] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 32.527868] RBP: 00000000004be500 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 32.535122] R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000001 [ 32.542372] R13: 00000000006cc160 R14: 0000000000000000 R15: 0000000000000000 [ 32.549629] [ 32.551237] Allocated by task 4509: [ 32.554851] save_stack+0x43/0xd0 [ 32.558286] kasan_kmalloc+0xc4/0xe0 [ 32.561981] kmem_cache_alloc_trace+0x152/0x780 [ 32.566632] tls_init+0x1f9/0xb00 [ 32.570066] tcp_set_ulp+0x1bc/0x520 [ 32.573762] do_tcp_setsockopt.isra.39+0x44a/0x2600 [ 32.578757] tcp_setsockopt+0xc1/0xe0 [ 32.582536] sock_common_setsockopt+0x9a/0xe0 [ 32.587011] __sys_setsockopt+0x1bd/0x390 [ 32.591137] __x64_sys_setsockopt+0xbe/0x150 [ 32.595532] do_syscall_64+0x1b1/0x800 [ 32.599399] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.604564] [ 32.606169] Freed by task 4509: [ 32.609429] save_stack+0x43/0xd0 [ 32.612860] __kasan_slab_free+0x11a/0x170 [ 32.617075] kasan_slab_free+0xe/0x10 [ 32.621651] kfree+0xd9/0x260 [ 32.624745] tls_sw_free_resources+0x2a3/0x360 [ 32.629305] tls_sk_proto_close+0x67c/0x9c0 [ 32.633604] inet_release+0x104/0x1f0 [ 32.637384] inet6_release+0x50/0x70 [ 32.641077] sock_release+0x96/0x1b0 [ 32.644770] sock_close+0x16/0x20 [ 32.648377] __fput+0x34d/0x890 [ 32.651642] ____fput+0x15/0x20 [ 32.654899] task_work_run+0x1e4/0x290 [ 32.658766] do_exit+0x1aee/0x2730 [ 32.662285] do_group_exit+0x16f/0x430 [ 32.666156] __x64_sys_exit_group+0x3e/0x50 [ 32.670460] do_syscall_64+0x1b1/0x800 [ 32.674334] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.679498] [ 32.681115] The buggy address belongs to the object at ffff8801acd74840 [ 32.681115] which belongs to the cache kmalloc-256 of size 256 [ 32.693753] The buggy address is located 88 bytes inside of [ 32.693753] 256-byte region [ffff8801acd74840, ffff8801acd74940) [ 32.705517] The buggy address belongs to the page: [ 32.710428] page:ffffea0006b35d00 count:1 mapcount:0 mapping:ffff8801acd740c0 index:0x0 [ 32.718552] flags: 0x2fffc0000000100(slab) [ 32.722772] raw: 02fffc0000000100 ffff8801acd740c0 0000000000000000 000000010000000c [ 32.730638] raw: ffffea0006bcd2e0 ffffea0007317f60 ffff8801da8007c0 0000000000000000 [ 32.738509] page dumped because: kasan: bad access detected [ 32.744196] [ 32.746467] Memory state around the buggy address: [ 32.751379] ffff8801acd74780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.758720] ffff8801acd74800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 32.766064] >ffff8801acd74880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.773400] ^ [ 32.777530] ffff8801acd74900: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.784868] ffff8801acd74980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.792204] ================================================================== [ 32.799540] Disabling lock debugging due to kernel taint [ 32.805061] Kernel panic - not syncing: panic_on_warn set ... [ 32.805061] [ 32.812424] CPU: 1 PID: 4509 Comm: syz-executor733 Tainted: G B 4.17.0-rc3+ #34 [ 32.821241] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.830570] Call Trace: [ 32.833140] dump_stack+0x1b9/0x294 [ 32.836755] ? dump_stack_print_info.cold.2+0x52/0x52 [ 32.841948] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.846686] ? tls_sk_proto_close+0x7f0/0x9c0 [ 32.851160] panic+0x22f/0x4de [ 32.854336] ? add_taint.cold.5+0x16/0x16 [ 32.858472] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.862862] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.867251] ? tls_sk_proto_close+0x8ab/0x9c0 [ 32.871723] kasan_end_report+0x47/0x4f [ 32.875674] kasan_report.cold.7+0x76/0x2fe [ 32.879976] __asan_report_load1_noabort+0x14/0x20 [ 32.884887] tls_sk_proto_close+0x8ab/0x9c0 [ 32.889187] ? unwind_get_return_address+0x61/0xa0 [ 32.894106] ? tcp_check_oom+0x520/0x520 [ 32.898155] ? tls_write_space+0x340/0x340 [ 32.902378] ? graph_lock+0x170/0x170 [ 32.906161] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.911680] ? ipv6_sock_ac_close+0x34e/0x480 [ 32.916166] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 32.921685] ? ipv6_sock_mc_close+0x161/0x1c0 [ 32.926161] ? ip_mc_drop_socket+0x20f/0x270 [ 32.930640] inet_release+0x104/0x1f0 [ 32.934422] inet6_release+0x50/0x70 [ 32.938136] sock_release+0x96/0x1b0 [ 32.941827] ? sock_alloc_file+0x4e0/0x4e0 [ 32.946039] sock_close+0x16/0x20 [ 32.949477] __fput+0x34d/0x890 [ 32.952739] ? fput+0x1a0/0x1a0 [ 32.956003] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.960483] ____fput+0x15/0x20 [ 32.963743] task_work_run+0x1e4/0x290 [ 32.967611] ? task_work_cancel+0x240/0x240 [ 32.971915] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 32.977435] ? switch_task_namespaces+0xa2/0xd0 [ 32.982085] do_exit+0x1aee/0x2730 [ 32.985602] ? trace_hardirqs_off+0xd/0x10 [ 32.989814] ? mm_update_next_owner+0x980/0x980 [ 32.994459] ? mark_held_locks+0xc9/0x160 [ 32.998604] ? quarantine_put+0xeb/0x190 [ 33.002661] ? kfree+0x111/0x260 [ 33.006004] ? kzfree+0x28/0x30 [ 33.009261] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.014609] ? trace_hardirqs_on+0xd/0x10 [ 33.018741] ? kzfree+0x28/0x30 [ 33.022000] ? crypto_destroy_tfm+0x15d/0x300 [ 33.026481] ? graph_lock+0x170/0x170 [ 33.030261] ? graph_lock+0x170/0x170 [ 33.034041] ? find_held_lock+0x36/0x1c0 [ 33.038085] ? lock_downgrade+0x8e0/0x8e0 [ 33.042209] ? lock_downgrade+0x8e0/0x8e0 [ 33.046341] ? kasan_check_read+0x11/0x20 [ 33.050477] ? do_raw_spin_unlock+0x9e/0x2e0 [ 33.054883] ? __local_bh_enable_ip+0x161/0x230 [ 33.059532] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.064530] ? release_sock+0x1e2/0x2b0 [ 33.068488] ? trace_hardirqs_on+0xd/0x10 [ 33.072621] ? __local_bh_enable_ip+0x161/0x230 [ 33.077277] ? _raw_spin_unlock_bh+0x30/0x40 [ 33.081663] ? release_sock+0x1e2/0x2b0 [ 33.085614] ? __release_sock+0x3a0/0x3a0 [ 33.089743] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 33.095275] ? _copy_from_user+0xdf/0x150 [ 33.099424] ? sk_stream_wait_memory+0x1260/0x1260 [ 33.104346] ? tls_setsockopt+0xb2/0x780 [ 33.108407] ? sock_common_setsockopt+0x9a/0xe0 [ 33.113060] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 33.118581] ? __sys_setsockopt+0x24f/0x390 [ 33.122887] do_group_exit+0x16f/0x430 [ 33.126752] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 33.132274] ? __ia32_sys_exit+0x50/0x50 [ 33.136320] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 33.141151] ? do_syscall_64+0x92/0x800 [ 33.145114] __x64_sys_exit_group+0x3e/0x50 [ 33.149423] do_syscall_64+0x1b1/0x800 [ 33.153320] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 33.158149] ? syscall_return_slowpath+0x5c0/0x5c0 [ 33.163066] ? syscall_return_slowpath+0x30f/0x5c0 [ 33.167978] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 33.173326] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 33.178157] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.183338] RIP: 0033:0x43eb58 [ 33.186522] RSP: 002b:00007ffef706ef88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 33.194444] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043eb58 [ 33.201705] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 33.208973] RBP: 00000000004be500 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 33.216224] R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000001 [ 33.223475] R13: 00000000006cc160 R14: 0000000000000000 R15: 0000000000000000 [ 33.231179] Dumping ftrace buffer: [ 33.234749] (ftrace buffer empty) [ 33.238439] Kernel Offset: disabled [ 33.242045] Rebooting in 86400 seconds..