public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libnfs] f43: Add upstream patches for CVE-2026-53689 and CVE-2026-57918
@ 2026-08-10 22:05 Xavier Bachelot
  0 siblings, 0 replies; only message in thread
From: Xavier Bachelot @ 2026-08-10 22:05 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libnfs
Branch : f43
Commit : 5dcb158c2f5aac857e6543ebdfbc7442937fd4c8
Author : Xavier Bachelot <xavier@bachelot.org>
Date   : 2026-08-10T23:59:59+02:00
Stats  : +66/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/libnfs/c/5dcb158c2f5aac857e6543ebdfbc7442937fd4c8?branch=f43

Log:
Add upstream patches for CVE-2026-53689 and CVE-2026-57918

---
diff --git a/libnfs-6.0.2-CVE-2026-53689.patch b/libnfs-6.0.2-CVE-2026-53689.patch
new file mode 100644
index 0000000..7fb368b
--- /dev/null
+++ b/libnfs-6.0.2-CVE-2026-53689.patch
@@ -0,0 +1,28 @@
+From 55c18ea33a83d667f79f0ef209c96895795c729f Mon Sep 17 00:00:00 2001
+From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
+Date: Wed, 10 Jun 2026 11:43:28 +1000
+Subject: [PATCH] ZDR: check the string size for sanity
+
+It could otherwise cause an overflow in the bounds check later.
+
+Reported-by: Nick Hummel <nickhummel@google.com>
+Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
+---
+ lib/libnfs-zdr.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/libnfs-zdr.c b/lib/libnfs-zdr.c
+index 2945dc49..357b2746 100644
+--- a/lib/libnfs-zdr.c
++++ b/lib/libnfs-zdr.c
+@@ -318,7 +318,9 @@ bool_t libnfs_zdr_string(ZDR *zdrs, char **strp, uint32_t maxsize)
+ 	if (!libnfs_zdr_u_int(zdrs, &size)) {
+ 		return FALSE;
+ 	}
+-
++	if (size > zdrs->size) {
++		return FALSE;
++	}
+ 	if (zdrs->pos + (int)size > zdrs->size) {
+ 		return FALSE;
+ 	}

diff --git a/libnfs-6.0.2-CVE-2026-57918.patch b/libnfs-6.0.2-CVE-2026-57918.patch
new file mode 100644
index 0000000..d72e86f
--- /dev/null
+++ b/libnfs-6.0.2-CVE-2026-57918.patch
@@ -0,0 +1,28 @@
+From 935b8db712b3c6649bc57ddc276526c4a31680de Mon Sep 17 00:00:00 2001
+From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
+Date: Wed, 10 Jun 2026 12:21:58 +1000
+Subject: [PATCH] socket: prevent an underflow in xid
+
+if the expected pdu-size is larger than the absolute pdu size
+from the xid/record-marker.
+
+Reported-by: Nick Hummel <nickhummel@google.com>
+Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
+---
+ lib/socket.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/socket.c b/lib/socket.c
+index 57ffdb51..fea04790 100644
+--- a/lib/socket.c
++++ b/lib/socket.c
+@@ -980,6 +980,9 @@ rpc_read_from_socket(struct rpc_context *rpc)
+                                 break;
+                         case READ_IOVEC:
+                                 rpc->pdu->read_count -= rpc->pdu_size;
++                                if (rpc->rm_xid[0] < rpc->pdu_size) {
++                                        return -1;
++                                }
+                                 rpc->rm_xid[0] -= rpc->pdu_size;
+                                 if (!rpc->rm_xid[0]) {
+                                         rpc_finished_pdu(rpc);

diff --git a/libnfs.spec b/libnfs.spec
index a250474..a9ec970 100644
--- a/libnfs.spec
+++ b/libnfs.spec
@@ -1,6 +1,6 @@
 Name:		libnfs
 Version:	6.0.2
-Release:	8%{?dist}
+Release:	9%{?dist}
 Summary:	Client library for accessing NFS shares over a network
 # The library is licensed as LGPL-2.1-or-later
 # The protocol definition is BSD-2-Clause
@@ -13,6 +13,10 @@ Source0:	%{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
 Patch0:         libnfs-6.0.2-fix_gnutls_undefined_symbols.patch
 # https://github.com/sahlberg/libnfs/commit/2cdfedaba379cbb512d3c203a1b9eae795f4fb23
 Patch1:         libnfs-6.0.2-fix_missing_include.patch
+# https://github.com/sahlberg/libnfs/commit/55c18ea33a83d667f79f0ef209c96895795c729f
+Patch2:         libnfs-6.0.2-CVE-2026-53689.patch
+# https://github.com/sahlberg/libnfs/commit/935b8db712b3c6649bc57ddc276526c4a31680de
+Patch3:         libnfs-6.0.2-CVE-2026-57918.patch
 
 BuildRequires:	automake
 BuildRequires:	gcc
@@ -57,6 +61,8 @@ NFS servers using libnfs.
 %setup -q -n %{name}-%{name}-%{version}
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
 autoreconf -vif
 
 %build
@@ -91,6 +97,9 @@ rm -f %{buildroot}%{_libdir}/*.la
 %{_mandir}/man1/nfs-*.1*
 
 %changelog
+* Mon Aug 10 2026 Xavier Bachelot <xavier@bachelot.org> - 6.0.2-9
+- Add upstream patches for CVE-2026-53689 and CVE-2026-57918
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.2-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 22:05 [rpms/libnfs] f43: Add upstream patches for CVE-2026-53689 and CVE-2026-57918 Xavier Bachelot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox