oss-sec mailing list archives
Sun RPC cross-request information disclosure due to stale buffer read
From: Florian Weimer <fweimer () redhat com>
Date: Tue, 01 Dec 2026 19:07:50 +0100
The only public reference I can find for this is in Red Hat Bugzilla: | A flaw was found in libtirpc. The SunRPC UDP/datagram server transport | (svc_dg_recv / svcudp_create) reuses a single XDR decode stream sized | to the allocated receive buffer. On each datagram, the receive path | resets the stream position and calls xdr_callmsg, but it does not | rebind the decode bound (x_handy) to the actual received length | rlen. Because the XDR memory backend uses x_handy as the remaining | length, a shorter request can be decoded together with stale bytes | left by a prior datagram. Florian Weimer reproduced this with | tst-udp-stale: a full request leaves argument bytes at the tail of the | buffer after a shorter reply is encoded; a follow-up truncated | AUTH_NONE call with no arguments then has svc_getargs consume those | leftover bytes and echo them back. A correctly bounded decoder would | fail with GARBAGE_ARGS. This is a logical datagram-boundary violation, | not a read past the allocated buffer. The same inherited SunRPC | pattern exists in glibc sunrpc/svc_udp.c (legacy ABI compatibility; | glibc is expected to assign a separate CVE) and in other copies such | as krb5 GSSRPC. CVE-2026-104357 is assigned to the libtirpc | implementation. Reported by Aisle Research against glibc; Red Hat | confirmed the bug is present in libtirpc. Related tracking: OSIM-77274 | / RHEL-217046 (glibc report), PSIRTSUPT-22635 (coordination). <https://bugzilla.redhat.com/show_bug.cgi?id=2576161> The assignment of CVE-2026-104357 is specifically scoped to libtirpc, but this flaw was originally reported against glibc. It's replicated across most code bases derived from Sun RPC code. At least for glibc, I expect a separate assignment. I'm attaching a libtirpc/standalone port of an LLM-generated glibc test case. For transparency, I'm including the original report. The fix is not quite right; I think its better to call the high-level xdrmem_create function with the appropriate buffer and its length. Both send and receive paths need to do this. I think I'm required to mention: Found by AISLE in partnership with Red Hat Thanks, Florian
Attachment:
tst-udp-stale.c
Description:
Attachment:
AISLE-Report-PSIRTSUPT-14921.md
Description:
Current thread:
- Sun RPC cross-request information disclosure due to stale buffer read Florian Weimer (Dec 01)
