KVM: nSVM: Reject KVM_SET_NESTED_STATE if L1 has EFER.LMA=1 && EFER.LME=0
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: KVM: nSVM: Reject KVM_SET_NESTED_STATE if L1 has EFER.LMA=1 && EFER.LME=0 Reject KVM_SET_NESTED_STATE if the incoming L1 host state has what is effectively an impossible EFER combination of LMA=1 but LME=0, i.e. if the state says long mode is active but not enabled. Unlike VMX, SVM doesn't have an explicit consistent check for the illegal combination; presumably hardware simply ignores EFER.LMA if EFER.LME=0. Unfortunately, KVM doesn't ignore EFER.LMA in this case and consumes the illegal state when constructing the shadow MMU for L2. E.g. if userspace also clears CR4.PAE, then kvm_calc_cpu_role() will compute a role with 4 or 5 levels of paging, but shadow_mmu_init_context() will wire up the MMU to use the paging32 template, which maxes out its levels at 2. Note, the "real badness" is effectively the same as what happened with the nVMX bug fixed by commit 112e66017bff ("KVM: nVMX: add missing consistency checks for CR0 and CR4"). Unfortunately, the sanity check added by commit 72e2fb24a0b0 ("KVM: x86/mmu: Bug the VM if a vCPU ends up in long mode without PAE enabled") doesn't work for this case, since L2 state is active at the time of the page fault, but it's L1 that has the bad state.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from cc440cdad5b7a4c1de12dace725209eb3e0cf663, before db914162770d60faaff53b3ed68e4785ac219072; from cc440cdad5b7a4c1de12dace725209eb3e0cf663, before fb11e2b98cb543df5b7e955a991e72163d902fa9; from cc440cdad5b7a4c1de12dace725209eb3e0cf663, before bd10bd806e1a30a905a0595d6c5add3c2a05cc03; from cc440cdad5b7a4c1de12dace725209eb3e0cf663, before 08cb539fdd19ea7093af55c6b97d4d7a198aa247; from cc440cdad5b7a4c1de12dace725209eb3e0cf663, before c0b29d523ef363d1d7ccfb3199f0126b22a61f66; from cc440cdad5b7a4c1de12dace725209eb3e0cf663, before 98362865bb626bb5e76cede98555d7cd4fefc016; and 2 more | db914162770d60faaff53b3ed68e4785ac219072; fb11e2b98cb543df5b7e955a991e72163d902fa9; bd10bd806e1a30a905a0595d6c5add3c2a05cc03; 08cb539fdd19ea7093af55c6b97d4d7a198aa247 |
| Linux Linux | Software | 5.8 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 8 sources for this flaw, none tagged as a vendor patch.