Date: Mon, 08 Jun 2026 13:52:39 +0000 From: Cy Schubert <cy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: fce16f60de97 - main - krb5: Fix reachable assert when importing krb5 names Message-ID: <6a26c927.412c6.2e60e78e@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fce16f60de9718be6b789f00e86141a84cd920d3 commit fce16f60de9718be6b789f00e86141a84cd920d3 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2026-06-02 18:09:43 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2026-06-08 13:52:04 +0000 krb5: Fix reachable assert when importing krb5 names If a name token contains trailing garbage, error out from krb5_gss_import_name() instead of crashing the process with an assertion failure. Commit message details obtained from upstream commit. Obtained from: upstream commit 07818f1fd Reported by: Aisle Research (Ze Sheng, Dmitrijs Trizna, Luigino Camastra, Guido Vranken) to krb5-bugs MFC after: 3 days --- crypto/krb5/src/lib/gssapi/krb5/import_name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/krb5/src/lib/gssapi/krb5/import_name.c b/crypto/krb5/src/lib/gssapi/krb5/import_name.c index a067d0742331..b4c29b442511 100644 --- a/crypto/krb5/src/lib/gssapi/krb5/import_name.c +++ b/crypto/krb5/src/lib/gssapi/krb5/import_name.c @@ -297,7 +297,8 @@ import_name(OM_uint32 *minor_status, gss_buffer_t input_name_buffer, goto fail_name; cp += length; } - assert(cp == end); + if (cp != end) + goto fail_name; } else { status = GSS_S_BAD_NAMETYPE; goto cleanup;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a26c927.412c6.2e60e78e>
