diff --git a/0006-nfsidmap-fix-a-memory-leak.patch b/0006-nfsidmap-fix-a-memory-leak.patch new file mode 100644 index 0000000000000000000000000000000000000000..8ead006636bd8d227767f34feecde7f35824f56b --- /dev/null +++ b/0006-nfsidmap-fix-a-memory-leak.patch @@ -0,0 +1,29 @@ +From 131ec613bab84b7894e428375cc360bb82a336a3 Mon Sep 17 00:00:00 2001 +From: Steve Dickson +Date: Tue, 23 Jul 2024 12:06:28 -0400 +Subject: [PATCH] nfsidmap: Fix a memory leak + +Reported-by: Zhang Yaqi +Signed-off-by: Steve Dickson + +Reference:https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=131ec613bab84b7894e428375cc360bb82a336a3 +Conflict:no +--- + support/nfsidmap/umich_ldap.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/support/nfsidmap/umich_ldap.c b/support/nfsidmap/umich_ldap.c +index 1aa2af4..0f88ba4 100644 +--- a/support/nfsidmap/umich_ldap.c ++++ b/support/nfsidmap/umich_ldap.c +@@ -200,6 +200,7 @@ static int set_krb5_ccname(const char *krb5_ccache_name) + IDMAP_LOG(5, ("Failed to set creds cache for kerberos, err(%d)", + retval)); + } ++ free(env); + #endif /* else HAVE_GSS_KRB5_CCACHE_NAME */ + out: + return retval; +-- +1.8.3.1 + \ No newline at end of file diff --git a/0007-rpc-gssd-service-has-status-failed-due-to-segfault.patch b/0007-rpc-gssd-service-has-status-failed-due-to-segfault.patch new file mode 100644 index 0000000000000000000000000000000000000000..06a2578d97988bd7b8508ec32a697375f7c966a2 --- /dev/null +++ b/0007-rpc-gssd-service-has-status-failed-due-to-segfault.patch @@ -0,0 +1,39 @@ +From 92995e0d38dc00e930c562cf936220f83c09d082 Mon Sep 17 00:00:00 2001 +From: Paulo Andrade +Date: Tue, 23 Jul 2024 12:03:30 -0400 +Subject: [PATCH] rpc-gssd.service has status failed (due to rpc.gssd segfault) + +Ensure strings are not NULL before doing a strdup() in error path. + +Fixes: https://issues.redhat.com/browse/RHEL-43286 +Signed-off-by: Steve Dickson + +Reference:https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=92995e0d38dc00e930c562cf936220f83c09d082 +Conflict:no +--- + utils/gssd/gssd.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c +index d7a2822..01ce7d1 100644 +--- a/utils/gssd/gssd.c ++++ b/utils/gssd/gssd.c +@@ -365,12 +365,12 @@ gssd_read_service_info(int dirfd, struct clnt_info *clp) + + fail: + printerr(0, "ERROR: failed to parse %s/info\n", clp->relpath); +- clp->upcall_address = strdup(address); +- clp->upcall_port = strdup(port); ++ clp->upcall_address = address ? strdup(address) : NULL; ++ clp->upcall_port = port ? strdup(port) : NULL; + clp->upcall_program = program; + clp->upcall_vers = version; +- clp->upcall_protoname = strdup(protoname); +- clp->upcall_service = strdup(service); ++ clp->upcall_protoname = protoname ? strdup(protoname) : NULL; ++ clp->upcall_service = service ? strdup(service) : NULL; + free(servername); + free(protoname); + clp->servicename = NULL; +-- +1.8.3.1 \ No newline at end of file diff --git a/nfs-utils.spec b/nfs-utils.spec index 2705e42ad57952e8ed682f38a8c8766e8faa7083..e93f394e39b2f8863fa28773d0d577c7cef25825 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -4,7 +4,7 @@ Name: nfs-utils Version: 2.6.3 -Release: 1 +Release: 2 Epoch: 2 Summary: The Linux NFS userland utility package License: MIT and GPLv2 and GPLv2+ and BSD @@ -18,6 +18,8 @@ Patch2: 0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch Patch3: 0003-export-fix-handling-of-error-from-match_fsid.patch Patch4: 0004-export-move-cache_open-before-workers-are-forked.patch Patch5: 0005-gssd-fix-handling-DNS-lookup-failure.patch +Patch6: 0006-nfsidmap-fix-a-memory-leak.patch +Patch7: 0007-rpc-gssd-service-has-status-failed-due-to-segfault.patch BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2 @@ -290,6 +292,9 @@ fi %{_mandir}/*/* %changelog +* Tue Sep 10 2024 zhangjian - 2:2.6.3-2 +- backport bugfix patches from community + * Wed Jan 10 2024 wuguanghao - 2:2.6.3-1 - upgrade version to 2.6.3