From nobody Thu Nov 24 17:27:08 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NJ4gK0qf0z4hhjR; Thu, 24 Nov 2022 17:27:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NJ4gK0GsCz3h0r; Thu, 24 Nov 2022 17:27:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669310829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tigdimn9rTOhAb7AIC1RHNNfUpF3gPEAzMcm4tgJOe8=; b=A0NS560irdfUs/wBmXJ2g0YBxuPPZGNVE5PhcIozlobWhsjNGkzbkyW8aStmpMagRyEZaK fd0KR28E0kIaVIjMLPEy2raIs6MmxXtEC0hh9gaGe+jXxeUsATP/wXDgebhKXIzjWSqlZO LTdN9YfgkEy0yXvMnZExuVixrZouyGXIIii2djc7y4wA7fFsxIch75dUA3+hW9/A8ZEHHX RCNuQrj9POQv5smilor320/9fls396dr/h/o1+hC8N/Eyi3ZFFyOyGajaMaEkLWfCN85Ax 98GiO+HE4j/HxmSKVDSZUqWVoRfDM9Jw7VMMzN/XXMr5+8FRPIeh7Eomn0PTBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669310829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tigdimn9rTOhAb7AIC1RHNNfUpF3gPEAzMcm4tgJOe8=; b=NZ5d7Tg+KHH3sh6n2WJ7aW7abnyWq400AGDNjOGpF5qwqge4nIIrHt8zDgGmQ7cCNjDqjc pkLulJXgvZMpwdjM7V9oT26TVdIAfD246vXtfe7/baDgZQW3cA43cfycojYYYY3o2VwRLP QxQF0kXhuxmvWoGXWulpDz6pMHfFt5tz9SD5byx+aVr2kJN1UuAiI8aCFDxnUNinZa1KjY V6DSzkYNZlRJVIrzuOwBDdYkE05+88l+oOPzUg2WP/DNdBhLGNegRavSo48Meh9TIovJh5 1HMJCVynXN2tx3rDl+TWGbd//NgHkpiixAFiMBpz5NyOD6Ne3foabYJfDNZcCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669310829; a=rsa-sha256; cv=none; b=WbEgZU69hnewpY8XVHPdMsVIVMtifOfuWztwXji1aXS+Dta5f0+x5GASLrqWmHWPwJzXWd H35Oq0HxpVIK+43+uOyWkmgEftpPjMY3EAzNoJwOERKNIIEd1N3G7dpdV8pPgkS1PehaL8 espbt35ZPNArj8JwgsV1VF91s6WL9rNrEZ1SPeW+oZ8vIhHSYatMAongaeATQsA9tcp6fg 26oa7g4fb4yIYv6T8lin2Mg/1UNzINsIyIpGnYUYO5LlBV96dF+jxh95BcDKw07WyRBlk2 spwnG7YV0Pxt8+nl9TOHbOy1RsIkZa+MYN5mvdBvj/mx4LLEGEB8YaoI0wMwyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NJ4gJ5Wfhz18QM; Thu, 24 Nov 2022 17:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AOHR838009268; Thu, 24 Nov 2022 17:27:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AOHR8T6009267; Thu, 24 Nov 2022 17:27:08 GMT (envelope-from git) Date: Thu, 24 Nov 2022 17:27:08 GMT Message-Id: <202211241727.2AOHR8T6009267@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 8cafd5bc0d86 - main - security/heimdal*: Handle other types of garbage data List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cafd5bc0d866a425eb883e00cef02df1ef31db4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=8cafd5bc0d866a425eb883e00cef02df1ef31db4 commit 8cafd5bc0d866a425eb883e00cef02df1ef31db4 Author: Cy Schubert AuthorDate: 2022-11-24 16:52:45 +0000 Commit: Cy Schubert CommitDate: 2022-11-24 17:22:43 +0000 security/heimdal*: Handle other types of garbage data In addition to garbage realm data, also handle garbage dbname, acl_file, stash_file, and invalid bitmask garbage data. PR: 267912 Reported by: Robert Morris MFH: 2022Q4 --- security/heimdal-devel/Makefile | 2 +- .../heimdal-devel/files/patch-lib_kadm5_marshall.c | 32 ++++++++++++++++++++-- security/heimdal/Makefile | 2 +- security/heimdal/files/patch-lib_kadm5_marshall.c | 32 ++++++++++++++++++++-- 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/security/heimdal-devel/Makefile b/security/heimdal-devel/Makefile index bdd92c199ab5..43a4a0a52cd8 100644 --- a/security/heimdal-devel/Makefile +++ b/security/heimdal-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= heimdal PORTVERSION= ${HEIMDAL_COMMIT_DATE} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= security PKGNAMESUFFIX= -devel HASH= 8f9c2d115 diff --git a/security/heimdal-devel/files/patch-lib_kadm5_marshall.c b/security/heimdal-devel/files/patch-lib_kadm5_marshall.c index 8cc79bafcc8c..8bc63095693f 100644 --- a/security/heimdal-devel/files/patch-lib_kadm5_marshall.c +++ b/security/heimdal-devel/files/patch-lib_kadm5_marshall.c @@ -1,7 +1,14 @@ --- lib/kadm5/marshall.c.orig 2022-11-17 16:55:32.000000000 -0800 -+++ lib/kadm5/marshall.c 2022-11-24 08:17:04.255672000 -0800 -@@ -465,8 +465,12 @@ ++++ lib/kadm5/marshall.c 2022-11-24 08:47:49.092069000 -0800 +@@ -463,10 +463,40 @@ + ret = krb5_ret_int32(sp, &mask); + if (ret) goto out; ++ if (mask & KADM5_CONFIG_REALM & KADM5_CONFIG_DBNAME ++ & KADM5_CONFIG_ACL_FILE & KADM5_CONFIG_STASH_FILE) { ++ ret = EINVAL; ++ goto out; ++ } params->mask = mask; - if(params->mask & KADM5_CONFIG_REALM) @@ -9,6 +16,27 @@ ret = krb5_ret_string(sp, ¶ms->realm); + if (params->realm == NULL) { + ret = EINVAL; ++ goto out; ++ } ++ } ++ if (params->mask & KADM5_CONFIG_DBNAME) { ++ ret = krb5_ret_string(sp, ¶ms->dbname); ++ if (params->dbname == NULL) { ++ ret = EINVAL; ++ goto out; ++ } ++ } ++ if (params->mask & KADM5_CONFIG_ACL_FILE) { ++ ret = krb5_ret_string(sp, ¶ms->acl_file); ++ if (params->acl_file == NULL) { ++ ret = EINVAL; ++ goto out; ++ } ++ } ++ if (params->mask & KADM5_CONFIG_STASH_FILE) { ++ ret = krb5_ret_string(sp, ¶ms->stash_file); ++ if (params->stash_file == NULL) { ++ ret = EINVAL; + } + } out: diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index 93995fde6703..dc32a73987be 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -1,6 +1,6 @@ PORTNAME= heimdal PORTVERSION= 7.8.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= security MASTER_SITES= https://github.com/heimdal/heimdal/releases/download/${DISTNAME}/ diff --git a/security/heimdal/files/patch-lib_kadm5_marshall.c b/security/heimdal/files/patch-lib_kadm5_marshall.c index d02a364d7011..d44311d5edbf 100644 --- a/security/heimdal/files/patch-lib_kadm5_marshall.c +++ b/security/heimdal/files/patch-lib_kadm5_marshall.c @@ -1,7 +1,14 @@ --- lib/kadm5/marshall.c.orig 2022-09-15 16:54:19.000000000 -0700 -+++ lib/kadm5/marshall.c 2022-11-24 08:26:55.920305000 -0800 -@@ -409,8 +409,12 @@ ++++ lib/kadm5/marshall.c 2022-11-24 08:47:40.099673000 -0800 +@@ -407,10 +407,40 @@ + ret = krb5_ret_int32(sp, &mask); + if (ret) goto out; ++ if (mask & KADM5_CONFIG_REALM & KADM5_CONFIG_DBNAME ++ & KADM5_CONFIG_ACL_FILE & KADM5_CONFIG_STASH_FILE) { ++ ret = EINVAL; ++ goto out; ++ } params->mask = mask; - if(params->mask & KADM5_CONFIG_REALM) @@ -9,6 +16,27 @@ ret = krb5_ret_string(sp, ¶ms->realm); + if (params->realm == NULL) { + ret = EINVAL; ++ goto out; ++ } ++ } ++ if (params->mask & KADM5_CONFIG_DBNAME) { ++ ret = krb5_ret_string(sp, ¶ms->dbname); ++ if (params->dbname == NULL) { ++ ret = EINVAL; ++ goto out; ++ } ++ } ++ if (params->mask & KADM5_CONFIG_ACL_FILE) { ++ ret = krb5_ret_string(sp, ¶ms->acl_file); ++ if (params->acl_file == NULL) { ++ ret = EINVAL; ++ goto out; ++ } ++ } ++ if (params->mask & KADM5_CONFIG_STASH_FILE) { ++ ret = krb5_ret_string(sp, ¶ms->stash_file); ++ if (params->stash_file == NULL) { ++ ret = EINVAL; + } + } out: