diff --git a/SOURCES/nfs-utils-2.3.3-covscan-return-value.patch b/SOURCES/nfs-utils-2.3.3-covscan-return-value.patch new file mode 100644 index 0000000..94fc5a1 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-covscan-return-value.patch @@ -0,0 +1,25 @@ +diff -up nfs-utils-2.3.3/support/export/client.c.orig nfs-utils-2.3.3/support/export/client.c +--- nfs-utils-2.3.3/support/export/client.c.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/support/export/client.c 2023-01-12 08:59:44.171609492 -0500 +@@ -689,6 +689,9 @@ check_netgroup(const nfs_client *clp, co + + /* check whether the IP itself is in the netgroup */ + ip = calloc(INET6_ADDRSTRLEN, 1); ++ if (ip == NULL) ++ goto out; ++ + if (inet_ntop(ai->ai_family, &(((struct sockaddr_in *)ai->ai_addr)->sin_addr), ip, INET6_ADDRSTRLEN) == ip) { + if (innetgr(netgroup, ip, NULL, NULL)) { + free(hname); +diff -up nfs-utils-2.3.3/tools/nfsrahead/main.c.orig nfs-utils-2.3.3/tools/nfsrahead/main.c +--- nfs-utils-2.3.3/tools/nfsrahead/main.c.orig 2023-01-12 08:58:28.297466979 -0500 ++++ nfs-utils-2.3.3/tools/nfsrahead/main.c 2023-01-12 09:00:37.988419866 -0500 +@@ -167,7 +167,7 @@ int main(int argc, char **argv) + if ((ret = get_device_info(argv[optind], &device)) == 0) + break; + +- if (ret != 0) { ++ if (ret != 0 || device.fstype == NULL) { + xlog(D_GENERAL, "unable to find device %s\n", argv[optind]); + goto out; + } diff --git a/SOURCES/nfs-utils-2.3.3-mountd-v4clnts.patch b/SOURCES/nfs-utils-2.3.3-mountd-v4clnts.patch new file mode 100644 index 0000000..95aec88 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-mountd-v4clnts.patch @@ -0,0 +1,24 @@ +diff -up nfs-utils-2.3.3/support/export/v4clients.c.orig nfs-utils-2.3.3/support/export/v4clients.c +--- nfs-utils-2.3.3/support/export/v4clients.c.orig 2022-09-26 11:36:22.803929066 -0400 ++++ nfs-utils-2.3.3/support/export/v4clients.c 2022-09-26 11:38:38.221187835 -0400 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + #include "export.h" + +@@ -23,6 +24,12 @@ static int clients_fd = -1; + + void v4clients_init(void) + { ++ struct stat sb; ++ ++ if (!stat("/proc/fs/nfsd/clients", &sb) == 0 || ++ !S_ISDIR(sb.st_mode)) ++ return; ++ + if (clients_fd >= 0) + return; + clients_fd = inotify_init1(IN_NONBLOCK); diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec index 66786ba..502e4e0 100644 --- a/SPECS/nfs-utils.spec +++ b/SPECS/nfs-utils.spec @@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser Name: nfs-utils URL: http://linux-nfs.org/ Version: 2.3.3 -Release: 57%{?dist} +Release: 59%{?dist} Epoch: 1 # group all 32bit related archs @@ -103,6 +103,12 @@ Patch053: nfs-utils-2.3.3-rpcctl-subparser.patch Patch054: nfs-utils-2.3.3-rpcctl-posixpath.patch Patch055: nfs-utils-2.3.3-systemd-rpcstatd.patch +# +# rhel 8.8 +# +Patch056: nfs-utils-2.3.3-mountd-v4clnts.patch +Patch057: nfs-utils-2.3.3-covscan-return-value.patch + Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch Patch102: nfs-utils-2.3.3-idmap-errmsg.patch @@ -380,6 +386,13 @@ fi %{_libdir}/libnfsidmap.so %changelog +* Thu Jan 12 2023 Steve Dickson 2.3.3-59 +- Covscan Scan: Wrong Check of Return Value (bz 2151966) +- Covscan Scan: Clang (experimental) (bz 2151971) + +* Mon Sep 26 2022 Steve Dickson 2.3.3-58 +- mountd: Check 'nfsd/clients' directory presence (bz 2123073) + * Tue Aug 2 2022 Steve Dickson 2.3.3-57 - rpc-statd.service: Stop rpcbind and rpc.stat in an exit race (bz 2100395)