Description
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.
Published: 2026-10-18
Score: n/a
EPSS: n/a
KEV: No
Impact: Kernel Memory Corruption
Action: Update Kernel
AI Analysis

Impact

The flaw stems from the Linux kernel’s KVM module for RISC‑V incorrectly ordering writes to the NACL HFENCE data structure. The patch reveals that the kernel writes the Config word before setting the Page_Number and Page_Count, allowing a hardware or SBI implementation to observe a pending entry with stale page numbers. This can cause the TLB to be flushed for incorrect ranges, potentially leading to kernel memory corruption or loss of data consistency. The weakness is a race condition due to improper memory ordering (CWE-362).

Affected Systems

All Linux kernels that enable KVM on RISC‑V with the NACL HFENCE feature have been affected before the patch was merged. The vulnerability is present in kernels prior to commit 6da4665 and applies to systems running those kernels on RISC‑V hardware. The fix is incorporated in Linux kernel version 6.7 and later releases.

Risk and Exploitability

The CVSS vector is not disclosed, and EPSS is not available, so the risk cannot be quantified. This issue is not listed in the CISA KEV catalog. An attacker would need to execute code with privileged KVM access or manipulate the HFENCE entries, which typically requires local or privileged guest control. Based on the description, it is inferred that a successful exploitation could lead to a denial of service or kernel corruption, but the lack of public exploits suggests a moderate risk.

Generated by OpenCVE AI on October 18, 2026 at 23:00 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Patch to the latest Linux kernel or apply commit 6da4665 that fixes the HFENCE ordering.
  • If a kernel upgrade cannot be applied immediately, disable the NACL HFENCE feature in the KVM configuration to prevent the vulnerability from being exercised.
  • Reboot the system or reload the kvm_riscv module to ensure the updated code paths are active.

Generated by OpenCVE AI on October 18, 2026 at 23:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 18 Oct 2026 23:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Sun, 18 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Description 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.
Title KVM: riscv: Fix NACL hfence entry update order
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-18T15:20:10.591Z

Reserved: 2026-09-25T10:25:14.361Z

Link: CVE-2026-98639

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:17.020

Modified: 2026-10-18T16:17:17.020

Link: CVE-2026-98639

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-18T23:15:14Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')