Open
[webhook] fix: CVE-2026-85977 - openEuler-24.03-LTS-Next #64
[webhook] fix: CVE-2026-85977 - openEuler-24.03-LTS-Next #64
Open
xiaoo_robotAdd on 10 days ago
Total: 2 files changed+124-1
@@ -0,0 +1,116 @@
1+From ccc1acf867d88dc0bdbe58568f621607d44977f5 Mon Sep 17 00:00:00 2001
2+From: Olga Kornievskaia <okorniev@redhat.com>
3+Date: Sat, 12 Sep 2026 15:15:01 -0400
4+Subject: [PATCH] libtirpc: limit XDR decode node count
5+ 
6+xdr_pmaplist(), xdr_rpcblist_ptr() and xdr_rpcb_entry_list_ptr()
7+decode linked lists with no upper bound on element count. A malicious
8+server can stream arbitrarily many list nodes, forcing unbounded heap
9+allocation in any client that decodes the response (rpcinfo,
10+rpcb_getmaps() callers).
11+ 
12+Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
13+Signed-off-by: Steve Dickson <steved@redhat.com>
14+Reference: https://github.com/Benetti-Engineering/libtirpc/commit/ccc1acf867d88dc0bdbe58568f621607d44977f5.patch
15+Conflict: adapted 2 file(s): src/pmap_prot2.c, src/rpcb_prot.c
16+ 
17+---
18+ src/pmap_prot2.c | 9 ++++++++-
19+ src/rpcb_prot.c | 16 ++++++++++++++++
20+ 2 files changed, 24 insertions(+), 1 deletion(-)
21+diff --git a/src/pmap_prot2.c b/src/pmap_prot2.c
22+index 5583ff0..76babc8 100644
23+--- a/src/pmap_prot2.c
24++++ b/src/pmap_prot2.c
25+@@ -39,6 +39,8 @@
26+ #include <rpc/xdr.h>
27+ #include <rpc/pmap_prot.h>
28+
29++/* Cap decoded list length to prevent memory exhaustion from malicious data */
30++#define PMAPLIST_DECODE_MAX_NODES 1024
31+
32+ /*
33+ * What is going on with linked lists? (!)
34+@@ -89,7 +91,7 @@ xdr_pmaplist(xdrs, rp)
35+ * xdr_bool when the direction is XDR_DECODE.
36+ */
37+ bool_t more_elements;
38+- int freeing;
39++ int freeing, node_count = 0;
40+ struct pmaplist **next = NULL; /* pacify gcc */
41+
42+ assert(xdrs != NULL);
43+@@ -103,6 +105,11 @@ xdr_pmaplist(xdrs, rp)
44+ return (FALSE);
45+ if (! more_elements)
46+ return (TRUE); /* we are done */
47++ if (xdrs->x_op == XDR_DECODE &&
48++ ++node_count > PMAPLIST_DECODE_MAX_NODES) {
49++ return (FALSE);
50++ }
51++
52+ /*
53+ * the unfortunate side effect of non-recursion is that in
54+ * the case of freeing we must remember the next object
55+diff --git a/src/rpcb_prot.c b/src/rpcb_prot.c
56+index a923c8e..a0ea925 100644
57+--- a/src/rpcb_prot.c
58++++ b/src/rpcb_prot.c
59+@@ -89,6 +89,9 @@ xdr_rpcb(xdrs, objp)
60+ * serialize the rpcb elements.
61+ */
62+
63++/* Cap decoded list length to prevent memory exhaustion from malicious data */
64++#define RPCBLIST_DECODE_MAX_NODES 1024
65++
66+ bool_t
67+ xdr_rpcblist_ptr(xdrs, rp)
68+ XDR *xdrs;
69+@@ -101,6 +104,7 @@ xdr_rpcblist_ptr(xdrs, rp)
70+ */
71+ bool_t more_elements;
72+ int freeing = (xdrs->x_op == XDR_FREE);
73++ int node_count = 0;
74+ rpcblist_ptr next;
75+ rpcblist_ptr next_copy;
76+
77+@@ -113,6 +117,10 @@ xdr_rpcblist_ptr(xdrs, rp)
78+ if (! more_elements) {
79+ return (TRUE); /* we are done */
80+ }
81++ if (xdrs->x_op == XDR_DECODE &&
82++ ++node_count > RPCBLIST_DECODE_MAX_NODES) {
83++ return (FALSE);
84++ }
85+ /*
86+ * the unfortunate side effect of non-recursion is that in
87+ * the case of freeing we must remember the next object
88+@@ -178,6 +186,9 @@ xdr_rpcb_entry(xdrs, objp)
89+ return (TRUE);
90+ }
91+
92++/* Cap decoded list length to prevent memory exhaustion from malicious data */
93++#define RPCB_ENTRY_LIST_DECODE_MAX_NODES 1024
94++
95+ bool_t
96+ xdr_rpcb_entry_list_ptr(xdrs, rp)
97+ XDR *xdrs;
98+@@ -190,6 +201,7 @@ xdr_rpcb_entry_list_ptr(xdrs, rp)
99+ */
100+ bool_t more_elements;
101+ int freeing = (xdrs->x_op == XDR_FREE);
102++ int node_count = 0;
103+ rpcb_entry_list_ptr next;
104+ rpcb_entry_list_ptr next_copy;
105+
106+@@ -202,6 +214,10 @@ xdr_rpcb_entry_list_ptr(xdrs, rp)
107+ if (! more_elements) {
108+ return (TRUE); /* we are done */
109+ }
110++ if (xdrs->x_op == XDR_DECODE &&
111++ ++node_count > RPCB_ENTRY_LIST_DECODE_MAX_NODES) {
112++ return (FALSE);
113++ }
114+ /*
115+ * the unfortunate side effect of non-recursion is that in
116+ * the case of freeing we must remember the next object
@@ -1,6 +1,6 @@
1Name: libtirpc1Name: libtirpc
2Version: 1.3.42Version: 1.3.4
3-Release: 53+Release: 6
4Summary: Transport-independent RPC library4Summary: Transport-independent RPC library
5License: SISSL and BSD5License: SISSL and BSD
6URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary6URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary
@@ -9,6 +9,7 @@ Patch0: 0001-update-libtirpc-to-enable-tcp-port-listening.patch
9Patch1: backport-fix-memory-leak-in-destroy_addr.patch9Patch1: backport-fix-memory-leak-in-destroy_addr.patch
10Patch2: backport-fix-rpc_gss_seccreate-passed-in-cred.patch10Patch2: backport-fix-rpc_gss_seccreate-passed-in-cred.patch
11Patch6000: backport-CVE-2026-85231.patch11Patch6000: backport-CVE-2026-85231.patch
12+Patch6001: backport-CVE-2026-85977.patch
12BuildRequires: automake autoconf libtool pkgconfig krb5-devel13BuildRequires: automake autoconf libtool pkgconfig krb5-devel
13 14 
14%description15%description
@@ -66,6 +67,12 @@ mv %{buildroot}%{_mandir}/man3 %{buildroot}%{_mandir}/man3t
66%{_mandir}/*/*67%{_mandir}/*/*
67 68 
68%changelog69%changelog
70+* Tue Nov 17 2026 xiaoo_robot <xiaoo_robot@petalmail.com> - 1.3.4-6
71+- Type:CVE
72+- CVE:CVE-2026-85977
73+- SUG:NA
74+- DESC:fix CVE-2026-85977
75+ 
69* Thu Nov 12 2026 xiaoo_robot <xiaoo_robot@petalmail.com> - 1.3.4-576* Thu Nov 12 2026 xiaoo_robot <xiaoo_robot@petalmail.com> - 1.3.4-5
70- Type:CVE77- Type:CVE
71- CVE:CVE-2026-8523178- CVE:CVE-2026-85231