random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/l1tf.html for details. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN CPU: 1 PID: 4514 Comm: syz-executor179 Not tainted 4.18.0+ #103 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2611 [inline] RIP: 0010:context_switch kernel/sched/core.c:2788 [inline] RIP: 0010:__schedule+0xf48/0x1df0 kernel/sched/core.c:3471 Code: 4c 89 e8 48 c1 e8 03 42 80 3c 30 00 0f 85 94 09 00 00 4d 8b 6d 00 4d 85 ed 0f 84 84 f7 ff ff 49 8d 7d 10 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 74 a6 e8 cc a6 0a fb eb 9f 4c 89 e6 48 89 df e8 cf RSP: 0018:ffff8801d99a6a30 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff8801abd18780 RCX: 1ffff1003839088f RDX: 0000000040000000 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff8801d99a6c00 R08: ffff8801abd18780 R09: fffff520003bea47 R10: fffff520003bea47 R11: ffffc90001df523b R12: ffff8801d9858640 R13: dead000000000100 R14: dffffc0000000000 R15: ffff8801db12cc40 FS: 0000000000000000(0000) GS:ffff8801db100000(0000) knlGS:0000000000000000 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f7f3bc7f CR3: 0000000007e6a000 CR4: 00000000001426e0 Call Trace: preempt_schedule_common+0x22/0x60 kernel/sched/core.c:3595 _cond_resched+0x1d/0x30 kernel/sched/core.c:4961 __mutex_lock_common kernel/locking/mutex.c:908 [inline] __mutex_lock+0x13d/0x1700 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 arch_jump_label_transform+0x1b/0x40 arch/x86/kernel/jump_label.c:112 __jump_label_update+0x16e/0x1a0 kernel/jump_label.c:375 jump_label_update+0x151/0x2e0 kernel/jump_label.c:760 __static_key_slow_dec_cpuslocked+0xb8/0x210 kernel/jump_label.c:205 __static_key_slow_dec kernel/jump_label.c:215 [inline] static_key_slow_dec+0x63/0xa0 kernel/jump_label.c:229 kvm_arch_vcpu_uninit+0x18e/0x1d0 arch/x86/kvm/x86.c:8803 kvm_vcpu_uninit+0x44/0x90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:336 vmx_free_vcpu+0x23a/0x300 arch/x86/kvm/vmx.c:10919 kvm_arch_vcpu_free arch/x86/kvm/x86.c:8419 [inline] kvm_free_vcpus arch/x86/kvm/x86.c:8869 [inline] kvm_arch_destroy_vm+0x365/0x7c0 arch/x86/kvm/x86.c:8966 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:747 [inline] kvm_put_kvm+0x73f/0x1060 arch/x86/kvm/../../../virt/kvm/kvm_main.c:768 kvm_vm_release+0x42/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:779 __fput+0x39b/0x860 fs/file_table.c:251 ____fput+0x15/0x20 fs/file_table.c:282 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1ae4/0x26e0 kernel/exit.c:865 do_group_exit+0x177/0x440 kernel/exit.c:968 __do_sys_exit_group kernel/exit.c:979 [inline] __se_sys_exit_group kernel/exit.c:977 [inline] __ia32_sys_exit_group+0x3e/0x50 kernel/exit.c:977 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f3bca9 Code: Bad RIP value. RSP: 002b:00000000ff9d61cc EFLAGS: 00000296 ORIG_RAX: 00000000000000fc RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080eb2b8 RDX: 0000000000000000 RSI: 00000000080d5d18 RDI: 00000000080eb2c0 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: Dumping ftrace buffer: (ftrace buffer empty) ====================================================== WARNING: possible circular locking dependency detected 4.18.0+ #103 Not tainted ------------------------------------------------------ syz-executor179/4514 is trying to acquire lock: 000000005c73c312 ((console_sem).lock){-...}, at: down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 but task is already holding lock: 00000000cffe1a2d (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1821 [inline] 00000000cffe1a2d (&rq->lock){-.-.}, at: __schedule+0x24d/0x1df0 kernel/sched/core.c:3409 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->lock){-.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 rq_lock kernel/sched/sched.h:1821 [inline] task_fork_fair+0x93/0x680 kernel/sched/fair.c:9574 sched_fork+0x44b/0xbd0 kernel/sched/core.c:2353 copy_process.part.36+0x1c7c/0x70d0 kernel/fork.c:1804 copy_process kernel/fork.c:1647 [inline] _do_fork+0x291/0x1220 kernel/fork.c:2130 kernel_thread+0x34/0x40 kernel/fork.c:2189 rest_init+0x22/0xe4 init/main.c:408 start_kernel+0x913/0x94e init/main.c:739 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:452 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:433 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242 -> #1 (&p->pi_lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 try_to_wake_up+0xd2/0x1250 kernel/sched/core.c:1960 wake_up_process+0x10/0x20 kernel/sched/core.c:2123 __up.isra.1+0x1c0/0x2a0 kernel/locking/semaphore.c:262 up+0x13c/0x1c0 kernel/locking/semaphore.c:187 __up_console_sem+0xbe/0x1b0 kernel/printk/printk.c:242 console_unlock+0x506/0x10d0 kernel/printk/printk.c:2427 do_con_write+0x1375/0x23d0 drivers/tty/vt/vt.c:2770 con_write+0x25/0xc0 drivers/tty/vt/vt.c:3119 process_output_block drivers/tty/n_tty.c:580 [inline] n_tty_write+0x6c1/0x11a0 drivers/tty/n_tty.c:2317 do_tty_write drivers/tty/tty_io.c:958 [inline] tty_write+0x3f1/0x880 drivers/tty/tty_io.c:1042 __vfs_write+0x117/0x9d0 fs/read_write.c:485 vfs_write+0x1f8/0x560 fs/read_write.c:549 ksys_write+0x101/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 ((console_sem).lock){-...}: lock_acquire+0x1e4/0x4f0 kernel/locking/lockdep.c:3901 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:225 console_trylock+0x15/0xa0 kernel/printk/printk.c:2246 console_trylock_spinning kernel/printk/printk.c:1648 [inline] vprintk_emit+0x31f/0x910 kernel/printk/printk.c:1923 vprintk_default+0x28/0x30 kernel/printk/printk.c:1965 vprintk_func+0x7a/0x117 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1998 kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:251 notifier_call_chain+0x180/0x390 kernel/notifier.c:93 __atomic_notifier_call_chain kernel/notifier.c:183 [inline] atomic_notifier_call_chain+0x98/0x190 kernel/notifier.c:193 notify_die+0x1be/0x2e0 kernel/notifier.c:549 do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:559 general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1160 __fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] prepare_task_switch kernel/sched/core.c:2611 [inline] context_switch kernel/sched/core.c:2788 [inline] __schedule+0xf48/0x1df0 kernel/sched/core.c:3471 preempt_schedule_common+0x22/0x60 kernel/sched/core.c:3595 _cond_resched+0x1d/0x30 kernel/sched/core.c:4961 __mutex_lock_common kernel/locking/mutex.c:908 [inline] __mutex_lock+0x13d/0x1700 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 arch_jump_label_transform+0x1b/0x40 arch/x86/kernel/jump_label.c:112 __jump_label_update+0x16e/0x1a0 kernel/jump_label.c:375 jump_label_update+0x151/0x2e0 kernel/jump_label.c:760 __static_key_slow_dec_cpuslocked+0xb8/0x210 kernel/jump_label.c:205 __static_key_slow_dec kernel/jump_label.c:215 [inline] static_key_slow_dec+0x63/0xa0 kernel/jump_label.c:229 kvm_arch_vcpu_uninit+0x18e/0x1d0 arch/x86/kvm/x86.c:8803 kvm_vcpu_uninit+0x44/0x90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:336 vmx_free_vcpu+0x23a/0x300 arch/x86/kvm/vmx.c:10919 kvm_arch_vcpu_free arch/x86/kvm/x86.c:8419 [inline] kvm_free_vcpus arch/x86/kvm/x86.c:8869 [inline] kvm_arch_destroy_vm+0x365/0x7c0 arch/x86/kvm/x86.c:8966 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:747 [inline] kvm_put_kvm+0x73f/0x1060 arch/x86/kvm/../../../virt/kvm/kvm_main.c:768 kvm_vm_release+0x42/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:779 __fput+0x39b/0x860 fs/file_table.c:251 ____fput+0x15/0x20 fs/file_table.c:282 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1ae4/0x26e0 kernel/exit.c:865 do_group_exit+0x177/0x440 kernel/exit.c:968 __do_sys_exit_group kernel/exit.c:979 [inline] __se_sys_exit_group kernel/exit.c:977 [inline] __ia32_sys_exit_group+0x3e/0x50 kernel/exit.c:977 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 other info that might help us debug this: Chain exists of: (console_sem).lock --> &p->pi_lock --> &rq->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->lock); lock(&p->pi_lock); lock(&rq->lock); lock((console_sem).lock); *** DEADLOCK *** 4 locks held by syz-executor179/4514: #0: 0000000023efaa3a (cpu_hotplug_lock.rw_sem){++++}, at: __static_key_slow_dec kernel/jump_label.c:214 [inline] #0: 0000000023efaa3a (cpu_hotplug_lock.rw_sem){++++}, at: static_key_slow_dec+0x57/0xa0 kernel/jump_label.c:229 #1: 000000002c543266 (jump_label_mutex){+.+.}, at: __static_key_slow_dec_cpuslocked+0x82/0x210 kernel/jump_label.c:195 #2: 00000000cffe1a2d (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1821 [inline] #2: 00000000cffe1a2d (&rq->lock){-.-.}, at: __schedule+0x24d/0x1df0 kernel/sched/core.c:3409 #3: 000000007ba2a106 (rcu_read_lock){....}, at: atomic_notifier_call_chain+0x0/0x190 kernel/notifier.c:329 stack backtrace: CPU: 1 PID: 4514 Comm: syz-executor179 Not tainted 4.18.0+ #103 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_circular_bug.isra.34.cold.55+0x1bd/0x27d kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1862 [inline] check_prevs_add kernel/locking/lockdep.c:1975 [inline] validate_chain kernel/locking/lockdep.c:2416 [inline] __lock_acquire+0x3449/0x5020 kernel/locking/lockdep.c:3412 lock_acquire+0x1e4/0x4f0 kernel/locking/lockdep.c:3901 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:225 console_trylock+0x15/0xa0 kernel/printk/printk.c:2246 console_trylock_spinning kernel/printk/printk.c:1648 [inline] vprintk_emit+0x31f/0x910 kernel/printk/printk.c:1923 vprintk_default+0x28/0x30 kernel/printk/printk.c:1965 vprintk_func+0x7a/0x117 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1998 kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:251 notifier_call_chain+0x180/0x390 kernel/notifier.c:93 __atomic_notifier_call_chain kernel/notifier.c:183 [inline] atomic_notifier_call_chain+0x98/0x190 kernel/notifier.c:193 notify_die+0x1be/0x2e0 kernel/notifier.c:549 do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:559 general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1160 RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2611 [inline] RIP: 0010:context_switch kernel/sched/core.c:2788 [inline] RIP: 0010:__schedule+0xf48/0x1df0 kernel/sched/core.c:3471 Code: 4c 89 e8 48 c1 e8 03 42 80 3c 30 00 0f 85 94 09 00 00 4d 8b 6d 00 4d 85 ed 0f 84 84 f7 ff ff 49 8d 7d 10 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 74 a6 e8 cc a6 0a fb eb 9f 4c 89 e6 48 89 df e8 cf RSP: 0018:ffff8801d99a6a30 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff8801abd18780 RCX: 1ffff1003839088f RDX: 0000000040000000 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff8801d99a6c00 R08: ffff8801abd18780 R09: fffff520003bea47 R10: fffff520003bea47 R11: ffffc90001df523b R12: ffff8801d9858640 R13: dead000000000100 R14: dffffc0000000000 R15: ffff8801db12cc40 preempt_schedule_common+0x22/0x60 kernel/sched/core.c:3595 _cond_resched+0x1d/0x30 kernel/sched/core.c:4961 __mutex_lock_common kernel/locking/mutex.c:908 [inline] __mutex_lock+0x13d/0x1700 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 arch_jump_label_transform+0x1b/0x40 arch/x86/kernel/jump_label.c:112 __jump_label_update+0x16e/0x1a0 kernel/jump_label.c:375 jump_label_update+0x151/0x2e0 kernel/jump_label.c:760 __static_key_slow_dec_cpuslocked+0xb8/0x210 kernel/jump_label.c:205 __static_key_slow_dec kernel/jump_label.c:215 [inline] static_key_slow_dec+0x63/0xa0 kernel/jump_label.c:229 kvm_arch_vcpu_uninit+0x18e/0x1d0 arch/x86/kvm/x86.c:8803 kvm_vcpu_uninit+0x44/0x90 arch/x86/kvm/../../../virt/kvm/kvm_main.c:336 vmx_free_vcpu+0x23a/0x300 arch/x86/kvm/vmx.c:10919 kvm_arch_vcpu_free arch/x86/kvm/x86.c:8419 [inline] kvm_free_vcpus arch/x86/kvm/x86.c:8869 [inline] kvm_arch_destroy_vm+0x365/0x7c0 arch/x86/kvm/x86.c:8966  Lost 94 message(s)! ---[ end trace 45f641c8870cf8eb ]--- RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2611 [inline] RIP: 0010:context_switch kernel/sched/core.c:2788 [inline] RIP: 0010:__schedule+0xf48/0x1df0 kernel/sched/core.c:3471 Code: 4c 89 e8 48 c1 e8 03 42 80 3c 30 00 0f 85 94 09 00 00 4d 8b 6d 00 4d 85 ed 0f 84 84 f7 ff ff 49 8d 7d 10 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 74 a6 e8 cc a6 0a fb eb 9f 4c 89 e6 48 89 df e8 cf RSP: 0018:ffff8801d99a6a30 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff8801abd18780 RCX: 1ffff1003839088f RDX: 0000000040000000 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff8801d99a6c00 R08: ffff8801abd18780 R09: fffff520003bea47 R10: fffff520003bea47 R11: ffffc90001df523b R12: ffff8801d9858640 R13: dead000000000100 R14: dffffc0000000000 R15: ffff8801db12cc40 FS: 0000000000000000(0000) GS:ffff8801db100000(0000) knlGS:0000000000000000 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000f7f3bc7f CR3: 0000000007e6a000 CR4: 00000000001426e0