[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 21.157199] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 24.524920] random: sshd: uninitialized urandom read (32 bytes read) [ 24.861658] random: sshd: uninitialized urandom read (32 bytes read) [ 25.637288] random: sshd: uninitialized urandom read (32 bytes read) [ 25.802160] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.10.45' (ECDSA) to the list of known hosts. [ 31.306632] random: sshd: uninitialized urandom read (32 bytes read) [ 31.424885] IPVS: ftp: loaded support on port[0] = 21 [ 31.425578] IPVS: ftp: loaded support on port[0] = 21 [ 31.441254] IPVS: ftp: loaded support on port[0] = 21 [ 31.455880] IPVS: ftp: loaded support on port[0] = 21 [ 31.464062] IPVS: ftp: loaded support on port[0] = 21 [ 31.469711] IPVS: ftp: loaded support on port[0] = 21 [ 31.476433] IPVS: ftp: loaded support on port[0] = 21 [ 31.482531] 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 [ 31.961783] ================================================================== [ 31.969434] BUG: KASAN: use-after-free in bpf_tcp_close+0xd7f/0xf80 [ 31.975865] Read of size 8 at addr ffff8801ab5c5010 by task syz-executor512/4684 [ 31.983407] [ 31.985056] CPU: 1 PID: 4684 Comm: syz-executor512 Not tainted 4.17.0-rc4+ #22 [ 31.992510] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.001872] Call Trace: [ 32.004494] dump_stack+0x1b9/0x294 executing program executing program executing program [ 32.008254] ? dump_stack_print_info.cold.2+0x52/0x52 [ 32.013476] ? printk+0x9e/0xba [ 32.016786] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 32.021575] ? kasan_check_write+0x14/0x20 [ 32.025836] print_address_description+0x6c/0x20b [ 32.030700] ? bpf_tcp_close+0xd7f/0xf80 [ 32.034762] kasan_report.cold.7+0x242/0x2fe [ 32.039179] __asan_report_load8_noabort+0x14/0x20 [ 32.044097] bpf_tcp_close+0xd7f/0xf80 [ 32.048014] ? tcp_check_oom+0x520/0x520 [ 32.052071] ? lock_downgrade+0x8e0/0x8e0 [ 32.056210] ? sock_hash_free+0x6e0/0x6e0 [ 32.060352] ? kasan_check_read+0x11/0x20 [ 32.064497] ? rcu_is_watching+0x85/0x140 [ 32.068644] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.073826] ? kasan_check_read+0x11/0x20 [ 32.077963] ? rcu_is_watching+0x85/0x140 [ 32.082114] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.087647] ? ipv6_sock_ac_close+0x34e/0x480 [ 32.092129] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 32.097657] ? ipv6_sock_mc_close+0x161/0x1c0 [ 32.102153] ? ip_mc_drop_socket+0x20f/0x270 [ 32.106551] inet_release+0x104/0x1f0 [ 32.110604] inet6_release+0x50/0x70 [ 32.114326] sock_release+0x96/0x1b0 [ 32.118032] ? sock_alloc_file+0x4e0/0x4e0 [ 32.122256] sock_close+0x16/0x20 [ 32.125700] __fput+0x34d/0x890 [ 32.128975] ? fput+0x1a0/0x1a0 [ 32.132252] ? check_same_owner+0x320/0x320 [ 32.137520] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.142041] ____fput+0x15/0x20 [ 32.145320] task_work_run+0x1e4/0x290 [ 32.149375] ? task_work_cancel+0x240/0x240 [ 32.153686] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 32.159209] ? switch_task_namespaces+0xa2/0xd0 [ 32.163887] do_exit+0x1aee/0x2730 [ 32.167426] ? mm_update_next_owner+0x980/0x980 [ 32.172101] ? lock_downgrade+0x8e0/0x8e0 [ 32.176248] ? kasan_check_read+0x11/0x20 [ 32.180386] ? rcu_is_watching+0x85/0x140 [ 32.184522] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.189713] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.194907] ? is_bpf_text_address+0xd7/0x170 [ 32.199396] ? kernel_text_address+0x79/0xf0 [ 32.203795] ? __unwind_start+0x166/0x330 [ 32.207941] ? __kernel_text_address+0xd/0x40 [ 32.212430] ? unwind_get_return_address+0x61/0xa0 [ 32.217363] ? save_stack+0xa9/0xd0 [ 32.220985] ? save_stack+0x43/0xd0 [ 32.224622] ? __kasan_slab_free+0x11a/0x170 [ 32.229022] ? kasan_slab_free+0xe/0x10 [ 32.232989] ? kfree+0xd9/0x260 [ 32.236259] ? map_update_elem+0x642/0xc90 [ 32.240492] ? __x64_sys_bpf+0x32d/0x510 [ 32.244547] ? do_syscall_64+0x1b1/0x800 [ 32.248600] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.253959] ? kasan_check_read+0x11/0x20 [ 32.258099] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.262495] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 32.267068] ? kasan_check_write+0x14/0x20 [ 32.271291] ? do_raw_spin_lock+0xc1/0x200 [ 32.275514] ? trace_hardirqs_off+0xd/0x10 [ 32.279740] ? _raw_spin_unlock_irqrestore+0x63/0xc0 [ 32.284849] ? debug_check_no_obj_freed+0x2ff/0x584 [ 32.289858] ? kasan_check_read+0x11/0x20 [ 32.293994] ? rcu_is_watching+0x85/0x140 [ 32.298142] ? rcu_pm_notify+0xc0/0xc0 [ 32.302023] ? trace_hardirqs_off+0xd/0x10 [ 32.306254] ? map_update_elem+0x650/0xc90 [ 32.310475] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.315481] ? kfree+0x1e9/0x260 [ 32.318839] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.325336] ? map_update_elem+0x127/0xc90 [ 32.329929] do_group_exit+0x16f/0x430 [ 32.333819] ? bpf_prog_get+0x20/0x20 [ 32.337630] ? __ia32_sys_exit+0x50/0x50 [ 32.341688] ? do_syscall_64+0x92/0x800 [ 32.345664] __x64_sys_exit_group+0x3e/0x50 [ 32.350153] do_syscall_64+0x1b1/0x800 [ 32.354559] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 32.359391] ? syscall_return_slowpath+0x5c0/0x5c0 [ 32.364311] ? syscall_return_slowpath+0x30f/0x5c0 [ 32.369247] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 32.374616] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.379893] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.385070] RIP: 0033:0x441ca9 [ 32.388254] RSP: 002b:00007ffcbff65518 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 32.395961] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441ca9 [ 32.403222] RDX: 0000000000441ca9 RSI: 0000000000000020 RDI: 0000000000000000 [ 32.410482] RBP: 0000000000000000 R08: 0000000000000006 R09: 0000000000007c85 [ 32.417740] R10: 0000000000000006 R11: 0000000000000202 R12: 0000000000000004 [ 32.425001] R13: 0000000000007c85 R14: 0000000000000000 R15: 0000000000000000 [ 32.432281] [ 32.433896] Allocated by task 4684: [ 32.437524] save_stack+0x43/0xd0 [ 32.440965] kasan_kmalloc+0xc4/0xe0 [ 32.444843] __kmalloc_node+0x47/0x70 [ 32.448661] sock_hash_ctx_update_elem.isra.23+0xa57/0x1560 [ 32.454374] sock_hash_update_elem+0x14f/0x2d0 [ 32.458953] map_update_elem+0x5c4/0xc90 [ 32.463023] __x64_sys_bpf+0x32d/0x510 [ 32.466907] do_syscall_64+0x1b1/0x800 [ 32.470789] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.475963] [ 32.477574] Freed by task 4635: [ 32.480848] save_stack+0x43/0xd0 [ 32.484286] __kasan_slab_free+0x11a/0x170 [ 32.488504] kasan_slab_free+0xe/0x10 [ 32.492291] kfree+0xd9/0x260 [ 32.495383] sock_hash_free+0x24e/0x6e0 [ 32.499345] bpf_map_free_deferred+0xba/0xf0 [ 32.503740] process_one_work+0xc1e/0x1b50 [ 32.507972] worker_thread+0x1cc/0x1440 [ 32.511935] kthread+0x345/0x410 [ 32.515291] ret_from_fork+0x3a/0x50 [ 32.518991] [ 32.520607] The buggy address belongs to the object at ffff8801ab5c5000 [ 32.520607] which belongs to the cache kmalloc-64 of size 64 [ 32.533085] The buggy address is located 16 bytes inside of [ 32.533085] 64-byte region [ffff8801ab5c5000, ffff8801ab5c5040) [ 32.544774] The buggy address belongs to the page: [ 32.549696] page:ffffea0006ad7140 count:1 mapcount:0 mapping:ffff8801ab5c5000 index:0x0 [ 32.557834] flags: 0x2fffc0000000100(slab) [ 32.562060] raw: 02fffc0000000100 ffff8801ab5c5000 0000000000000000 0000000100000020 [ 32.569930] raw: ffffea0006ac45a0 ffffea0007627320 ffff8801da800340 0000000000000000 [ 32.577793] page dumped because: kasan: bad access detected [ 32.583494] [ 32.585102] Memory state around the buggy address: [ 32.590024] ffff8801ab5c4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.597371] ffff8801ab5c4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.604804] >ffff8801ab5c5000: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc executing program [ 32.612326] ^ [ 32.616212] ffff8801ab5c5080: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 32.624263] ffff8801ab5c5100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 32.631615] ================================================================== [ 32.638958] Disabling lock debugging due to kernel taint [ 32.644454] Kernel panic - not syncing: panic_on_warn set ... [ 32.644454] [ 32.651923] CPU: 1 PID: 4684 Comm: syz-executor512 Tainted: G B 4.17.0-rc4+ #22 executing program executing program executing program [ 32.661459] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.670817] Call Trace: [ 32.673468] dump_stack+0x1b9/0x294 [ 32.677316] ? dump_stack_print_info.cold.2+0x52/0x52 [ 32.682572] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.687346] ? bpf_tcp_close+0xd20/0xf80 [ 32.691427] panic+0x22f/0x4de [ 32.694630] ? add_taint.cold.5+0x16/0x16 [ 32.698819] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.703259] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.707688] ? bpf_tcp_close+0xd7f/0xf80 executing program executing program executing program executing program executing program executing program executing program [ 32.711763] kasan_end_report+0x47/0x4f [ 32.715754] kasan_report.cold.7+0x76/0x2fe [ 32.720089] __asan_report_load8_noabort+0x14/0x20 [ 32.725035] bpf_tcp_close+0xd7f/0xf80 [ 32.728935] ? tcp_check_oom+0x520/0x520 [ 32.733017] ? lock_downgrade+0x8e0/0x8e0 [ 32.737183] ? sock_hash_free+0x6e0/0x6e0 [ 32.742311] ? kasan_check_read+0x11/0x20 [ 32.746489] ? rcu_is_watching+0x85/0x140 [ 32.750664] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.755873] ? kasan_check_read+0x11/0x20 [ 32.760044] ? rcu_is_watching+0x85/0x140 executing program executing program executing program executing program [ 32.764304] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 32.769899] ? ipv6_sock_ac_close+0x34e/0x480 [ 32.774423] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 32.779977] ? ipv6_sock_mc_close+0x161/0x1c0 [ 32.784514] ? ip_mc_drop_socket+0x20f/0x270 [ 32.789120] inet_release+0x104/0x1f0 [ 32.792954] inet6_release+0x50/0x70 [ 32.796707] sock_release+0x96/0x1b0 [ 32.800446] ? sock_alloc_file+0x4e0/0x4e0 [ 32.804720] sock_close+0x16/0x20 [ 32.808190] __fput+0x34d/0x890 [ 32.811489] ? fput+0x1a0/0x1a0 executing program executing program executing program executing program executing program [ 32.814786] ? check_same_owner+0x320/0x320 [ 32.819148] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.823655] ____fput+0x15/0x20 [ 32.826952] task_work_run+0x1e4/0x290 [ 32.830852] ? task_work_cancel+0x240/0x240 [ 32.835189] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 32.840748] ? switch_task_namespaces+0xa2/0xd0 [ 32.845434] do_exit+0x1aee/0x2730 [ 32.849000] ? mm_update_next_owner+0x980/0x980 [ 32.853679] ? lock_downgrade+0x8e0/0x8e0 [ 32.857845] ? kasan_check_read+0x11/0x20 executing program executing program executing program executing program executing program [ 32.862004] ? rcu_is_watching+0x85/0x140 [ 32.866164] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.871406] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 32.876610] ? is_bpf_text_address+0xd7/0x170 [ 32.881117] ? kernel_text_address+0x79/0xf0 [ 32.885537] ? __unwind_start+0x166/0x330 [ 32.889699] ? __kernel_text_address+0xd/0x40 [ 32.894224] ? unwind_get_return_address+0x61/0xa0 [ 32.899214] ? save_stack+0xa9/0xd0 [ 32.902856] ? save_stack+0x43/0xd0 [ 32.906502] ? __kasan_slab_free+0x11a/0x170 [ 32.910926] ? kasan_slab_free+0xe/0x10 executing program executing program executing program executing program executing program [ 32.914922] ? kfree+0xd9/0x260 [ 32.918565] ? map_update_elem+0x642/0xc90 [ 32.922816] ? __x64_sys_bpf+0x32d/0x510 [ 32.926919] ? do_syscall_64+0x1b1/0x800 [ 32.930996] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.936375] ? kasan_check_read+0x11/0x20 [ 32.940536] ? do_raw_spin_unlock+0x9e/0x2e0 [ 32.944964] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 32.949912] ? kasan_check_write+0x14/0x20 [ 32.954164] ? do_raw_spin_lock+0xc1/0x200 [ 32.958420] ? trace_hardirqs_off+0xd/0x10 executing program executing program executing program executing program executing program [ 32.962673] ? _raw_spin_unlock_irqrestore+0x63/0xc0 [ 32.967809] ? debug_check_no_obj_freed+0x2ff/0x584 [ 32.972845] ? kasan_check_read+0x11/0x20 [ 32.977624] ? rcu_is_watching+0x85/0x140 [ 32.981799] ? rcu_pm_notify+0xc0/0xc0 [ 32.985701] ? trace_hardirqs_off+0xd/0x10 [ 32.989954] ? map_update_elem+0x650/0xc90 [ 32.994213] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.999246] ? kfree+0x1e9/0x260 [ 33.002631] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 33.008445] ? map_update_elem+0x127/0xc90 [ 33.012701] do_group_exit+0x16f/0x430 executing program executing program executing program executing program executing program [ 33.016597] ? bpf_prog_get+0x20/0x20 [ 33.020415] ? __ia32_sys_exit+0x50/0x50 [ 33.024773] ? do_syscall_64+0x92/0x800 [ 33.028764] __x64_sys_exit_group+0x3e/0x50 [ 33.033101] do_syscall_64+0x1b1/0x800 [ 33.036998] ? syscall_slow_exit_work+0x4f0/0x4f0 [ 33.041852] ? syscall_return_slowpath+0x5c0/0x5c0 [ 33.046798] ? syscall_return_slowpath+0x30f/0x5c0 [ 33.051748] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 33.057125] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 33.061983] entry_SYSCALL_64_after_hwframe+0x49/0xbe executing program executing program executing program executing program executing program [ 33.067177] RIP: 0033:0x441ca9 [ 33.070372] RSP: 002b:00007ffcbff65518 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 33.078085] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441ca9 [ 33.085392] RDX: 0000000000441ca9 RSI: 0000000000000020 RDI: 0000000000000000 [ 33.092670] RBP: 0000000000000000 R08: 0000000000000006 R09: 0000000000007c85 [ 33.099943] R10: 0000000000000006 R11: 0000000000000202 R12: 0000000000000004 [ 33.107216] R13: 0000000000007c85 R14: 0000000000000000 R15: 0000000000000000 [ 33.115046] Dumping ftrace buffer: [ 33.118588] (ftrace buffer empty) [ 33.122445] Kernel Offset: disabled [ 33.126065] Rebooting in 86400 seconds..