Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-13 Thread Paolo Bonzini
On 13/09/19 01:52, Sean Christopherson wrote: >>> >> Perhaps you could also add a comment like the one Paolo added when he >> made the same change in kvm_read_guest_virt? >> See commit 353c0956a618 ("KVM: x86: work around leak of uninitialized >> stack contents (CVE-2019-7222)"). > I have a better

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Sean Christopherson
On Thu, Sep 12, 2019 at 02:20:09PM -0700, Jim Mattson wrote: > On Wed, Sep 11, 2019 at 9:18 PM Fuqian Huang wrote: > > > > Emulation of VMPTRST can incorrectly inject a page fault > > when passed an operand that points to an MMIO address. > > The page fault will use uninitialized kernel stack

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Jim Mattson
On Wed, Sep 11, 2019 at 9:18 PM Fuqian Huang wrote: > > Emulation of VMPTRST can incorrectly inject a page fault > when passed an operand that points to an MMIO address. > The page fault will use uninitialized kernel stack memory > as the CR2 and error code. > > The right behavior would be to

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Vitaly Kuznetsov
Jim Mattson writes: > On Thu, Sep 12, 2019 at 1:51 AM Vitaly Kuznetsov wrote: >> >> Fuqian Huang writes: >> >> > Emulation of VMPTRST can incorrectly inject a page fault >> > when passed an operand that points to an MMIO address. >> > The page fault will use uninitialized kernel stack memory

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Jim Mattson
On Thu, Sep 12, 2019 at 1:51 AM Vitaly Kuznetsov wrote: > > Fuqian Huang writes: > > > Emulation of VMPTRST can incorrectly inject a page fault > > when passed an operand that points to an MMIO address. > > The page fault will use uninitialized kernel stack memory > > as the CR2 and error code.

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Fuqian Huang
Vitaly Kuznetsov 於 2019年9月12日週四 下午6:53寫道: > > Fuqian Huang writes: > > > Vitaly Kuznetsov 於 2019年9月12日週四 下午4:51寫道: > >> > >> Fuqian Huang writes: > >> > >> > Emulation of VMPTRST can incorrectly inject a page fault > >> > when passed an operand that points to an MMIO address. > >> > The page

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Vitaly Kuznetsov
Fuqian Huang writes: > Vitaly Kuznetsov 於 2019年9月12日週四 下午4:51寫道: >> >> Fuqian Huang writes: >> >> > Emulation of VMPTRST can incorrectly inject a page fault >> > when passed an operand that points to an MMIO address. >> > The page fault will use uninitialized kernel stack memory >> > as the

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Fuqian Huang
Vitaly Kuznetsov 於 2019年9月12日週四 下午4:51寫道: > > Fuqian Huang writes: > > > Emulation of VMPTRST can incorrectly inject a page fault > > when passed an operand that points to an MMIO address. > > The page fault will use uninitialized kernel stack memory > > as the CR2 and error code. > > > > The

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Vitaly Kuznetsov
Fuqian Huang writes: > Emulation of VMPTRST can incorrectly inject a page fault > when passed an operand that points to an MMIO address. > The page fault will use uninitialized kernel stack memory > as the CR2 and error code. > > The right behavior would be to abort the VM with a