Skip to content
Heist/ feed
Back to feed
UnratedFix available

KVM: riscv: Fix NACL hfence entry update order

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.18.55, 7.2.9
CVEs
CVE-2026-98639
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 23:30 UTC · Revision 1

Source evidence

KVM: riscv: Fix NACL hfence entry update order

core-osv · Original source

Published 18 Oct 2026, 15:20 UTC

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.

osv:CVE-2026-98639

Kernel

Fixed versions: 6.18.55, 7.2.9

Complete source record
{
  "id": "baf5df1b2a62e372e2712f9d8194433a24af3768dadaa5ca5ac099617c8290a4",
  "url": "https://osv.dev/vulnerability/CVE-2026-98639",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "KVM: riscv: Fix NACL hfence entry update order",
    "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.",
    "evidence": "osv:CVE-2026-98639",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.18.55",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.2.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98639",
      "aliases": [
        "CVE-2026-98639"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d466c19cead5904d4d5d92adb2b213b411d3b849"
                },
                {
                  "fixed": "d6de766d8d26d71b714f548192099112def50a9c"
                },
                {
                  "fixed": "6da466502621381fa88a6684290923d25c559266"
                },
                {
                  "fixed": "b3d346838ec65fac7fd83f5dbcedd13cadfffddb"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98639.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.55"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98639.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.163710166Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/6da466502621381fa88a6684290923d25c559266",
        "https://git.kernel.org/stable/c/b3d346838ec65fac7fd83f5dbcedd13cadfffddb",
        "https://git.kernel.org/stable/c/d6de766d8d26d71b714f548192099112def50a9c",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98639.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98639",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98639.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98639",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 499256,
  "published_at": "2026-10-18T15:20:10.591+00:00"
}