[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 22.260432] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 26.126080] random: sshd: uninitialized urandom read (32 bytes read) [ 26.541100] random: sshd: uninitialized urandom read (32 bytes read) [ 27.239079] random: sshd: uninitialized urandom read (32 bytes read) [ 34.805829] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.18' (ECDSA) to the list of known hosts. [ 40.313641] random: sshd: uninitialized urandom read (32 bytes read) 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 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 [ 43.501667] irq bypass consumer (token (ptrval)) registration fails: -16 [ 43.533766] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program executing program executing program [ 43.624057] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program executing program executing program executing program [ 43.727353] irq bypass consumer (token (ptrval)) registration fails: -16 [ 43.742976] irq bypass consumer (token (ptrval)) registration fails: -16 [ 43.761301] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program [ 43.796248] irq bypass consumer (token (ptrval)) registration fails: -16 [ 43.825821] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program [ 43.854887] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program executing program [ 43.933656] irq bypass consumer (token (ptrval)) registration fails: -16 [ 43.957332] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program [ 44.006331] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program [ 44.061735] irq bypass consumer (token (ptrval)) registration fails: -16 executing program executing program executing program [ 44.117881] irq bypass consumer (token (ptrval)) registration fails: -16 [ 44.151521] ================================================================== [ 44.158983] BUG: KASAN: use-after-free in irq_bypass_register_consumer+0x4b1/0x530 executing program [ 44.166675] Read of size 8 at addr ffff8801c7026178 by task syz-executor869/4500 [ 44.174181] [ 44.175794] CPU: 0 PID: 4500 Comm: syz-executor869 Not tainted 4.17.0-rc4+ #37 [ 44.183131] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.192461] Call Trace: [ 44.195121] dump_stack+0x1b9/0x294 [ 44.198728] ? dump_stack_print_info.cold.2+0x52/0x52 [ 44.203903] ? printk+0x9e/0xba [ 44.207171] ? kmsg_dump_rewind_nolock+0xe4/0xe4 [ 44.211929] ? kasan_check_write+0x14/0x20 [ 44.216162] print_address_description+0x6c/0x20b [ 44.221004] ? irq_bypass_register_consumer+0x4b1/0x530 [ 44.226351] kasan_report.cold.7+0x242/0x2fe [ 44.230747] __asan_report_load8_noabort+0x14/0x20 [ 44.235654] irq_bypass_register_consumer+0x4b1/0x530 [ 44.240826] ? __disconnect+0x1b0/0x1b0 [ 44.244810] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 44.250333] kvm_irqfd+0x1599/0x1ec0 [ 44.254040] ? kvm_eventfd_init+0x2a0/0x2a0 [ 44.258357] ? __lock_acquire+0x7f5/0x5140 [ 44.262580] ? do_raw_spin_unlock+0x9e/0x2e0 executing program [ 44.267315] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 44.271908] ? lock_downgrade+0x8e0/0x8e0 [ 44.276033] ? lock_release+0xa10/0xa10 [ 44.279996] ? check_same_owner+0x320/0x320 [ 44.284303] ? __might_sleep+0x95/0x190 [ 44.288261] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 44.293793] ? _copy_from_user+0xdf/0x150 [ 44.297929] kvm_vm_ioctl+0xf84/0x1d90 [ 44.301798] ? drop_futex_key_refs.isra.13+0x6d/0xe0 [ 44.306882] ? futex_wake+0x2f6/0x750 [ 44.310660] ? pick_next_task_fair+0x973/0x1660 executing program [ 44.315311] ? kvm_set_memory_region+0x50/0x50 [ 44.319875] ? get_futex_key+0x1e90/0x1e90 [ 44.324091] ? find_held_lock+0x36/0x1c0 [ 44.328142] ? lock_downgrade+0x8e0/0x8e0 [ 44.332271] ? finish_task_switch+0x182/0x810 [ 44.336749] ? __sanitizer_cov_trace_switch+0x53/0x90 [ 44.342702] ? do_futex+0x249/0x27d0 [ 44.346395] ? kasan_check_read+0x11/0x20 [ 44.350523] ? graph_lock+0x170/0x170 [ 44.354313] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 44.358880] ? compat_start_thread+0x80/0x80 [ 44.363278] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.367762] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.372759] ? exit_robust_list+0x290/0x290 [ 44.377071] ? find_held_lock+0x36/0x1c0 [ 44.381116] ? lock_downgrade+0x8e0/0x8e0 [ 44.385246] ? kasan_check_read+0x11/0x20 [ 44.389375] ? rcu_is_watching+0x85/0x140 [ 44.393504] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 44.398687] ? expand_files.part.8+0x9a0/0x9a0 [ 44.403248] ? kasan_check_read+0x11/0x20 [ 44.407381] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 44.411956] ? kvm_set_memory_region+0x50/0x50 executing program [ 44.416523] do_vfs_ioctl+0x1cf/0x16a0 [ 44.420392] ? ioctl_preallocate+0x2e0/0x2e0 [ 44.424781] ? fget_raw+0x20/0x20 [ 44.428216] ? kmem_cache_free+0x25c/0x2d0 [ 44.432449] ? __x64_sys_futex+0x477/0x680 [ 44.436664] ? exit_to_usermode_loop+0x87/0x310 [ 44.441317] ? do_futex+0x27d0/0x27d0 [ 44.445103] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 44.450799] ? security_file_ioctl+0x94/0xc0 [ 44.455193] ksys_ioctl+0xa9/0xd0 [ 44.458628] __x64_sys_ioctl+0x73/0xb0 [ 44.462496] do_syscall_64+0x1b1/0x800 [ 44.466365] ? finish_task_switch+0x1ca/0x810 [ 44.470841] ? syscall_return_slowpath+0x5c0/0x5c0 [ 44.475758] ? syscall_return_slowpath+0x30f/0x5c0 [ 44.480671] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 44.486036] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.490877] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.496057] RIP: 0033:0x445879 [ 44.499225] RSP: 002b:00007fd59da6ada8 EFLAGS: 00000297 ORIG_RAX: 0000000000000010 [ 44.506913] RAX: ffffffffffffffda RBX: 00000000006dac64 RCX: 0000000000445879 [ 44.514178] RDX: 0000000020018000 RSI: 000000004020ae76 RDI: 00000000000003fc [ 44.521430] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 44.528690] R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dac60 [ 44.535956] R13: 6d766b2f7665642f R14: 00007fd59da6b9c0 R15: 0000000000000009 [ 44.543227] [ 44.544833] Allocated by task 4500: [ 44.548444] save_stack+0x43/0xd0 [ 44.551876] kasan_kmalloc+0xc4/0xe0 [ 44.555577] kmem_cache_alloc_trace+0x152/0x780 [ 44.560223] kvm_irqfd+0x187/0x1ec0 [ 44.563840] kvm_vm_ioctl+0xf84/0x1d90 [ 44.567713] do_vfs_ioctl+0x1cf/0x16a0 [ 44.571576] ksys_ioctl+0xa9/0xd0 [ 44.575007] __x64_sys_ioctl+0x73/0xb0 [ 44.578872] do_syscall_64+0x1b1/0x800 [ 44.582735] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.587897] [ 44.589499] Freed by task 25: [ 44.592584] save_stack+0x43/0xd0 [ 44.596014] __kasan_slab_free+0x11a/0x170 [ 44.600226] kasan_slab_free+0xe/0x10 [ 44.604006] kfree+0xd9/0x260 [ 44.607099] irqfd_shutdown+0x13a/0x1a0 [ 44.611052] process_one_work+0xc1e/0x1b50 [ 44.615264] worker_thread+0x1cc/0x1440 [ 44.619222] kthread+0x345/0x410 [ 44.622571] ret_from_fork+0x3a/0x50 [ 44.626261] [ 44.627865] The buggy address belongs to the object at ffff8801c7026000 [ 44.627865] which belongs to the cache kmalloc-512 of size 512 [ 44.640520] The buggy address is located 376 bytes inside of [ 44.640520] 512-byte region [ffff8801c7026000, ffff8801c7026200) [ 44.652370] The buggy address belongs to the page: [ 44.657277] page:ffffea00071c0980 count:1 mapcount:0 mapping:ffff8801c7026000 index:0x0 [ 44.665398] flags: 0x2fffc0000000100(slab) [ 44.669612] raw: 02fffc0000000100 ffff8801c7026000 0000000000000000 0000000100000006 [ 44.677479] raw: ffffea00071c3ca0 ffffea00071c51e0 ffff8801da800940 0000000000000000 [ 44.685422] page dumped because: kasan: bad access detected [ 44.691105] [ 44.692709] Memory state around the buggy address: [ 44.697624] ffff8801c7026000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.704961] ffff8801c7026080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.712300] >ffff8801c7026100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.719638] ^ [ 44.726892] ffff8801c7026180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.734230] ffff8801c7026200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 44.742176] ================================================================== [ 44.749514] Disabling lock debugging due to kernel taint [ 44.755046] Kernel panic - not syncing: panic_on_warn set ... [ 44.755046] [ 44.762391] CPU: 0 PID: 4500 Comm: syz-executor869 Tainted: G B 4.17.0-rc4+ #37 [ 44.771117] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.780451] Call Trace: [ 44.783021] dump_stack+0x1b9/0x294 [ 44.786629] ? dump_stack_print_info.cold.2+0x52/0x52 [ 44.791798] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 44.796533] ? irq_bypass_register_consumer+0x450/0x530 [ 44.801877] panic+0x22f/0x4de [ 44.805046] ? add_taint.cold.5+0x16/0x16 [ 44.809175] ? do_raw_spin_unlock+0x9e/0x2e0 [ 44.813561] ? do_raw_spin_unlock+0x9e/0x2e0 [ 44.817948] ? irq_bypass_register_consumer+0x4b1/0x530 [ 44.823289] kasan_end_report+0x47/0x4f [ 44.827249] kasan_report.cold.7+0x76/0x2fe [ 44.831636] __asan_report_load8_noabort+0x14/0x20 [ 44.836544] irq_bypass_register_consumer+0x4b1/0x530 [ 44.841712] ? __disconnect+0x1b0/0x1b0 [ 44.845671] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 44.851197] kvm_irqfd+0x1599/0x1ec0 [ 44.854894] ? kvm_eventfd_init+0x2a0/0x2a0 [ 44.859204] ? __lock_acquire+0x7f5/0x5140 [ 44.863438] ? do_raw_spin_unlock+0x9e/0x2e0 [ 44.867837] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 44.872407] ? lock_downgrade+0x8e0/0x8e0 [ 44.876531] ? lock_release+0xa10/0xa10 [ 44.880493] ? check_same_owner+0x320/0x320 [ 44.884793] ? __might_sleep+0x95/0x190 [ 44.888745] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 44.894259] ? _copy_from_user+0xdf/0x150 [ 44.898560] kvm_vm_ioctl+0xf84/0x1d90 [ 44.902428] ? drop_futex_key_refs.isra.13+0x6d/0xe0 [ 44.907509] ? futex_wake+0x2f6/0x750 [ 44.911296] ? pick_next_task_fair+0x973/0x1660 [ 44.915942] ? kvm_set_memory_region+0x50/0x50 [ 44.920511] ? get_futex_key+0x1e90/0x1e90 [ 44.924727] ? find_held_lock+0x36/0x1c0 [ 44.928780] ? lock_downgrade+0x8e0/0x8e0 [ 44.932906] ? finish_task_switch+0x182/0x810 [ 44.937378] ? __sanitizer_cov_trace_switch+0x53/0x90 [ 44.942549] ? do_futex+0x249/0x27d0 [ 44.946240] ? kasan_check_read+0x11/0x20 [ 44.950376] ? graph_lock+0x170/0x170 [ 44.954159] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 44.958721] ? compat_start_thread+0x80/0x80 [ 44.963115] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.967590] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.972580] ? exit_robust_list+0x290/0x290 [ 44.976879] ? find_held_lock+0x36/0x1c0 [ 44.980919] ? lock_downgrade+0x8e0/0x8e0 [ 44.985046] ? kasan_check_read+0x11/0x20 [ 44.989169] ? rcu_is_watching+0x85/0x140 [ 44.993294] ? rcu_bh_force_quiescent_state+0x20/0x20 [ 44.998468] ? expand_files.part.8+0x9a0/0x9a0 [ 45.003028] ? kasan_check_read+0x11/0x20 [ 45.007155] ? do_raw_spin_trylock+0x1b0/0x1b0 [ 45.011725] ? kvm_set_memory_region+0x50/0x50 [ 45.016287] do_vfs_ioctl+0x1cf/0x16a0 [ 45.020153] ? ioctl_preallocate+0x2e0/0x2e0 [ 45.024540] ? fget_raw+0x20/0x20 [ 45.027980] ? kmem_cache_free+0x25c/0x2d0 [ 45.032194] ? __x64_sys_futex+0x477/0x680 [ 45.036408] ? exit_to_usermode_loop+0x87/0x310 [ 45.041056] ? do_futex+0x27d0/0x27d0 [ 45.044921] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 45.050446] ? security_file_ioctl+0x94/0xc0 [ 45.054830] ksys_ioctl+0xa9/0xd0 [ 45.058261] __x64_sys_ioctl+0x73/0xb0 [ 45.062144] do_syscall_64+0x1b1/0x800 [ 45.066011] ? finish_task_switch+0x1ca/0x810 [ 45.070483] ? syscall_return_slowpath+0x5c0/0x5c0 [ 45.075475] ? syscall_return_slowpath+0x30f/0x5c0 [ 45.080383] ? entry_SYSCALL_64_after_hwframe+0x59/0xbe [ 45.085733] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 45.090559] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 45.095727] RIP: 0033:0x445879 [ 45.098894] RSP: 002b:00007fd59da6ada8 EFLAGS: 00000297 ORIG_RAX: 0000000000000010 [ 45.106582] RAX: ffffffffffffffda RBX: 00000000006dac64 RCX: 0000000000445879 [ 45.113835] RDX: 0000000020018000 RSI: 000000004020ae76 RDI: 00000000000003fc [ 45.121081] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 45.128587] R10: 0000000000000000 R11: 0000000000000297 R12: 00000000006dac60 [ 45.135835] R13: 6d766b2f7665642f R14: 00007fd59da6b9c0 R15: 0000000000000009 [ 45.143561] Dumping ftrace buffer: [ 45.147074] (ftrace buffer empty) [ 45.150763] Kernel Offset: disabled [ 45.154369] Rebooting in 86400 seconds..