Date: Tue, 27 Jan 2026 18:44:32 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8c211a00d3b4 - stable/14 - ctld: Require a mask if / is specified in an initiator portal Message-ID: <69790790.20255.337ca042@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8c211a00d3b45b46b00e3fb99d803b65e7aadeee commit 8c211a00d3b45b46b00e3fb99d803b65e7aadeee Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-04-11 14:02:09 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-01-27 18:15:58 +0000 ctld: Require a mask if / is specified in an initiator portal If the / separator in a portal string is the last character in the string, treat the portal as invalid. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D49648 (cherry picked from commit 4449cf28a3152cf6e87a45176ae15ae250e543de) --- usr.sbin/ctld/ctld.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index 51983a42a8bf..bcde2f1ae433 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -350,6 +350,8 @@ auth_portal_new(struct auth_group *ag, const char *portal) dm = 32; } if (mask != NULL) { + if (mask[0] == '\0') + goto error; m = strtol(mask, &tmp, 0); if (m < 0 || m > dm || tmp[0] != 0) goto error;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69790790.20255.337ca042>
