[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef15a35b-3e69-7922-ceda-4a4867054a44@redhat.com>
Date: Fri, 20 Mar 2020 18:47:43 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: syzbot+00be5da1d75f1cc95f6b@...kaller.appspotmail.com,
Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH] KVM: x86: remove bogus user-triggerable WARN_ON
On 20/03/20 16:23, Thomas Gleixner wrote:
> Thomas Gleixner <tglx@...utronix.de> writes:
>
>> Paolo Bonzini <pbonzini@...hat.com> writes:
>>> The WARN_ON is essentially comparing a user-provided value with 0. It is
>>> trivial to trigger it just by passing garbage to KVM_SET_CLOCK. Guests
>>> can break if you do so, but if it hurts when you do like this just do not
>>> do it.
>>
>> Yes, it's a user provided value and it's completely unchecked. If that
>> value is bogus then the guest will go sideways because timekeeping is
>> completely busted. At least you should explain WHY you don't care.
>
> Or why it does not matter....
I can change the commit message to "Guests can break if you do so, but
the same applies to every KVM_SET_* ioctl". It's impossible to be sure
that userspace doesn't ever send a bogus KVM_SET_CLOCK and later
rectifies it with the right value.
Paolo
Powered by blists - more mailing lists