git: bf60fb351df1 - stable/14 - ctld: Fail for missing or invalid CHAP secrets in UCL config

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 27 Jan 2026 18:44:08 UTC
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=bf60fb351df14fc6b5161cc28c1f130d6484d8ba

commit bf60fb351df14fc6b5161cc28c1f130d6484d8ba
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-02-12 19:27:06 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-01-27 18:15:56 +0000

    ctld: Fail for missing or invalid CHAP secrets in UCL config
    
    Reviewed by:    asomers
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D48931
    
    (cherry picked from commit f42f7bedabb329b68c7c9aa0d9a2dc49637d385f)
---
 usr.sbin/ctld/uclparse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c
index bd3c90283f6d..8654004d009e 100644
--- a/usr.sbin/ctld/uclparse.c
+++ b/usr.sbin/ctld/uclparse.c
@@ -73,6 +73,7 @@ uclparse_chap(struct auth_group *auth_group, const ucl_object_t *obj)
 	if (!secret || secret->type != UCL_STRING) {
 		log_warnx("chap section in auth-group \"%s\" is missing "
 		    "\"secret\" string key", auth_group->ag_name);
+		return (false);
 	}
 
 	ca = auth_new_chap(auth_group,