In the Linux kernel, the following vulnerability has been resolved: NFSv4: include MAY_WRITE in open permission mask for O_TRUNC POSIX requires… (CVE-2026-64298)
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.
AI Analysis
Technical Summary
The Linux kernel's NFSv4 client incorrectly authorized open() calls with the O_TRUNC flag without requiring write permission, due to the local permission mask being derived solely from O_ACCMODE. This allowed a client to locally satisfy an open(O_RDONLY | O_TRUNC) call and issue a truncation request to the server, which accepted it under write delegation semantics. POSIX requires that truncation operations require write permission and that such opens fail with EACCES if write access is not granted. The fix includes adding MAY_WRITE to the open permission mask when O_TRUNC is specified, aligning local checks with server enforcement.
Potential Impact
This vulnerability could allow a client to truncate a file without proper write authorization, violating POSIX access control expectations. This could lead to unauthorized data modification or loss on NFSv4-mounted filesystems if exploited. No known exploits are reported in the wild.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to include write permission in the open permission mask when O_TRUNC is used. Users should apply the official kernel updates that contain this fix. Since this is a kernel-level issue, updating to a patched kernel version is the recommended remediation. Patch status is not explicitly confirmed here; users should consult the Linux kernel vendor advisory for the specific fixed versions and update accordingly.
In the Linux kernel, the following vulnerability has been resolved: NFSv4: include MAY_WRITE in open permission mask for O_TRUNC POSIX requires… (CVE-2026-64298)
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel's NFSv4 client incorrectly authorized open() calls with the O_TRUNC flag without requiring write permission, due to the local permission mask being derived solely from O_ACCMODE. This allowed a client to locally satisfy an open(O_RDONLY | O_TRUNC) call and issue a truncation request to the server, which accepted it under write delegation semantics. POSIX requires that truncation operations require write permission and that such opens fail with EACCES if write access is not granted. The fix includes adding MAY_WRITE to the open permission mask when O_TRUNC is specified, aligning local checks with server enforcement.
Potential Impact
This vulnerability could allow a client to truncate a file without proper write authorization, violating POSIX access control expectations. This could lead to unauthorized data modification or loss on NFSv4-mounted filesystems if exploited. No known exploits are reported in the wild.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to include write permission in the open permission mask when O_TRUNC is used. Users should apply the official kernel updates that contain this fix. Since this is a kernel-level issue, updating to a patched kernel version is the recommended remediation. Patch status is not explicitly confirmed here; users should consult the Linux kernel vendor advisory for the specific fixed versions and update accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-mj8v-3x8m-9rx7
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-64298"]
- Ecosystems
- []
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a65420d9c2644c7f8085cfe
Added to database: 07/25/2026, 23:09:01 UTC
Last enriched: 07/25/2026, 23:36:34 UTC
Last updated: 09/07/2026, 10:52:10 UTC
Views: 50
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.