[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <168512525398.2749591.3621689713936978562.b4-ty@google.com>
Date: Thu, 1 Jun 2023 18:20:56 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: Protect vcpu->pid dereference via debugfs with RCU
On Sat, 11 Feb 2023 01:07:19 +0000, Sean Christopherson wrote:
> Wrap the vcpu->pid dereference in the debugfs hook vcpu_get_pid() with
> proper RCU read (un)lock. Unlike the code in kvm_vcpu_ioctl(),
> vcpu_get_pid() is not a simple access; the pid pointer is passed to
> pid_nr() and fully dereferenced if the pointer is non-NULL.
>
> Failure to acquire RCU could result in use-after-free of the old pid if
> a different task invokes KVM_RUN and puts the last reference to the old
> vcpu->pid between vcpu_get_pid() reading the pointer and dereferencing it
> in pid_nr().
>
> [...]
Applied to kvm-x86 generic, thanks!
[1/1] KVM: Protect vcpu->pid dereference via debugfs with RCU
https://github.com/kvm-x86/linux/commit/76021e96d781
--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes
Powered by blists - more mailing lists