New issue
Advanced search Search tips

Issue 774997 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Security



Sign in to add a comment

CVE-2017-12188: KVM: nEPT out of bounds access

Project Member Reported by mnissler@chromium.org, Oct 16 2017

Issue description

Per https://www.spinics.net/lists/kvm/msg156651.html:

Due to a combination of a bug in nEPT (patch 1), and a broken safety
net elsewhere in the MMU code (patch 2), a malicious guest could use
nested EPT to overwrite kernel memory.  In particular, the arrays in
struct guest_walker could be accessed with index -1 and the "level" and
"max_level" fields overwritten:

struct guest_walker {
        int level;
        unsigned max_level;
        gfn_t table_gfn[PT_MAX_FULL_LEVELS];
	...
}

Because the level field is used as an index into array, it is at least
possible to overwrite the kernel stack and this should be treated as a
possible guest-to-host escape on Intel hosts with nested virtualization
enabled.

While the incorrect code in patch 1 is present since Linux 3.12, the
bug only affects Linux kernels 4.6 and newer.  Therefore, stable kernels
only need to apply the second patch, which has the advantage of applying
more cleanly.

The bug was discovered by Ladislav (Ladi) Prosek from Red Hat.


Containers folks, can you please make sure we apply the patch?
 

Comment 1 by groeck@chromium.org, Oct 16 2017

Owner: groeck@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by groeck@chromium.org, Oct 16 2017

Labels: M-63

Comment 3 by groeck@chromium.org, Oct 16 2017

Summary: CVE-2017-12188: KVM: nEPT out of bounds access (was: KVM: nEPT out of bounds access)
CVE-2017-12188

upstream:
829ee279aed4 KVM: MMU: always terminate page walks at level 1
fd19d3b45164 KVM: nVMX: update last_nonleaf_level when initializing nested EPT

Status: WontFix (was: Assigned)
829ee279aed4 fixes commit 6bb69c9b69c31 which is not in chromeos-4.4. This is the "second patch" referenced in the description. This matches the description which states that only 4.6 is affected. Both patches are available in the upcoming v4.14 and thus in chromeos-4.14. Given that, there is nothing to do.

Sign in to add a comment