[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 16.413155] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 20.528702] random: sshd: uninitialized urandom read (32 bytes read) [ 20.882145] random: sshd: uninitialized urandom read (32 bytes read) [ 21.598726] random: sshd: uninitialized urandom read (32 bytes read) [ 21.733518] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.10.28' (ECDSA) to the list of known hosts. [ 27.142423] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 27.226687] ================================================================== [ 27.234094] BUG: KASAN: slab-out-of-bounds in crypto_dh_encode_key+0x80e/0x830 [ 27.241531] Write of size 4 at addr ffff8801adbd6f10 by task syz-executor186/4466 [ 27.249143] [ 27.250772] CPU: 0 PID: 4466 Comm: syz-executor186 Not tainted 4.18.0-rc3-next-20180709+ #2 [ 27.259237] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.268578] Call Trace: [ 27.271148] dump_stack+0x1c9/0x2b4 [ 27.274756] ? dump_stack_print_info.cold.2+0x52/0x52 [ 27.279928] ? printk+0xa7/0xcf [ 27.283284] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 27.288032] ? crypto_dh_encode_key+0x80e/0x830 [ 27.292710] print_address_description+0x6c/0x20b [ 27.297536] ? crypto_dh_encode_key+0x80e/0x830 [ 27.302280] kasan_report.cold.7+0x242/0x30d [ 27.306681] __asan_report_store_n_noabort+0x12/0x14 [ 27.311773] crypto_dh_encode_key+0x80e/0x830 [ 27.316261] ? crypto_dh_decode_key+0x820/0x820 [ 27.320924] ? __keyctl_dh_compute+0x6e1/0x1c00 [ 27.325572] __keyctl_dh_compute+0x707/0x1c00 [ 27.330063] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 27.335598] ? __handle_mm_fault+0x972/0x4480 [ 27.340086] ? copy_overflow+0x30/0x30 [ 27.343976] ? lock_acquire+0x1e4/0x540 [ 27.347931] ? handle_mm_fault+0x417/0xc80 [ 27.352234] ? lock_acquire+0x1e4/0x540 [ 27.356187] ? __might_fault+0x12b/0x1e0 [ 27.360247] ? lock_release+0xa30/0xa30 [ 27.364202] ? check_same_owner+0x340/0x340 [ 27.368518] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 27.374047] ? handle_mm_fault+0x55d/0xc80 [ 27.378267] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 27.383889] ? _copy_from_user+0xdf/0x150 [ 27.388027] keyctl_dh_compute+0xc5/0x11f [ 27.392176] ? __keyctl_dh_compute+0x1c00/0x1c00 [ 27.396915] __x64_sys_keyctl+0x12a/0x3b0 [ 27.401049] do_syscall_64+0x1b9/0x820 [ 27.404919] ? syscall_return_slowpath+0x5e0/0x5e0 [ 27.409829] ? syscall_return_slowpath+0x31d/0x5e0 [ 27.414835] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 27.419843] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 27.425363] ? prepare_exit_to_usermode+0x291/0x3b0 [ 27.430376] ? perf_trace_sys_enter+0xb10/0xb10 [ 27.435037] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.439873] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.445046] RIP: 0033:0x4403b9 [ 27.448221] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 27.467337] RSP: 002b:00007ffcf524af58 EFLAGS: 00000213 ORIG_RAX: 00000000000000fa [ 27.475030] RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403b9 [ 27.482277] RDX: 0000000020000540 RSI: 00000000200006c0 RDI: 0000000000000017 [ 27.489531] RBP: 00000000006ca018 R08: 0000000020c61fc8 R09: 00000000004002c8 [ 27.496777] R10: 0000000000000005 R11: 0000000000000213 R12: 0000000000401c40 [ 27.504037] R13: 0000000000401cd0 R14: 0000000000000000 R15: 0000000000000000 [ 27.511288] [ 27.512896] Allocated by task 4466: [ 27.516509] save_stack+0x43/0xd0 [ 27.519939] kasan_kmalloc+0xc4/0xe0 [ 27.523630] __kmalloc+0x14e/0x760 [ 27.527151] __keyctl_dh_compute+0x6e1/0x1c00 [ 27.531631] keyctl_dh_compute+0xc5/0x11f [ 27.535759] __x64_sys_keyctl+0x12a/0x3b0 [ 27.539885] do_syscall_64+0x1b9/0x820 [ 27.543840] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.549025] [ 27.550638] Freed by task 2899: [ 27.553901] save_stack+0x43/0xd0 [ 27.557340] __kasan_slab_free+0x11a/0x170 [ 27.561550] kasan_slab_free+0xe/0x10 [ 27.565328] kfree+0xd9/0x260 [ 27.568413] single_release+0x8f/0xb0 [ 27.572310] __fput+0x35d/0x930 [ 27.575568] ____fput+0x15/0x20 [ 27.578828] task_work_run+0x1ec/0x2a0 [ 27.582701] exit_to_usermode_loop+0x313/0x370 [ 27.587272] do_syscall_64+0x6be/0x820 [ 27.591146] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.596307] [ 27.597913] The buggy address belongs to the object at ffff8801adbd6f00 [ 27.597913] which belongs to the cache kmalloc-32 of size 32 [ 27.610376] The buggy address is located 16 bytes inside of [ 27.610376] 32-byte region [ffff8801adbd6f00, ffff8801adbd6f20) [ 27.622058] The buggy address belongs to the page: [ 27.626968] page:ffffea0006b6f580 count:1 mapcount:0 mapping:ffff8801da8001c0 index:0xffff8801adbd6fc1 [ 27.636389] flags: 0x2fffc0000000100(slab) [ 27.640616] raw: 02fffc0000000100 ffffea00075c0288 ffffea00075c0388 ffff8801da8001c0 [ 27.648475] raw: ffff8801adbd6fc1 ffff8801adbd6000 000000010000003e 0000000000000000 [ 27.656332] page dumped because: kasan: bad access detected [ 27.662020] [ 27.663625] Memory state around the buggy address: [ 27.668539] ffff8801adbd6e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 27.675876] ffff8801adbd6e80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 27.683211] >ffff8801adbd6f00: 00 00 03 fc fc fc fc fc 01 fc fc fc fc fc fc fc [ 27.690553] ^ [ 27.694415] ffff8801adbd6f80: 01 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.701838] ffff8801adbd7000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 27.709171] ================================================================== [ 27.716613] Kernel panic - not syncing: panic_on_warn set ... [ 27.716613] [ 27.723977] CPU: 0 PID: 4466 Comm: syz-executor186 Tainted: G B 4.18.0-rc3-next-20180709+ #2 [ 27.733846] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.743177] Call Trace: [ 27.745748] dump_stack+0x1c9/0x2b4 [ 27.749361] ? dump_stack_print_info.cold.2+0x52/0x52 [ 27.754535] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 27.759272] panic+0x238/0x4e7 [ 27.762445] ? add_taint.cold.5+0x16/0x16 [ 27.766581] ? do_raw_spin_unlock+0xa7/0x2f0 [ 27.770968] ? do_raw_spin_unlock+0xa7/0x2f0 [ 27.775359] ? crypto_dh_encode_key+0x80e/0x830 [ 27.780018] kasan_end_report+0x47/0x4f [ 27.784068] kasan_report.cold.7+0x76/0x30d [ 27.788458] __asan_report_store_n_noabort+0x12/0x14 [ 27.793542] crypto_dh_encode_key+0x80e/0x830 [ 27.798024] ? crypto_dh_decode_key+0x820/0x820 [ 27.802691] ? __keyctl_dh_compute+0x6e1/0x1c00 [ 27.807429] __keyctl_dh_compute+0x707/0x1c00 [ 27.811909] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 27.817426] ? __handle_mm_fault+0x972/0x4480 [ 27.821903] ? copy_overflow+0x30/0x30 [ 27.825776] ? lock_acquire+0x1e4/0x540 [ 27.829731] ? handle_mm_fault+0x417/0xc80 [ 27.833947] ? lock_acquire+0x1e4/0x540 [ 27.837900] ? __might_fault+0x12b/0x1e0 [ 27.841943] ? lock_release+0xa30/0xa30 [ 27.845893] ? check_same_owner+0x340/0x340 [ 27.850195] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 27.855716] ? handle_mm_fault+0x55d/0xc80 [ 27.859933] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 27.865449] ? _copy_from_user+0xdf/0x150 [ 27.869580] keyctl_dh_compute+0xc5/0x11f [ 27.873710] ? __keyctl_dh_compute+0x1c00/0x1c00 [ 27.878455] __x64_sys_keyctl+0x12a/0x3b0 [ 27.882587] do_syscall_64+0x1b9/0x820 [ 27.886452] ? syscall_return_slowpath+0x5e0/0x5e0 [ 27.891366] ? syscall_return_slowpath+0x31d/0x5e0 [ 27.896295] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 27.901291] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 27.906807] ? prepare_exit_to_usermode+0x291/0x3b0 [ 27.911811] ? perf_trace_sys_enter+0xb10/0xb10 [ 27.916460] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.921284] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 27.926463] RIP: 0033:0x4403b9 [ 27.929648] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 27.948774] RSP: 002b:00007ffcf524af58 EFLAGS: 00000213 ORIG_RAX: 00000000000000fa [ 27.956463] RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403b9 [ 27.963723] RDX: 0000000020000540 RSI: 00000000200006c0 RDI: 0000000000000017 [ 27.970978] RBP: 00000000006ca018 R08: 0000000020c61fc8 R09: 00000000004002c8 [ 27.978232] R10: 0000000000000005 R11: 0000000000000213 R12: 0000000000401c40 [ 27.985481] R13: 0000000000401cd0 R14: 0000000000000000 R15: 0000000000000000 [ 27.993358] Dumping ftrace buffer: [ 27.996882] (ftrace buffer empty) [ 28.000579] Kernel Offset: disabled [ 28.004184] Rebooting in 86400 seconds..