KEVWire

Security intelligence, with context.

Response snapshot Nov 5, 2026, 23:11 UTC

Back to the wire
Permalink
VulnerabilityCVE-2025-38338

Linux kernel: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()

In the Linux kernel, the following vulnerability has been resolved: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() Sometimes, when a file was read while it was being truncated by another NFS client, the kernel could deadlock because folio_unlock() was called twice, and the second call would XOR back the PG_locked flag.

At a glance

Exploited
Not known
Severity
7.8 High (CVSS 3.1)
Chance of exploitation
Not estimated
Sources
1 source

What to do

Check the vendor advisory for affected versions and fixes.

Read NVD CVE-2025-38338 (opens a new tab)

What happened

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

fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()

Sometimes, when a file was read while it was being truncated by another NFS client, the kernel could deadlock because folio_unlock() was called twice, and the second call would XOR back the PG_locked flag.

Most of the time (depending on the timing of the truncation), nobody notices the problem because folio_unlock() gets called three times, which flips PG_locked back off:

Continue reading

1. vfs_read, nfs_read_folio, ... nfs_read_add_folio, nfs_return_empty_folio 2. vfs_read, nfs_read_folio, ... netfs_read_collection, netfs_unlock_abandoned_read_pages 3. vfs_read, ... nfs_do_read_folio, nfs_read_add_folio, nfs_return_empty_folio

The problem is that nfs_read_add_folio() is not supposed to unlock the folio if fscache is enabled, and a nfs_netfs_folio_unlock() check is missing in nfs_return_empty_folio().

Rarely this leads to a warning in netfs_read_collection():

------------[ cut here ]------------ R=0000031c: folio 10 is not locked WARNING: CPU: 0 PID: 29 at fs/netfs/read_collect.c:133 netfs_read_collection+0x7c0/0xf00 [...] Workqueue: events_unbound netfs_read_collection_worker RIP: 0010:netfs_read_collection+0x7c0/0xf00 [...] Call Trace: <TASK> netfs_read_collection_worker+0x67/0x80 process_one_work+0x12e/0x2c0 worker_thread+0x295/0x3a0

Most of the time, however, processes just get stuck forever in folio_wait_bit_common(), waiting for PG_locked to disappear, which never happens because nobody is really holding the folio lock.

Scores and how they were measured

CVSS base severity

7.8

Version 3.1As of

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    NVD CVE-2025-38338 (opens a new tab)

    NVD record: description, CVSS (the CNA score is preferred), affected products, and publication date. Not evidence of exploitation.

    Published Checked

  2. Primary source

    NVD CVE API 2.0 (opens a new tab)

    The NVD API page that supplied this CVE record.

    Published Date not suppliedChecked

  3. Primary source

    NVD CVE API 2.0 (opens a new tab)

    The NVD API page that supplied this CVE record.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, November 5). Linux kernel: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() (CVE-2025-38338). https://kevwire.com/record/CVE-2025-38338

MLA

"Linux kernel: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() (CVE-2025-38338)." KEVWire, 5 Nov. 2026, kevwire.com/record/CVE-2025-38338.

Chicago

KEVWire. "Linux kernel: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() (CVE-2025-38338)." Last modified November 5, 2026. https://kevwire.com/record/CVE-2025-38338.

Evidence summary (plain text)

Linux kernel: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() (Jul 10, 2025).
In the Linux kernel, the following vulnerability has been resolved:

fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()

Sometimes, when a file was read while it was being truncated by
another NFS client, the kernel could deadlock because folio_unlock()
was called twice, and the second call would XOR back the PG_locked
flag.

Most of the time (depending on the timing of the truncation), nobody
notices the problem because folio_unlock() gets called three times,
which flips PG_locked back off:

 1. vfs_read, nfs_read_folio, ... nfs_read_add_folio,
    nfs_return_empty_folio
 2.
CVSS 7.8 (version 3.1; evidence as of Nov 5, 2026; https://nvd.nist.gov/vuln/detail/CVE-2025-38338).
Sources:
NVD CVE-2025-38338: https://nvd.nist.gov/vuln/detail/CVE-2025-38338
NVD CVE API 2.0: https://services.nvd.nist.gov/rest/json/cves/2.0?lastModStartDate=2026-11-05T20:51:23.450Z&lastModEndDate=2026-11-05T22:25:57.582Z&resultsPerPage=500&startIndex=0
NVD CVE API 2.0: https://services.nvd.nist.gov/rest/json/cves/2.0?lastModStartDate=2026-11-05T20:16:05.862Z&lastModEndDate=2026-11-05T21:50:58.884Z&resultsPerPage=500&startIndex=0
Record ID: CVE-2025-38338.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Nov 5, 2026, 22:25 UTC. Ingestion is not an independent editorial investigation.

NVD status: Analyzed. Publication in the NVD is not evidence of exploitation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are coming as part of KEVWire Premium: join the waitlist. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail