Bugzilla – Bug 1161154
VUL-0: CVE-2019-3016: kernel-source: information leak within a KVM guest
Last modified: 2022-12-23 11:53:07 UTC
From: John Haxby <email@example.com>
Subject: [oss-security] CVE-2019-3016: information leak within a KVM guest
Date: Thu, 30 Jan 2020 18:00:03 +0000
The problem is missing TLB flushes which potentially allows a process in a KVM guest to access memory locations within that guest that it should not have access to.
The problem is limited to host kernels 4.10 onwards with guest kernels running 4.16 onwards and PV TLB exposed to the guests. Additionally, the problem mainly affects AMD processors but we cannot rule out Intel CPUs.
From the patch cover note:
> The KVM hypervisor may provide a guest with ability to defer remote TLB
> flush when the remote VCPU is not running. When this feature is used,
> the TLB flush will happen only when the remote VPCU is scheduled to run
> again. This will avoid unnecessary (and expensive) IPIs.
> Under certain circumstances, when a guest initiates such deferred action,
> the hypervisor may miss the request. It is also possible that the guest
> may mistakenly assume that it has already marked remote VCPU as needing a
> flush when in fact that request had already been processed by the hypervisor.
> In both cases this will result in an invalid translation being present in a
> vCPU, potentially allowing accesses to memory locations in that guest's
> address space that should not be accessible.
> Note that only intra-guest memory is vulnerable.
> The attached patches address both of these problems:
> 1. The first patch makes sure the hypervisor doesn't accidentally clear
> guest's remote flush request
> 2. The rest of the patches prevent the race between hypervisor
> acknowledging a remote flush request and guest issuing a new one.
Part of the attached patches were discovered independently and made public on 2019-01-16 although it was our considered opinion that the security implications of this were not at all obvious so we kept the embargo.
The original patches posted to linux-distros broke ARM so I'm attaching the v2 patches. These will be heading to the mainline kernel shortly.
Created attachment 828769 [details]
(In reply to Marcus Meissner from comment #20)
> Created attachment 828769 [details]
Backported and pushed these patches for inclusion into SLE15-SP2 branch.
Older branches are not affected by this bug.
Patches now also backported and pushed to the stable and master branch.
Nothing left to do, assigning back.