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

NFSv4: include MAY_WRITE in open permission mask for O_TRUNC

POSIX requires write permission to truncate a file, so an open() that
specifies O_TRUNC must be authorized for write access regardless of the
O_ACCMODE access mode.

nfs_open_permission_mask() builds the access mask passed to
nfs_may_open(), which is the local authorization gate for OPENs the
client serves itself from a cached write delegation via the
can_open_delegated() path in nfs4_try_open_cached(). The mask is
derived from O_ACCMODE alone, so an open(O_RDONLY | O_TRUNC) against a
file the caller cannot write requests only MAY_READ and passes the
local check. The OPEN is then satisfied locally and the truncation is
issued to the server as a SETATTR(size=0) over the delegation stateid,
which the server accepts under standard write-delegation semantics.
POSIX requires that this open fail with EACCES.

Include MAY_WRITE in the mask whenever O_TRUNC is set so the local
check matches the access the server would have enforced.
Published: 2026-07-25
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel’s NFSv4 implementation builds an access mask when a file is opened for truncation. The flaw causes the mask to omit the required write bit when O_TRUNC is set, so an open(O_RDONLY|O_TRUNC) passes the local check and the kernel sends a SETATTR(size=0) to the server. This violates POSIX requirements and allows a client to silently truncate a file it should not be able to modify, exposing the system to uncontrolled data loss without enabling code execution or privilege escalation.

Affected Systems

Linux kernel versions that have not incorporated the commit that adds the missing write permission bit are vulnerable. This includes the generic kernel shipped with mainstream distributions as well as downstream kernels such as Linux 7.2 rc1 and rc2, and any kernel that matches the CPE string cpe:2.3:o:linux:linux_kernel:*.

Risk and Exploitability

The CVSS score of 7.1 classifies the flaw as medium severity, and the EPSS score of less than 1% combined with its absence from the KEV catalog indicates low current exploitation likelihood. An attacker would need to be an NFS client that has obtained a write delegation for the target file; otherwise the kernel’s local checks would block the truncation request. Based on the description, it is inferred that a typical exploit would involve a privileged user or service initiating open(O_TRUNC) on a file it can only read, causing silent truncation of the file.

Generated by OpenCVE AI on August 13, 2026 at 12:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes the patch adding the write requirement to the open permission mask (e.g., upgrading to a newer release or backporting the commit).
  • If an immediate kernel upgrade is infeasible, reconfigure the NFS server to restrict or disable write delegations so that no client can obtain a delegated write state on critical files.
  • Deploy monitoring of NFS client activity to detect unexpected truncation operations and audit file integrity to flag anomalous data loss.

Generated by OpenCVE AI on August 13, 2026 at 12:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4717-1 linux security update
Debian DLA Debian DLA DLA-4720-1 linux security update
Debian DLA Debian DLA DLA-4723-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
History

Wed, 12 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:7.2:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.2:rc2:*:*:*:*:*:*

Tue, 04 Aug 2026 15:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-284

Thu, 30 Jul 2026 04:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-284

Wed, 29 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-358
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 27 Jul 2026 05:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}


Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: NFSv4: include MAY_WRITE in open permission mask for O_TRUNC POSIX requires write permission to truncate a file, so an open() that specifies O_TRUNC must be authorized for write access regardless of the O_ACCMODE access mode. nfs_open_permission_mask() builds the access mask passed to nfs_may_open(), which is the local authorization gate for OPENs the client serves itself from a cached write delegation via the can_open_delegated() path in nfs4_try_open_cached(). The mask is derived from O_ACCMODE alone, so an open(O_RDONLY | O_TRUNC) against a file the caller cannot write requests only MAY_READ and passes the local check. The OPEN is then satisfied locally and the truncation is issued to the server as a SETATTR(size=0) over the delegation stateid, which the server accepts under standard write-delegation semantics. POSIX requires that this open fail with EACCES. Include MAY_WRITE in the mask whenever O_TRUNC is set so the local check matches the access the server would have enforced.
Title NFSv4: include MAY_WRITE in open permission mask for O_TRUNC
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-08-05T12:40:41.562Z

Reserved: 2026-07-19T15:36:31.778Z

Link: CVE-2026-64298

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2026-07-25T10:17:10.657

Modified: 2026-08-12T14:54:13.273

Link: CVE-2026-64298

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64298 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T12:15:17Z

Weaknesses