AI_ONLY_REPORT package: glibc-2.42-11.1.hum1 ------ Summary: SunRPC UDP datagram-boundary violation in `svcudp_recv` (stale buffer bytes decoded as current request): a short UDP RPC request can be decoded together with stale bytes left from a prior datagram in the reused receive buffer, allowing limited cross-request data disclosure or credential/verifier confusion. Requirements to exploit: An attacker must be able to send crafted UDP RPC datagrams to a reachable service built from `glibc-2.42-11.1.hum1` that uses the SunRPC UDP server transport, and must control packet sequencing so a shorter request is decoded after a longer request has left relevant bytes in the reused buffer. Component affected: `glibc-2.42-11.1.hum1`, SunRPC UDP server transport in `sunrpc/svc_udp.c` (`svcudp_recv`), with decode behavior in `sunrpc/xdr_mem.c` and auth-field parsing in `sunrpc/rpc_cmsg.c` Version affected: `glibc-2.42-11.1.hum1` when deployed with a UDP SunRPC service using `svcudp_create` or `svcudp_bufcreate` Patch available: no released package fix established; proposed patch included below Version fixed: unknown Upstream coordination: Not notified. CVSS: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - 4.8 (MEDIUM) AV:N - The attack is performed by sending network packets to a reachable UDP SunRPC service. AC:H - Exploitation requires precise packet sequencing and message shaping so a shorter request causes the decoder to consume stale bytes left by a previous datagram. PR:N - No prior authentication is required to send the crafted UDP requests. UI:N - No user interaction is required once the service is reachable. S:U - The impact is confined to the vulnerable service's own security scope. C:L - The supported confidentiality impact is limited to stale bytes from the reused receive buffer being decoded as part of the current request. I:L - Credential or verifier fields in the current request can be influenced by prior-buffer data, causing limited cross-request message confusion. A:N - The available technical evidence does not demonstrate a direct availability impact. Impact: Moderate. The issue can affect confidentiality and integrity in exposed UDP SunRPC services, but the currently supported effect is a logical datagram-boundary violation with limited stale-buffer reuse, not arbitrary memory disclosure, code execution, or a demonstrated denial of service. Exploitation also depends on specific deployment conditions and careful packet construction, which aligns with Red Hat's Moderate category rather than Important or Critical. Embargo: no Reason: The demonstrated impact is limited and service-dependent, exploitation requires specific packet sequencing against a deployed UDP SunRPC service, and the fix is straightforward. This does not appear to require an extended embargo. Acknowledgement: Aisle Research Vulnerability Details: `svcudp_bufcreate` creates one reusable XDR decode stream sized to `su_iosz`. On each received datagram, `svcudp_recv` resets the stream position and calls `xdr_callmsg`, but it does not reset the decode bound to the actual received datagram length `rlen`. Because the XDR memory backend uses `x_handy` as the authoritative remaining length, the decode path can consume stale bytes still present in the reused receive buffer from a previous datagram. ```c /* sunrpc/svc_udp.c */ su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4; xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE); ``` ```c /* sunrpc/svc_udp.c */ if (rlen < 16) return FALSE; xdrs->x_op = XDR_DECODE; XDR_SETPOS (xdrs, 0); if (!xdr_callmsg (xdrs, msg)) return FALSE; ``` ```c /* sunrpc/xdr_mem.c */ if (xdrs->x_handy >= len) { xdrs->x_handy -= len; buf = (int32_t *) xdrs->x_private; xdrs->x_private += len; } ``` ```c /* sunrpc/rpc_cmsg.c */ buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length)); memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length); ``` This is best described as a logical message-boundary violation rather than a read beyond the allocated receive buffer. The available evidence supports limited stale-buffer disclosure or credential/verifier confusion across consecutive requests. Broader impact depends on how the affected service uses the parsed authentication data. Steps to reproduce: 1. Build and run a UDP RPC service that uses `svcudp_create` or `svcudp_bufcreate` and processes requests through `svc_run`. 2. Send packet A as a valid RPC call with non-empty credential or verifier data, placing an identifiable marker in the trailing auth bytes. 3. Send packet B immediately afterward as a shorter RPC call with `rlen >= 16`, but advertise auth lengths that require bytes beyond B's actual payload. 4. Instrument `svcudp_recv` immediately after `xdr_callmsg` and log `rlen`, the decoded credential/verifier lengths, and the decoded auth bytes. 5. Compare the logged auth bytes for packet B with packet B as captured on the wire. If the issue is present, packet B's parsed auth bytes will include marker data that was not transmitted in packet B but was present in packet A. Mitigation: Until a fixed package is available, do not expose UDP SunRPC services built on `svcudp_create` or `svcudp_bufcreate` to untrusted networks. If UDP transport is not required, disable it or restrict access to trusted peers. Proposed Fix: Rebind the XDR decode stream to the actual received datagram length before `xdr_callmsg` so the current request cannot consume stale bytes from the reusable transport buffer. ```diff diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -297,9 +297,15 @@ svcudp_recv (SVCXPRT *xprt, struct rpc_msg *msg) if (rlen < 16) /* < 4 32-bit ints? */ return FALSE; xdrs->x_op = XDR_DECODE; - XDR_SETPOS (xdrs, 0); + if (!XDR_SETPOS (xdrs, 0)) + return FALSE; + /* Bound decode to bytes received in this datagram. */ + xdrs->x_private = xdrs->x_base; + xdrs->x_handy = (u_int) rlen; if (!xdr_callmsg (xdrs, msg)) return FALSE; ``` ------ This report was generated using AI technology. Always review AI-generated content prior to use