CVE-2026-89665 in Linuxinfo

Summary

by MITRE • 09/11/2026

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

nfsd: reject out-of-range useconds in NFSv2 SETATTR/CREATE

The NFSv2 sattr decoder converts the wire useconds to nanoseconds in svcxdr_decode_sattr():

iap->ia_atime.tv_nsec = tmp2 * NSEC_PER_USEC;

tmp2 is a u32 and NSEC_PER_USEC is 1000, so the product is computed in unsigned long. On ILP32 that is 32 bits, and an out-of-range useconds value such as 4294968 wraps to tv_nsec == 704. The corruption therefore happens during decode, before any proc function can inspect the value, and a later range check on tv_nsec would see an in-range result and accept it. Rejecting in the decoder yields an RPC GARBAGE_ARGS reply. NFSv2 defines no NFSERR_INVAL, so there is no NFS-level status to return for a malformed time argument, and the check cannot move to the proc function the way the v3/v4 nsec range checks do.

Guard the raw useconds before the multiplication and reject values greater than 1000000. useconds == 1000000 is kept: it is the Sun convention for "set to the current server time", and the in-tree Linux NFSv2 client emits it in both the atime and the mtime field for a plain touch / utimes(file, NULL) (see encode_sattr() and xdr_encode_current_server_time() in fs/nfs/nfs2xdr.c). Rejecting 1000000 would turn that common operation into a hard decode failure for both SETATTR and CREATE. 1000000 * NSEC_PER_USEC is 10^9, which does not wrap on ILP32, so the Sun convention value passes through safely. Only genuinely out-of-range values (> 1000000) are rejected. The atime and mtime guards are therefore symmetric.

The decoder only applied the Sun convention in the mtime block, which clears ATTR_ATIME_SET|ATTR_MTIME_SET when mtime useconds == 1000000. If a client puts 1000000 in the atime field but not in the mtime field, the atime block stored an out-of-range tv_nsec (10^9) and left ATTR_ATIME_SET set, so the bogus value reached the filesystem. Apply the convention in the atime block as well, clearing ATTR_ATIME_SET so the server uses its current time and ignores the value. Only ATTR_ATIME_SET is cleared there. The mtime block keeps its existing behavior, where 1000000 means "set both atime and mtime to now".

[ cel: various tweaks, addenda, and clean-ups ]

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 09/12/2026

The Linux kernel NFS server daemon contains a critical integer overflow vulnerability within the NFSv2 attribute decoder that allows for time value corruption during request processing. This flaw resides in the svcxdr_decode_sattr function, which is responsible for converting wire format useconds into nanoseconds for access and modification times. The conversion logic multiplies the incoming unsigned 32-bit integer representing microseconds by a constant factor of one thousand to derive nanosecond precision. On systems utilizing an ILP32 data model where long integers are thirty-two bits wide, this multiplication can exceed the maximum representable value if the input useconds field is sufficiently large. Specifically, values greater than approximately four million two hundred ninety-four thousand nine hundred sixty-eight will wrap around to a small positive number due to unsigned integer overflow. This mathematical error occurs during the initial decoding phase before any higher-level procedural functions have an opportunity to validate the data integrity of the request parameters.

The operational impact of this vulnerability is significant because it enables the acceptance and processing of malformed time arguments that would otherwise be rejected as invalid. When a client sends an out-of-range useconds value, the resulting wrapped nanosecond value falls within the acceptable range for filesystem timestamps. Consequently, subsequent validation checks that rely on the converted nanosecond value perceive the data as valid and proceed to apply these corrupted times to file attributes. This behavior violates the principle of least privilege by allowing a client to manipulate server-side time representations through crafted network packets. The vulnerability is particularly insidious because it bypasses standard range checking mechanisms, effectively creating a blind spot in the NFSv2 protocol implementation where malformed input is silently accepted and executed rather than being rejected with an appropriate error code.

From a standards perspective, this issue aligns with CWE-190 Integer Overflow or Wraparound, as the arithmetic operation exceeds the capacity of the destination variable type without proper bounds checking prior to execution. In terms of attack classification under MITRE ATT&CK, this vulnerability facilitates potential Denial of Service through resource exhaustion if an attacker can repeatedly trigger filesystem updates with corrupted timestamps, although it may also be leveraged for more subtle attacks involving time-based logic bypasses or log manipulation depending on the specific application context. The lack of a dedicated NFSERR_INVAL error code in the NFSv2 specification complicates remediation efforts because there is no standard protocol-level status to return specifically for malformed time arguments, necessitating the use of RPC GARBAGE_ARGS replies which are less descriptive but functionally effective at halting the malicious request.

The resolution involves implementing strict pre-multiplication validation within the decoder itself rather than relying on post-conversion checks that fail due to the overflow already having occurred. The fix introduces a guard clause that rejects any useconds value exceeding one million, while explicitly preserving values equal to one million as they represent the Sun convention for setting time to the current server timestamp. This threshold is carefully chosen because one million microseconds multiplied by one thousand yields one billion nanoseconds, which fits comfortably within thirty-two bits and does not cause overflow on ILP32 architectures. By rejecting only genuinely out-of-range values above this limit, the patch maintains backward compatibility with legitimate client operations such as standard file touch commands that rely on the special value of one million to indicate current time synchronization.

Furthermore, the remediation addresses an asymmetry in how the Sun convention was previously handled between access and modification times. Previously, only the modification time block cleared specific attribute set flags when encountering the special one-million microsecond value, leaving the access time handling inconsistent. The updated logic ensures that both atime and mtime blocks apply this convention symmetrically by clearing their respective ATTR_ATIME_SET or ATTR_MTIME_SET flags when the special value is detected. This prevents scenarios where a client could supply the special value for modification time but an out-of-range value for access time, which would previously result in the corrupted nanosecond value being stored alongside valid metadata updates. The comprehensive nature of this fix ensures that all paths through the attribute decoder properly validate input ranges and handle legacy protocol conventions without introducing new security gaps or functional regressions.

Responsible

Linux

Reservation

09/11/2026

Disclosure

09/11/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!