CVE-2026-108985 exposed a missing size check in libnfs ZDR decoding. The upstream fix shows how a wire length, caller limit, compatibility sentinel, and destination buffer should fit into one explicit parser contract.
Ubuntu published a security notice on November 9 for libnfs, a client library used by applications that speak the Network File System protocol. The problem is easy to describe and easy to underestimate: several ZDR decoding functions accepted a maximum size from their callers, then ignored it while copying data described by the network message. A crafted response from an NFS server could therefore push bytes beyond a destination buffer. Ubuntu says the result can be a crash or, potentially, arbitrary code execution.
The upstream fix is unusually useful to study because it shows the entire boundary in one place. The patch does not merely add a larger buffer. It defines what a size limit means, preserves two existing sentinel conventions, checks the limit before copying or allocating, and adds a test program for the edge cases. That makes CVE-2026-108985 a small but concrete lesson in protocol parsing: a length field is not a limit just because a function signature calls it maxsize.
What was fixed
The affected code sits in libnfs's ZDR implementation, in lib/libnfs-zdr.c. ZDR is the library's implementation of XDR style data representation used by RPC and NFS messages. The upstream commit titled "ZDR: enforce the maxsize bound" in libnfs identifies three affected routines: libnfs_zdr_bytes(), libnfs_zdr_string(), and libnfs_zdr_array().
Those routines already received a maxsize argument. The caller could pass a protocol limit such as NFS4_FHSIZE or NFS4_OPAQUE_LIMIT, or a size derived from the destination object. The old implementation still took the length encoded in the wire data and used it for the copy. The upstream description is direct: the functions "took a maxsize and never consulted it," and a decode into a caller supplied buffer could copy the wire length beyond the end of that buffer.
That distinction matters. The network length answers one question: how many bytes does the sender claim are present? The caller's maximum answers a different question: how many bytes is this particular destination allowed to accept? A safe decoder has to validate the first against the second before it changes memory. If it only checks that the message contains enough bytes, it has verified the input's internal consistency while still allowing the input to exceed the destination's contract.
CVE-2026-99362 turns a small NFSv4.1 and NFSv4.2 reply-cache negotiation value into a kernel memory corruption boundary. Here is what the primary records show about scope, exploit evidence, patch status, and safe containment.
CVE-2026-138445 shows how Umami's Reports API let a client supplied filter prefix reach PostgreSQL query structure. The patch is a precise lesson in separating request data from SQL identifiers, and in verifying source revisions when a fix lands after the latest release.
Nov 30, 2026 / Jahan
The Ubuntu CVE record for CVE-2026-108985 describes the same issue as an out of bounds write in those three routines. The record lists affected libnfs versions through 6.0.2 before upstream commit 7613236464317bee2d9636f087f995148de4db27. The NVD entry for the CVE assigns CWE-787, out of bounds write, and records the CVE's stated scope and affected version range. It also records a CNA score of 7.1, marked High, with availability as the strongest stated impact.
The score should not be read as proof that every libnfs consumer is remotely exploitable. A program must use the vulnerable decoding paths and process data that an attacker can influence. The CVE record includes a user interaction requirement in its vector. Ubuntu's advisory makes the practical condition less abstract: libnfs receives specially crafted network traffic. In a client deployment, that means the application has to connect to, or otherwise process a response from, a server that can return malicious protocol data. That could be a deliberately hostile server, a compromised server, or a network path that changes the peer, depending on the application's authentication and trust model. The sources establish the vulnerable operation and its possible impact. They do not establish widespread exploitation in the wild.
The important detail in the patch
The fix introduces a helper named libnfs_zdr_size_ok(). The upstream diff applies the check before the affected functions copy or allocate data. Positive maxsize values act as hard limits. That is the ordinary case and the one most readers expect from the parameter name.
The patch also preserves two less obvious conventions. A maxsize of zero and a maxsize of ~0 retain special meanings in existing generated code. The commit explains that rpcgen emits ~0 where the protocol has no limit, while some authentication credential and verifier paths pass the live length and can present zero for an empty object. The new helper therefore cannot treat every zero as an error without changing valid behavior. For a caller supplied byte buffer, the commit's description makes the safety rule explicit: a zero length permits an empty copy into that buffer, while a positive bound rejects an oversized element.
This is a good example of why security patches need an interface contract, not only a conditional. A superficially simpler change might reject every size > maxsize comparison and accidentally turn a compatibility convention into a denial of service. The upstream patch first identifies the values that mean "unlimited" in this codebase, then applies a bounded interpretation everywhere else. The security property is the hard bound. The compatibility property is that the special values remain intentional and visible.
The diff also adds tests/prog_zdr_maxsize.c and wires it into the build systems. That test is valuable because it exercises the contract rather than only the happy path. A parser fix should be tested with a length below the limit, a length exactly at the limit, an oversized length, and the special values the implementation has to preserve. Without those cases, a future cleanup can silently reintroduce the same bug or remove a sentinel behavior that callers rely on.
Illustration of the size boundary described in the libnfs fix. It shows the intended validation path, not a captured exploit or runtime trace.
The shape of the bug is common in C libraries. A decoder reads a length, turns it into a native integer, and passes it down through several helpers. One layer believes the length is bounded because a protocol constant was supplied. Another layer treats the wire value as authoritative. The result is a trust boundary that exists in the caller's intent but not in the callee's memory operation.
Why NFS clients need a different threat model
It is tempting to picture NFS as a trusted internal service and stop there. That is not a safe default for every libnfs deployment. The libnfs upstream security analysis describes attacker reachable input in both directions: an untrusted NFS server in client context, and an untrusted NFS client in server context through rpc_init_server_context. Its author says the review focused on XDR and RPC decoding paths where data is controlled by a remote peer.
That analysis is separate from the CVE and should not be used to claim that every finding in it is the same vulnerability. It is useful context because it explains why a low level decoder deserves a network threat model even when the library is not an internet facing daemon. A desktop backup tool, media indexer, virtualization component, or storage agent can become the client side of a security boundary. If it connects to an untrusted export, consumes a redirected endpoint, or accepts a server selected by configuration that an attacker can influence, the response parser is handling hostile bytes.
The analysis also states an important evidence limit. Its initial pass was static and did not use a live server or sanitizer build. The report cites source locations and symbols rather than crash dumps, then records fixes in the repository. That is a useful distinction for readers assessing vulnerability writeups. A code path that clearly violates a size contract is enough to justify a fix. It is not the same as an independently reproduced exploit, and it does not establish that an attacker has used the issue operationally.
For CVE-2026-108985, the public record supports the existence of the missing bound and the upstream fix. Ubuntu describes crash and arbitrary code execution as possible outcomes. The record does not provide a public exploit, a demonstrated weaponized attack, or evidence of exploitation. The responsible engineering response is still to patch exposed consumers, but the article should not turn a possible consequence into a confirmed event.
What distribution updates tell us
Ubuntu's USN-9008-1 advisory was published on November 9 and lists Ubuntu 22.04, 24.04, 26.04 LTS, and 26.10 releases. It gives fixed package versions for the affected library packages. For example, the advisory lists libnfs13 version 4.0.0-1ubuntu0.2 for Ubuntu 22.04, and libnfs14 versions 5.0.2-1ubuntu0.24.04.2, 5.0.2-1ubuntu1.2, and 5.0.2-1ubuntu3.1 for the newer releases shown there.
Those are distribution package versions, not upstream libnfs version numbers. That difference matters during triage. A scanner that reports a library's upstream version may not understand a distribution backport, while a package manager knows whether the vendor's security patch has been applied. Administrators should compare the installed package against their distribution's advisory and update channel rather than guessing from the upstream commit date.
The advisory says a standard system update normally supplies the fix. That is the right first action for system packages, but it does not cover every deployment. Containers may carry their own copy of libnfs. Statically linked binaries can retain vulnerable code after the host package is updated. An application build may vendor the library or copy selected source files into a private tree. The practical inventory question is not only "does this host have libnfs installed?" It is "which running processes link to, or embed, the affected decoder?"
Teams should check both dynamic and static consumers. For dynamically linked applications, package ownership and tools such as ldd can help identify the library on disk, while process and image inventories show which artifact is actually deployed. For static builds, the build manifest, symbol table, source lockfile, or reproducible build record is more reliable than the host package database. The upstream repository is the place to compare source history, but the operational fix still has to reach the binary that processes NFS traffic.
A patch is not the same as a trust decision
Updating libnfs closes the missing size check. It does not decide which NFS servers an application should trust, whether authentication is required, or whether a component needs NFS at all. Those controls reduce the set of peers that can deliver input, while the parser fix protects the process when the input is malformed or the peer is not trustworthy.
For client applications, map the path from configuration to connection. Record whether the server name can be changed by a user, a job, a container, a DHCP response, a cloud control plane, or another service. Check whether the client authenticates the server and whether the protocol session is protected against a machine in the network returning a forged response. These are deployment questions, not facts established by the CVE, so they need to be answered from the application's own configuration and architecture.
For server style uses of libnfs, inspect code that accepts an incoming client and routes its messages into the same decoding helpers. The security analysis documents that the library has server context code, but it does not turn every such deployment into an exposed service. The point is to identify the direction of attacker controlled protocol data before assigning a risk rating.
Observability helps after an update. Record which application initiated NFS sessions, which destinations it contacted, and whether it began failing on malformed responses. Avoid treating a crash signature as proof of this CVE because many memory safety failures look alike. If there is a suspected incident, preserve the binary, package metadata, logs, and relevant network records, then investigate with the vendor's guidance. Do not test against production systems by sending crafted protocol messages.
The engineering lesson
The useful lesson is not "remember to compare two integers." It is to make ownership of a limit explicit. The wire controls the claimed length. The caller controls the capacity. The decoder must enforce the smaller safe value before it reads, copies, allocates, or recurses.
That contract should appear in the function documentation, the type choices, and the tests. Named sentinels are safer than unexplained magic values. Size arithmetic should avoid signed conversions that can turn a large unsigned length negative. Generated protocol code should be treated as an input source that still needs review at the handoff to handwritten memory operations. A check at the top level is not enough if a nested helper later discards the bound.
The upstream libnfs patch is a compact model for that work. It names the missing rule, handles compatibility cases, places enforcement before the dangerous operations, credits the reporter, and adds regression coverage. The Ubuntu update gives administrators a distribution specific path to remediation. Together, those sources support a measured conclusion: patch libnfs consumers that process NFS traffic, inventory static and vendored copies, and keep the threat model honest. The flaw is confirmed. Widespread exploitation is not.