public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/nfs-utils] f44: Add a few upstream fixes
Date: Sun, 31 May 2026 12:18:04 GMT [thread overview]
Message-ID: <178022988415.1.17678480798569022474.rpms-nfs-utils-da59be9fbc39@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/nfs-utils
Branch : f44
Commit : da59be9fbc39bb3036121404bae4e9cc350d3439
Author : Steve Dickson <steved@redhat.com>
Date : 2026-05-30T17:11:08-04:00
Stats : +79/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/nfs-utils/c/da59be9fbc39bb3036121404bae4e9cc350d3439?branch=f44
Log:
Add a few upstream fixes
libnfsidmap: avoid malloc(0) for empty Local-Realms
Removed warnings in nfs_sockaddr2universal()
Signed-off-by: Steve Dickson <steved@redhat.com>
---
diff --git a/nfs-utils-2.8.7-getport-warning.patch b/nfs-utils-2.8.7-getport-warning.patch
new file mode 100644
index 0000000..d85907f
--- /dev/null
+++ b/nfs-utils-2.8.7-getport-warning.patch
@@ -0,0 +1,33 @@
+commit a94929b05c9c40d6dc6e3a84d16e4d73d7368ea0
+Author: Steve Dickson <steved@redhat.com>
+Date: Thu May 28 15:13:36 2026 -0400
+
+ Removed warnings in nfs_sockaddr2universal()
+
+ in function 'nfs_sockaddr2universal',
+ inlined from 'nsm_xmit_getaddr.constprop' at ../../support/nsm/rpc.c:251:17:
+ ../../support/nfs/getport.c:459:24: warning: 'strndup' specified bound 108 exceeds source size 26 [-Wstringop-overread]
+ 459 | return strndup(sun->sun_path, sizeof(sun->sun_path));
+ | ^
+
+ Signed-off-by: Steve Dickson <steved@redhat.com>
+
+diff --git a/support/nfs/getport.c b/support/nfs/getport.c
+index 813f7bf9..608e185b 100644
+--- a/support/nfs/getport.c
++++ b/support/nfs/getport.c
+@@ -452,11 +452,12 @@ char *nfs_sockaddr2universal(const struct sockaddr *sap)
+ uint16_t port;
+ size_t count;
+ char *result;
+- int len;
++ int len = sizeof(struct sockaddr);
+
+ switch (sap->sa_family) {
+ case AF_LOCAL:
+- return strndup(sun->sun_path, sizeof(sun->sun_path));
++ size_t path_len = len - offsetof(struct sockaddr_un, sun_path);
++ return strndup(sun->sun_path, path_len);
+ case AF_INET:
+ if (inet_ntop(AF_INET, (const void *)&sin->sin_addr.s_addr,
+ buf, (socklen_t)sizeof(buf)) == NULL)
diff --git a/nfs-utils-2.8.7-libnfsidmap-empty-realms.patch b/nfs-utils-2.8.7-libnfsidmap-empty-realms.patch
new file mode 100644
index 0000000..32b0653
--- /dev/null
+++ b/nfs-utils-2.8.7-libnfsidmap-empty-realms.patch
@@ -0,0 +1,39 @@
+commit fcd3161b98f8ff2964e3e275ad1c9977a37303f1
+Author: xuchenchen <xuchenchen@kylinos.cn>
+Date: Thu May 28 11:11:28 2026 -0400
+
+ libnfsidmap: avoid malloc(0) for empty Local-Realms
+
+ conf_get_list() can return an empty list when Local-Realms is present
+ but contains only empty fields, such as ", ,". In that case the Realms
+ list logging path computes a buffer size of zero and then writes a NUL
+ byte to the result of malloc(0).
+
+ Reserve space for the terminating NUL byte and use calloc() so the log
+ buffer is valid even when the realm list is empty.
+
+ Signed-off-by: xuchenchen <xuchenchen@kylinos.cn>
+ Signed-off-by: Steve Dickson <steved@redhat.com>
+
+diff --git a/support/nfsidmap/libnfsidmap.c b/support/nfsidmap/libnfsidmap.c
+index e1475879..5377a0ee 100644
+--- a/support/nfsidmap/libnfsidmap.c
++++ b/support/nfsidmap/libnfsidmap.c
+@@ -409,15 +409,14 @@ int nfs4_init_name_mapping(char *conffile)
+ if (idmap_verbosity >= 1) {
+ struct conf_list_node *r;
+ char *buf = NULL;
+- int siz=0;
++ size_t siz = 1;
+
+ if (local_realms) {
+ TAILQ_FOREACH(r, &local_realms->fields, link) {
+ siz += (strlen(r->field)+4);
+ }
+- buf = malloc(siz);
++ buf = calloc(1, siz);
+ if (buf) {
+- *buf = 0;
+ TAILQ_FOREACH(r, &local_realms->fields, link) {
+ sprintf(buf+strlen(buf), "'%s' ", r->field);
+ }
diff --git a/nfs-utils.spec b/nfs-utils.spec
index a11b26e..18c0250 100644
--- a/nfs-utils.spec
+++ b/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.8.7
-Release: 3%{?dist}
+Release: 4%{?dist}
Epoch: 1
# group all 32bit related archs
@@ -17,6 +17,8 @@ Source5: 10-nfsv3.conf
Patch001: nfs-utils-2.8.7-nfsdctl-no-listeners.patch
Patch002: nfs-utils-2.9.1-nfs-iostat-display-MBs.patch
+Patch003: nfs-utils-2.8.7-libnfsidmap-empty-realms.patch
+Patch004: nfs-utils-2.8.7-getport-warning.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch102: nfs-utils-1.2.5-idmap-errmsg.patch
@@ -477,6 +479,10 @@ rm -f %{_sysconfdir}/nfsmount.conf.d/10-nfsv4.conf
%{_mandir}/*/rpcctl.8.gz
%changelog
+* Sat May 30 2026 Steve Dickson <steved@redhat.com> 2.8.7-4
+- libnfsidmap: avoid malloc(0) for empty Local-Realms
+- Removed warnings in nfs_sockaddr2universal()
+
* Wed May 20 2026 Steve Dickson <steved@redhat.com> 2.8.7-3
- Add %%ghost to clean up 10-nfsv4.conf and 10-nfsv3.conf declarations
reply other threads:[~2026-05-31 12:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178022988415.1.17678480798569022474.rpms-nfs-utils-da59be9fbc39@fedoraproject.org \
--to=steved@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox