# CVE-2026-64071: nvme-pci: fix use-after-free in nvme\_free\_host\_mem()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 4, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-07-19T15:39:47.162Z
- **Modified:** 2026-11-06T17:18:35.980Z

## Who should check

- Anyone running Linux \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< 9525e3a6fbb1d126a22ab2ee86ddea25af581a7c; \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< 7c89f474005d8377525d2991930b7432ee193a52; \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< b35a13036755c5803168a7cb93bc66035c3e65b8
- Anyone running Linux 6.13

## Description

In the Linux kernel, the following vulnerability has been resolved:

nvme-pci: fix use-after-free in nvme\_free\_host\_mem()

nvme\_free\_host\_mem() frees dev-\>hmb\_sgt via dma\_free\_noncontiguous()
but never clears the pointer afterward.  This leads to a use-after-free
if nvme\_free\_host\_mem() is called twice in the same error path.

This can happen during nvme\_probe() when nvme\_setup\_host\_mem() succeeds
in allocating the HMB (setting dev-\>hmb\_sgt) but nvme\_set\_host\_mem()
fails with an I/O error:

  nvme\_setup\_host\_mem()
    nvme\_alloc\_host\_mem\_single()   -\> sets dev-\>hmb\_sgt
    nvme\_set\_host\_mem()            -\> fails with -EIO
    nvme\_free\_host\_mem()           -\> frees hmb\_sgt, but does NOT NULL it
    return error

  nvme\_probe() error path:
    nvme\_free\_host\_mem()           -\> dev-\>hmb\_sgt is stale, use-after-free

The second call dereferences the freed sgt, causing a NULL pointer
dereference in iommu\_dma\_free\_noncontiguous() when it accesses
sgt-\>sgl-\>dma\_address (the backing memory has been freed and zeroed).

This is reproducible on Thunderbolt-attached NVMe devices (e.g., OWC
Envoy Express behind a Dell WD22TB4 dock) where the device intermittently
returns I/O errors during HMB setup due to PCIe link instability.

 BUG: kernel NULL pointer dereference, address: 0000000000000010
 RIP: 0010:iommu\_dma\_free\_noncontiguous+0x22/0x80
 Call Trace:
  \<TASK\>
  dma\_free\_noncontiguous+0x3b/0x130
  nvme\_free\_host\_mem+0x30/0xf0 \[nvme\]
  nvme\_probe.cold+0xcc/0x275 \[nvme\]
  local\_pci\_probe+0x43/0xa0
  pci\_device\_probe+0xeea/0x290
  really\_probe+0xf9/0x3b0
  \_\_driver\_probe\_device+0x8b/0x170
  driver\_probe\_device+0x24/0xd0
  \_\_driver\_attach\_async\_helper+0x6b/0x110
  async\_run\_entry\_fn+0x37/0x170
  process\_one\_work+0x1ac/0x3d0
  worker\_thread+0x1b8/0x360
  kthread+0xf7/0x130
  ret\_from\_fork+0x2d8/0x3a0
  ret\_from\_fork\_asm+0x1a/0x30
  \</TASK\>

Fix this by setting dev-\>hmb\_sgt to NULL after freeing it, so the
second call takes the multi-descriptor path which safely handles the
already-cleaned-up state.

## Affected and fixed versions

- Linux: \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< 9525e3a6fbb1d126a22ab2ee86ddea25af581a7c; \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< 7c89f474005d8377525d2991930b7432ee193a52; \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< b35a13036755c5803168a7cb93bc66035c3e65b8 (cvelist)
- Linux: 6.13 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-64071. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-64071.md
Affected: Linux >= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, < 9525e3a6fbb1d126a22ab2ee86ddea25af581a7c; >= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, < 7c89f474005d8377525d2991930b7432ee193a52; >= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, < b35a13036755c5803168a7cb93bc66035c3e65b8; Linux 6.13
Fixed in: Linux 9525e3a6fbb1d126a22ab2ee86ddea25af581a7c, Linux 7c89f474005d8377525d2991930b7432ee193a52

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-64071 being exploited?

There is no confirmed exploitation: CVE-2026-64071 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-64071?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-64071?

Linux \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< 9525e3a6fbb1d126a22ab2ee86ddea25af581a7c; \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< 7c89f474005d8377525d2991930b7432ee193a52; \>= 63a5c7a4b4c49ad86c362e9f555e6f343804ee1d, \< b35a13036755c5803168a7cb93bc66035c3e65b8; Linux 6.13.

### Is there a fix for CVE-2026-64071?

Yes. Fixed in Linux 9525e3a6fbb1d126a22ab2ee86ddea25af581a7c, Linux 7c89f474005d8377525d2991930b7432ee193a52. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-64071?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/9525e3a6fbb1d126a22ab2ee86ddea25af581a7c>
- patch: <https://git.kernel.org/stable/c/7c89f474005d8377525d2991930b7432ee193a52>
- patch: <https://git.kernel.org/stable/c/b35a13036755c5803168a7cb93bc66035c3e65b8>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-64071>

HTML: <https://flawdb.com/CVE-2026-64071> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-64071>
