]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Reload pit counters for all channels when restoring state
authorAndrew Honig <ahonig@google.com>
Wed, 18 Nov 2015 22:50:23 +0000 (14:50 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:45:59 +0000 (15:45 -0700)
commit51488a3d0daa734f00b76b89d91781f7ba23d6b1
tree6607f8e5e814feb3c9ed0da447912e43ea5ceb09
parente2fac9d64f293a02efced292093a5ac20edf8ad7
KVM: x86: Reload pit counters for all channels when restoring state

Orabug: 23331042

[ Upstream commit 0185604c2d82c560dab2f2933a18f797e74ab5a8 ]

Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash.  This will ensure
that 0 values are converted to 65536 as per the spec.

This is CVE-2015-7513.

Signed-off-by: Andy Honig <ahonig@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 90352f3f473a29db1289ec31facc1ac18cc66e9e)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
arch/x86/kvm/x86.c