[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 20.027096] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 24.096795] random: sshd: uninitialized urandom read (32 bytes read) [ 24.543506] random: sshd: uninitialized urandom read (32 bytes read) [ 25.392397] random: sshd: uninitialized urandom read (32 bytes read) [ 25.564000] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.10' (ECDSA) to the list of known hosts. [ 31.106778] random: sshd: uninitialized urandom read (32 bytes read) [ 31.223930] IPVS: ftp: loaded support on port[0] = 21 [ 31.227109] IPVS: ftp: loaded support on port[0] = 21 [ 31.231331] IPVS: ftp: loaded support on port[0] = 21 [ 31.236743] IPVS: ftp: loaded support on port[0] = 21 [ 31.241907] IPVS: ftp: loaded support on port[0] = 21 [ 31.246108] IPVS: ftp: loaded support on port[0] = 21 [ 31.251443] IPVS: ftp: loaded support on port[0] = 21 [ 31.256923] IPVS: ftp: loaded support on port[0] = 21 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 32.217624] ================================================================== [ 32.225223] BUG: KASAN: use-after-free in bpf_tcp_close+0xd7f/0xf80 [ 32.231649] Read of size 8 at addr ffff8801acbaa010 by task syz-executor623/4777 [ 32.239197] [ 32.240849] CPU: 1 PID: 4777 Comm: syz-executor623 Not tainted 4.17.0-rc6+ #28 [ 32.248217] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.257580] Call Trace: [ 32.260192] dump_stack+0x1b9/0x294 executing program executing program executing program executing program [ 32.263862] ? dump_stack_print_info.cold.2+0x52/0x52 [ 32.269082] ? printk+0x9e/0xba [ 32.272402] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 32.277190] ? kasan_check_write+0x14/0x20 [ 32.281459] print_address_description+0x6c/0x20b [ 32.286327] ? bpf_tcp_close+0xd7f/0xf80 [ 32.290423] kasan_report.cold.7+0x242/0x2fe [ 32.294862] __asan_report_load8_noabort+0x14/0x20 [ 32.299818] bpf_tcp_close+0xd7f/0xf80 [ 32.303733] ? tcp_check_oom+0x520/0x520 [ 32.307823] ? lock_downgrade+0x8e0/0x8e0 [ 32.312004] ? sock_hash_free+0x6e0/0x6e0 executing program executing program [ 32.316181] ? kasan_check_read+0x11/0x20 [ 32.320351] ? rcu_is_watching+0x85/0x140 [ 32.324533] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.329752] ? kasan_check_read+0x11/0x20 [ 32.333929] ? rcu_is_watching+0x85/0x140 [ 32.338114] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.343690] ? ipv6_sock_ac_close+0x34e/0x480 [ 32.348216] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 32.353784] ? ipv6_sock_mc_close+0x161/0x1c0 [ 32.358312] ? ip_mc_drop_socket+0x20f/0x270 [ 32.362756] inet_release+0x104/0x1f0 [ 32.366591] inet6_release+0x50/0x70 [ 32.370334] sock_release+0x96/0x1b0 [ 32.374078] ? sock_alloc_file+0x4e0/0x4e0 [ 32.378334] sock_close+0x16/0x20 [ 32.381816] __fput+0x34d/0x890 [ 32.385124] ? fput+0x1a0/0x1a0 [ 32.388430] ? check_same_owner+0x320/0x320 [ 32.392778] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.397301] ____fput+0x15/0x20 [ 32.400606] task_work_run+0x1e4/0x290 [ 32.404518] ? task_work_cancel+0x240/0x240 [ 32.408864] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 32.414430] ? switch_task_namespaces+0xa2/0xd0 [ 32.419141] do_exit+0x1aee/0x2730 [ 32.422714] ? mm_update_next_owner+0x980/0x980 [ 32.427412] ? lock_downgrade+0x8e0/0x8e0 [ 32.431593] ? kasan_check_read+0x11/0x20 [ 32.435768] ? rcu_is_watching+0x85/0x140 [ 32.439948] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.445169] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.450397] ? is_bpf_text_address+0xd7/0x170 [ 32.454918] ? kernel_text_address+0x79/0xf0 [ 32.459353] ? __unwind_start+0x166/0x330 [ 32.463534] ? __kernel_text_address+0xd/0x40 [ 32.468059] ? unwind_get_return_address+0x61/0xa0 [ 32.473027] ? save_stack+0xa9/0xd0 [ 32.476679] ? save_stack+0x43/0xd0 [ 32.480326] ? __kasan_slab_free+0x11a/0x170 [ 32.484760] ? kasan_slab_free+0xe/0x10 [ 32.488758] ? kfree+0xd9/0x260 [ 32.492063] ? map_update_elem+0x642/0xc90 [ 32.496324] ? __x64_sys_bpf+0x32d/0x510 [ 32.500418] ? do_syscall_64+0x1b1/0x800 [ 32.504509] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.509909] ? kasan_check_read+0x11/0x20 [ 32.514085] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.518526] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 32.523142] ? kasan_check_write+0x14/0x20 [ 32.527416] ? do_raw_spin_lock+0xc1/0x200 [ 32.531680] ? trace_hardirqs_off+0xd/0x10 [ 32.535940] ? _raw_spin_unlock_irqrestore+0x63/0xc0 [ 32.541075] ? debug_check_no_obj_freed+0x2ff/0x584 [ 32.546123] ? kasan_check_read+0x11/0x20 [ 32.550296] ? rcu_is_watching+0x85/0x140 [ 32.554475] ? rcu_pm_notify+0xc0/0xc0 [ 32.558395] ? trace_hardirqs_off+0xd/0x10 [ 32.562669] ? map_update_elem+0x650/0xc90 [ 32.566932] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.571976] ? kfree+0x1e9/0x260 [ 32.575383] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.580946] ? map_update_elem+0x127/0xc90 [ 32.585216] do_group_exit+0x16f/0x430 [ 32.589128] ? bpf_prog_get+0x20/0x20 [ 32.592965] ? __ia32_sys_exit+0x50/0x50 [ 32.597062] ? do_syscall_64+0x92/0x800 [ 32.601075] __x64_sys_exit_group+0x3e/0x50 [ 32.605423] do_syscall_64+0x1b1/0x800 [ 32.609338] ? syscall_return_slowpath+0x5c0/0x5c0 [ 32.614306] ? syscall_return_slowpath+0x30f/0x5c0 [ 32.619269] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 32.624667] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.629546] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.634758] RIP: 0033:0x442459 [ 32.637964] RSP: 002b:00007ffe00ae0328 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 32.645699] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442459 [ 32.652985] RDX: 0000000000442459 RSI: 0000000000000014 RDI: 0000000000000000 [ 32.660271] RBP: 0000000000000000 R08: 0000000000000011 R09: 0000000000000000 [ 32.667562] R10: 0000000000000011 R11: 0000000000000206 R12: 0000000000007d6f [ 32.674856] R13: 00000000006ce448 R14: 0000000000000000 R15: 0000000000000000 [ 32.682161] [ 32.683805] Allocated by task 4777: [ 32.687456] save_stack+0x43/0xd0 [ 32.690933] kasan_kmalloc+0xc4/0xe0 [ 32.694673] __kmalloc_node+0x47/0x70 [ 32.698498] sock_hash_ctx_update_elem.isra.23+0xa57/0x1560 [ 32.704231] sock_hash_update_elem+0x14f/0x2d0 [ 32.708846] map_update_elem+0x5c4/0xc90 [ 32.712940] __x64_sys_bpf+0x32d/0x510 [ 32.716860] do_syscall_64+0x1b1/0x800 [ 32.720767] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.725960] [ 32.727596] Freed by task 18: [ 32.730728] save_stack+0x43/0xd0 [ 32.734206] __kasan_slab_free+0x11a/0x170 [ 32.738466] kasan_slab_free+0xe/0x10 [ 32.743344] kfree+0xd9/0x260 [ 32.746479] sock_hash_free+0x24e/0x6e0 [ 32.750470] bpf_map_free_deferred+0xba/0xf0 [ 32.754903] process_one_work+0xc1e/0x1b50 [ 32.759162] worker_thread+0x1cc/0x1440 [ 32.763158] kthread+0x345/0x410 [ 32.766552] ret_from_fork+0x3a/0x50 [ 32.770278] [ 32.771923] The buggy address belongs to the object at ffff8801acbaa000 [ 32.771923] which belongs to the cache kmalloc-64 of size 64 [ 32.784426] The buggy address is located 16 bytes inside of [ 32.784426] 64-byte region [ffff8801acbaa000, ffff8801acbaa040) [ 32.796139] The buggy address belongs to the page: [ 32.801114] page:ffffea0006b2ea80 count:1 mapcount:0 mapping:ffff8801acbaa000 index:0x0 [ 32.809291] flags: 0x2fffc0000000100(slab) [ 32.813546] raw: 02fffc0000000100 ffff8801acbaa000 0000000000000000 0000000100000020 [ 32.821451] raw: ffffea00075ecae0 ffffea0007616860 ffff8801da800340 0000000000000000 [ 32.829343] page dumped because: kasan: bad access detected [ 32.835096] [ 32.836731] Memory state around the buggy address: [ 32.841678] ffff8801acba9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.849055] ffff8801acba9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.856521] >ffff8801acbaa000: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.863892] ^ 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 [ 32.867799] ffff8801acbaa080: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 32.875185] ffff8801acbaa100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.882554] ================================================================== [ 32.889917] Disabling lock debugging due to kernel taint [ 32.895472] Kernel panic - not syncing: panic_on_warn set ... [ 32.895472] [ 32.902861] CPU: 1 PID: 4777 Comm: syz-executor623 Tainted: G B 4.17.0-rc6+ #28 [ 32.911620] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.920980] Call Trace: [ 32.923583] dump_stack+0x1b9/0x294 [ 32.927230] ? dump_stack_print_info.cold.2+0x52/0x52 [ 32.932442] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.937218] ? bpf_tcp_close+0xcf0/0xf80 [ 32.941293] panic+0x22f/0x4de [ 32.944500] ? add_taint.cold.5+0x16/0x16 [ 32.948667] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.953094] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.957524] ? bpf_tcp_close+0xd7f/0xf80 [ 32.961602] kasan_end_report+0x47/0x4f [ 32.965593] kasan_report.cold.7+0x76/0x2fe [ 32.969936] __asan_report_load8_noabort+0x14/0x20 [ 32.974881] bpf_tcp_close+0xd7f/0xf80 [ 32.978791] ? tcp_check_oom+0x520/0x520 [ 32.982876] ? lock_downgrade+0x8e0/0x8e0 [ 32.987057] ? sock_hash_free+0x6e0/0x6e0 [ 32.991227] ? kasan_check_read+0x11/0x20 [ 32.995399] ? rcu_is_watching+0x85/0x140 [ 32.999571] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 33.004786] ? kasan_check_read+0x11/0x20 [ 33.008952] ? rcu_is_watching+0x85/0x140 [ 33.013124] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 33.018682] ? ipv6_sock_ac_close+0x34e/0x480 [ 33.023198] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 33.028755] ? ipv6_sock_mc_close+0x161/0x1c0 [ 33.033270] ? ip_mc_drop_socket+0x20f/0x270 [ 33.037699] inet_release+0x104/0x1f0 [ 33.041519] inet6_release+0x50/0x70 [ 33.045251] sock_release+0x96/0x1b0 [ 33.049025] ? sock_alloc_file+0x4e0/0x4e0 [ 33.053286] sock_close+0x16/0x20 [ 33.056757] __fput+0x34d/0x890 [ 33.060056] ? fput+0x1a0/0x1a0 [ 33.063366] ? check_same_owner+0x320/0x320 [ 33.067703] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.072219] ____fput+0x15/0x20 [ 33.075517] task_work_run+0x1e4/0x290 [ 33.079423] ? task_work_cancel+0x240/0x240 [ 33.083761] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 33.089319] ? switch_task_namespaces+0xa2/0xd0 [ 33.094015] do_exit+0x1aee/0x2730 [ 33.097578] ? mm_update_next_owner+0x980/0x980 [ 33.102265] ? lock_downgrade+0x8e0/0x8e0 [ 33.106433] ? kasan_check_read+0x11/0x20 [ 33.110602] ? rcu_is_watching+0x85/0x140 [ 33.114771] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 33.119981] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 33.125190] ? is_bpf_text_address+0xd7/0x170 [ 33.129702] ? kernel_text_address+0x79/0xf0 [ 33.134130] ? __unwind_start+0x166/0x330 [ 33.138298] ? __kernel_text_address+0xd/0x40 [ 33.142815] ? unwind_get_return_address+0x61/0xa0 [ 33.147766] ? save_stack+0xa9/0xd0 [ 33.151409] ? save_stack+0x43/0xd0 [ 33.155051] ? __kasan_slab_free+0x11a/0x170 [ 33.159474] ? kasan_slab_free+0xe/0x10 [ 33.163471] ? kfree+0xd9/0x260 [ 33.166770] ? map_update_elem+0x642/0xc90 [ 33.171026] ? __x64_sys_bpf+0x32d/0x510 [ 33.175110] ? do_syscall_64+0x1b1/0x800 [ 33.179197] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.184586] ? kasan_check_read+0x11/0x20 [ 33.188751] ? do_raw_spin_unlock+0x9e/0x2e0 [ 33.193175] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 33.197780] ? kasan_check_write+0x14/0x20 [ 33.202032] ? do_raw_spin_lock+0xc1/0x200 [ 33.206285] ? trace_hardirqs_off+0xd/0x10 [ 33.210544] ? _raw_spin_unlock_irqrestore+0x63/0xc0 [ 33.215673] ? debug_check_no_obj_freed+0x2ff/0x584 [ 33.220718] ? kasan_check_read+0x11/0x20 [ 33.224882] ? rcu_is_watching+0x85/0x140 [ 33.229049] ? rcu_pm_notify+0xc0/0xc0 [ 33.232951] ? trace_hardirqs_off+0xd/0x10 [ 33.237208] ? map_update_elem+0x650/0xc90 [ 33.241458] ? rcu_read_lock_sched_held+0x108/0x120 [ 33.246492] ? kfree+0x1e9/0x260 [ 33.249877] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 33.255428] ? map_update_elem+0x127/0xc90 [ 33.259689] do_group_exit+0x16f/0x430 [ 33.263595] ? bpf_prog_get+0x20/0x20 [ 33.267420] ? __ia32_sys_exit+0x50/0x50 [ 33.271502] ? do_syscall_64+0x92/0x800 [ 33.275499] __x64_sys_exit_group+0x3e/0x50 [ 33.279844] do_syscall_64+0x1b1/0x800 [ 33.283751] ? syscall_return_slowpath+0x5c0/0x5c0 [ 33.288706] ? syscall_return_slowpath+0x30f/0x5c0 [ 33.293652] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 33.299035] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 33.303899] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.309098] RIP: 0033:0x442459 [ 33.312295] RSP: 002b:00007ffe00ae0328 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 33.320021] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442459 [ 33.327303] RDX: 0000000000442459 RSI: 0000000000000014 RDI: 0000000000000000 [ 33.334591] RBP: 0000000000000000 R08: 0000000000000011 R09: 0000000000000000 [ 33.341872] R10: 0000000000000011 R11: 0000000000000206 R12: 0000000000007d6f [ 33.349150] R13: 00000000006ce448 R14: 0000000000000000 R15: 0000000000000000 [ 33.356989] Dumping ftrace buffer: [ 33.360522] (ftrace buffer empty) [ 33.364217] Kernel Offset: disabled [ 33.367831] Rebooting in 86400 seconds..