Date: Wed, 1 Oct 2025 00:56:24 GMT From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 4771b65fde48 - stable/15 - rpc_generic.c: Fix a rpcbind core dump when rpcinfo is done Message-ID: <202510010056.5910uOR9024215@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4771b65fde4893ffbb36f53fcd20e3b850a50b6a commit 4771b65fde4893ffbb36f53fcd20e3b850a50b6a Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2025-09-28 14:56:17 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2025-10-01 00:52:46 +0000 rpc_generic.c: Fix a rpcbind core dump when rpcinfo is done Commit c5d671b added netlink support to server side rpcbind. However it did not add a case for AF_NETLINK to __rpc_taddr2uaddr_af(). (Reported as PR#289625.) As such, without this patch the r_addr field of the netlink rbllist is NULL, which causes a crash in svc_sendreply() for a Dump query (what rpcinfo does). PR: 289625 (cherry picked from commit 70730cd21c9f2b0a80ff07e4491c0fe30f2d87c5) --- lib/libc/rpc/rpc_generic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c index 0e563f6a5996..8019f2d8f236 100644 --- a/lib/libc/rpc/rpc_generic.c +++ b/lib/libc/rpc/rpc_generic.c @@ -610,6 +610,10 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf) return NULL; break; #endif + case AF_NETLINK: + if (asprintf(&ret, "%s", (char *)nbuf->buf) < 0) + return NULL; + break; case AF_LOCAL: sun = nbuf->buf; if (asprintf(&ret, "%.*s", (int)(sun->sun_len -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510010056.5910uOR9024215>