KVM: riscv: Fix NACL hfence entry update order
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.18.55, 7.2.9
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: KVM: riscv: Fix NACL hfence entry update order The SBI v3.0 specification (section 15.1.2) requires a nested HFENCE entry to be populated as follows: 1) find an unused entry with Config.Pending == 0 2) update the Page_Number and Page_Count words 3) update the Config word with Config.Pending set __kvm_riscv_nacl_hfence() writes the Config word first, so the SBI implementation (or NACL hardware) can observe a pending entry with pnum/pcount values left over from the previous use of that entry, resulting in incorrect TLB flush ranges. Write pnum and pcount first and the Config word last. Since the consumer is an external agent on coherent shared memory, use WRITE_ONCE() to stop the compiler from reordering the stores and smp_wmb() to make the parameter words globally visible before the Pending bit is set.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From d466c19cead5904d4d5d92adb2b213b411d3b849 · fixed in d6de766d8d26d71b714f548192099112def50a9c; From d466c19cead5904d4d5d92adb2b213b411d3b849 · fixed in 6da466502621381fa88a6684290923d25c559266; From d466c19cead5904d4d5d92adb2b213b411d3b849 · fixed in b3d346838ec65fac7fd83f5dbcedd13cadfffddb
- Linux Linux
6.13
- KernelLinux
From 6.13.0 · fixed in 6.18.55; From 6.19.0 · fixed in 7.2.9