pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/heimdal heimdal: updated to 7.8



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7a7c6eec7b02
branches:  trunk
changeset: 388538:7a7c6eec7b02
user:      adam <adam%pkgsrc.org@localhost>
date:      Tue Nov 22 12:51:00 2022 +0000

description:
heimdal: updated to 7.8

Heimdal 7.8 Latest
This release includes both the Heimdal 7.7.1 Security Vulnerability fixes and non-Security bug fixes/improvements.

Security Vulnerabilities:

CVE-2022-42898 PAC parse integer overflows

CVE-2022-3437 Overflows and non-constant time leaks in DES{,3} and arcfour

CVE-2022-41916 Fix Unicode normalization read of 1 bytes past end of array

CVE-2021-44758 A null pointer de-reference DoS in SPNEGO acceptors

CVE-2021-3671 A null pointer de-reference when handling missing sname in TGS-REQ

CVE-2022-44640 Heimdal KDC: invalid free in ASN.1 codec

Note that CVE-2022-44640 is a severe vulnerability, possibly a 10.0
on the Common Vulnerability Scoring System (CVSS) v3, as we believe
it should be possible to get an RCE on a KDC, which means that
credentials can be compromised that can be used to impersonate
anyone in a realm or forest of realms.

Heimdal's ASN.1 compiler generates code that allows specially
crafted DER encodings of CHOICEs to invoke the wrong free function
on the decoded structure upon decode error. This is known to impact
the Heimdal KDC, leading to an invalid free() of an address partly
or wholly under the control of the attacker, in turn leading to a
potential remote code execution (RCE) vulnerability.

This error affects the DER codec for all extensible CHOICE types
used in Heimdal, though not all cases will be exploitable. We have
not completed a thorough analysis of all the Heimdal components
affected, thus the Kerberos client, the X.509 library, and other
parts, may be affected as well.

This bug has been in Heimdal's ASN.1 compiler since 2005, but it may
only affect Heimdal 1.6 and up. It was first reported by Douglas
Bagnall, though it had been found independently by the Heimdal
maintainers via fuzzing a few weeks earlier.

While no zero-day exploit is known, such an exploit will likely be
available soon after public disclosure.

CVE-2019-14870: Validate client attributes in protocol-transition

CVE-2019-14870: Apply forwardable policy in protocol-transition

CVE-2019-14870: Always lookup impersonate client in DB

Other changes:

Bugs found by UBSAN (including the incorrect encoding of unconstrained
INTEGER value -1).

Errors found by the LLVM scan-build static analyzer.

Errors found by the valgrind memory debugger.

Work around GCC Bug 95189 (memcmp wrongly stripped like strcmp).

Correct ASN.1 OID typo for SHA-384

Fix a deadlock in in the MEMORY ccache type.

TGS: strip forwardable and proxiable flags if the server is
disallowed.

CVE-2019-14870: Validate client attributes in protocol-transition

CVE-2019-14870: Apply forwardable policy in protocol-transition

CVE-2019-14870: Always lookup impersonate client in DB

Incremental HDB propagation improvements

Refactor send_diffs making it progressive
Handle partial writes on non-blocking sockets
Disable Nagle in iprop master and slave
Use async I/O
Don't send I_HAVE in response to AYT
Do not recover log in kadm5_get_principal()
Don't send diffs to slaves with not yet known version
Don't stutter in send_diffs
Optional backwards-compatible anon-pkinit behavior

diffstat:

 security/heimdal/Makefile                            |  20 +++++++-----------
 security/heimdal/PLIST                               |   8 +++---
 security/heimdal/buildlink3.mk                       |   4 +-
 security/heimdal/builtin.mk                          |  20 +++++++++---------
 security/heimdal/distinfo                            |  11 +++------
 security/heimdal/patches/patch-kdc_krb5tgs.c         |  21 --------------------
 security/heimdal/patches/patch-lib_hdb_hdb-mitdb.c   |  15 --------------
 security/heimdal/patches/patch-lib_hx509_Makefile.in |  16 ---------------
 8 files changed, 28 insertions(+), 87 deletions(-)

diffs (275 lines):

diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/Makefile
--- a/security/heimdal/Makefile Tue Nov 22 11:30:51 2022 +0000
+++ b/security/heimdal/Makefile Tue Nov 22 12:51:00 2022 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.154 2022/06/28 11:35:35 wiz Exp $
+# $NetBSD: Makefile,v 1.155 2022/11/22 12:51:00 adam Exp $
 
-DISTNAME=      heimdal-7.7.0
-PKGREVISION=   5
+DISTNAME=      heimdal-7.8.0
 CATEGORIES=    security
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=heimdal/}
 GITHUB_RELEASE=        ${DISTNAME}
@@ -26,8 +25,6 @@
 
 BUILD_DEFS+=           VARBASE
 
-WRKSRC=                ${WRKDIR}/${DISTNAME}
-
 .include "options.mk"
 
 HEIMDAL_HDB_DIR=       ${VARBASE}/heimdal
@@ -39,10 +36,12 @@
 CONFIGURE_ARGS+=       --includedir=${PREFIX}/include/krb5
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=       --with-hdbdir=${HEIMDAL_HDB_DIR}
+CONFIGURE_ARGS+=       --with-readline=${BUILDLINK_PREFIX.editlinereadline}
 CONFIGURE_ARGS+=       --with-sqlite3=${BUILDLINK_PREFIX.sqlite3}
 CONFIGURE_ARGS+=       --without-x
 CONFIGURE_ARGS+=       ${ABI:D--with-mips-abi=${ABI}}
 CONFIGURE_ENV+=                COMPILE_ET=no   # build Heimdal's compile_et(1)
+CONFIGURE_ENV+=                PYTHON=${PYTHONBIN}
 
 .include "../../mk/bdb.buildlink3.mk"
 
@@ -61,10 +60,6 @@
 # to the BSD <vis.h> header.
 CONFIGURE_ENV.SunOS+=  ac_cv_header_vis_h=no
 
-.include "../../mk/readline.buildlink3.mk"
-
-CONFIGURE_ARGS+=       --with-readline=${BUILDLINK_PREFIX.editlinereadline}
-
 PLIST_VARS+=           glob vis afskauth
 
 .if ${OPSYS} == "SunOS"
@@ -111,10 +106,11 @@
 PTHREAD_AUTO_VARS=     yes
 .endif
 
-.include "../../mk/termcap.buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
-.include "../../mk/readline.buildlink3.mk"
+.include "../../lang/python/pyversion.mk"
 .include "../../security/openssl/buildlink3.mk"
 # integrated editline configure script that always runs checks for this
 .include "../../mk/curses.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/readline.buildlink3.mk"
+.include "../../mk/termcap.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/PLIST
--- a/security/heimdal/PLIST    Tue Nov 22 11:30:51 2022 +0000
+++ b/security/heimdal/PLIST    Tue Nov 22 12:51:00 2022 +0000
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.27 2021/10/21 07:51:41 wiz Exp $
+@comment $NetBSD: PLIST,v 1.28 2022/11/22 12:51:00 adam Exp $
+bin/${KRB5_PREFIX}su
 bin/afslog
 bin/bsearch
 bin/gsstool
@@ -19,7 +20,6 @@
 bin/otpprint
 bin/pagsh
 bin/string2key
-bin/${KRB5_PREFIX}su
 bin/verify_krb5_conf
 include/krb5/asn1-common.h
 include/krb5/asn1_err.h
@@ -55,7 +55,6 @@
 include/krb5/hcrypto/evp-pkcs11.h
 include/krb5/hcrypto/evp.h
 include/krb5/hcrypto/hmac.h
-include/krb5/hcrypto/md2.h
 include/krb5/hcrypto/md4.h
 include/krb5/hcrypto/md5.h
 include/krb5/hcrypto/pkcs12.h
@@ -170,6 +169,7 @@
 libexec/kfd
 libexec/kimpersonate
 libexec/kpasswdd
+man/man1/${KRB5_PREFIX}su.1
 man/man1/afslog.1
 man/man1/bsearch.1
 man/man1/kadmin.1
@@ -185,7 +185,6 @@
 man/man1/otp.1
 man/man1/otpprint.1
 man/man1/pagsh.1
-man/man1/${KRB5_PREFIX}su.1
 man/man3/HDB.3
 man/man3/arg_printusage.3
 man/man3/data.3
@@ -940,6 +939,7 @@
 man/man3/krb5_plugin_register.3
 man/man3/krb5_prepend_config_files.3
 man/man3/krb5_prepend_config_files_default.3
+man/man3/krb5_prepend_error_message.3
 man/man3/krb5_princ_realm.3
 man/man3/krb5_princ_set_realm.3
 man/man3/krb5_principal.3
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/buildlink3.mk
--- a/security/heimdal/buildlink3.mk    Tue Nov 22 11:30:51 2022 +0000
+++ b/security/heimdal/buildlink3.mk    Tue Nov 22 12:51:00 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.68 2022/06/28 11:35:35 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.69 2022/11/22 12:51:00 adam Exp $
 
 BUILDLINK_TREE+=       heimdal
 
@@ -22,7 +22,7 @@
 CHECK_BUILTIN.heimdal:=        yes
 .include "../../security/heimdal/builtin.mk"
 CHECK_BUILTIN.heimdal:=        no
-.if !empty(USE_BUILTIN.heimdal:M[nN][oO])
+.if ${USE_BUILTIN.heimdal:tl} == no
 .include "../../databases/sqlite3/buildlink3.mk"
 .include "../../mk/bdb.buildlink3.mk"
 .endif
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/builtin.mk
--- a/security/heimdal/builtin.mk       Tue Nov 22 11:30:51 2022 +0000
+++ b/security/heimdal/builtin.mk       Tue Nov 22 12:51:00 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.18 2021/10/21 07:46:02 wiz Exp $
+# $NetBSD: builtin.mk,v 1.19 2022/11/22 12:51:00 adam Exp $
 
 BUILTIN_PKG:=  heimdal
 
@@ -28,7 +28,7 @@
 ### a package name to represent the built-in package.
 ###
 .if !defined(BUILTIN_PKG.heimdal) && \
-    !empty(IS_BUILTIN.heimdal:M[yY][eE][sS])
+    ${IS_BUILTIN.heimdal:tl} == yes
 .  if empty(SH_KRB5_CONFIG:M__nonexistent__)
 BUILTIN_VERSION.heimdal!=      ${SH_KRB5_CONFIG} --version |           \
                                ${AWK} '{ print $$2; exit }'
@@ -72,21 +72,21 @@
 USE_BUILTIN.heimdal=   no
 .  else
 USE_BUILTIN.heimdal=   ${IS_BUILTIN.heimdal}
-.    if !empty(USE_BUILTIN.heimdal:M[yY][eE][sS])
+.    if ${USE_BUILTIN.heimdal:tl} == yes
 CHECK_BUILTIN.openssl:=        yes
 .      include "../../security/openssl/builtin.mk"
 CHECK_BUILTIN.openssl:=        no
-.      if !empty(USE_BUILTIN.openssl:M[Nn][Oo])
+.      if ${USE_BUILTIN.openssl:tl} == no
 USE_BUILTIN.heimdal=   no
 .      endif
 .    endif
 .    if defined(BUILTIN_PKG.heimdal) && \
-        !empty(IS_BUILTIN.heimdal:M[yY][eE][sS])
+       ${IS_BUILTIN.heimdal:tl} == yes
 USE_BUILTIN.heimdal?=  yes
 .      for _dep_ in ${BUILDLINK_API_DEPENDS.heimdal}
-.        if !empty(USE_BUILTIN.heimdal:M[yY][eE][sS])
+.        if ${USE_BUILTIN.heimdal:tl} == yes
 USE_BUILTIN.heimdal!=                                                  \
-       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.heimdal:Q}; then \
+       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.heimdal}; then  \
                ${ECHO} yes;                                            \
        else                                                            \
                ${ECHO} no;                                             \
@@ -103,9 +103,9 @@
 ### solely to determine whether a built-in implementation exists.
 ###
 CHECK_BUILTIN.heimdal?=        no
-.if !empty(CHECK_BUILTIN.heimdal:M[nN][oO])
+.if ${CHECK_BUILTIN.heimdal:tl} == no
 
-.  if !empty(USE_BUILTIN.heimdal:M[nN][oO])
+.  if ${USE_BUILTIN.heimdal:tl} == no
 BUILDLINK_API_DEPENDS.heimdal+=        heimdal>=0.6
 
 KRB5_CONFIG?=  ${BUILDLINK_PREFIX.heimdal}/bin/krb5-config
@@ -113,7 +113,7 @@
 MAKE_ENV+=     KRB5_CONFIG=${KRB5_CONFIG:Q}
 .  endif
 
-.  if !empty(USE_BUILTIN.heimdal:M[yY][eE][sS])
+.  if ${USE_BUILTIN.heimdal:tl} == yes
 .    if !empty(SH_KRB5_CONFIG:M__nonexistent__)
 BUILDLINK_TARGETS+=    fake-krb5-config
 
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/distinfo
--- a/security/heimdal/distinfo Tue Nov 22 11:30:51 2022 +0000
+++ b/security/heimdal/distinfo Tue Nov 22 12:51:00 2022 +0000
@@ -1,8 +1,5 @@
-$NetBSD: distinfo,v 1.54 2022/01/27 03:31:21 gutteridge Exp $
+$NetBSD: distinfo,v 1.55 2022/11/22 12:51:00 adam Exp $
 
-BLAKE2s (heimdal-7.7.0.tar.gz) = c56e08d20b8c4f7ce749e5dfbf643b2b8c0f1ca057719e95cc9eb69c48e49df6
-SHA512 (heimdal-7.7.0.tar.gz) = 6660939b5a36ce36310721a08a089fb671d1e3d2e8ac74ea4775bfa5f8f772d32de805551456200fe96cc486c092c44beb84f5dd877008bc305490ee971bbf99
-Size (heimdal-7.7.0.tar.gz) = 10189293 bytes
-SHA1 (patch-kdc_krb5tgs.c) = 76a5cd9031a44a51e5e11c1e1226ff1ae52b9628
-SHA1 (patch-lib_hdb_hdb-mitdb.c) = 37fd0cc328986e68212c4eaea106c422dea87192
-SHA1 (patch-lib_hx509_Makefile.in) = 1f8efecaf79ef2726d047bf21b9cb0b8be230dce
+BLAKE2s (heimdal-7.8.0.tar.gz) = 3f2654141605a1f54611c887ec8a7f55e45b00696983207d5779ad830e485cb8
+SHA512 (heimdal-7.8.0.tar.gz) = 0167345aca77d65b7a1113874eee5b65ec6e1fec1f196d57e571265409fa35ef95a673a4fd4aafbb0ab5fb5b246b97412353a68d6613a8aff6393a9f1e72999e
+Size (heimdal-7.8.0.tar.gz) = 10024936 bytes
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/patches/patch-kdc_krb5tgs.c
--- a/security/heimdal/patches/patch-kdc_krb5tgs.c      Tue Nov 22 11:30:51 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-$NetBSD: patch-kdc_krb5tgs.c,v 1.1 2021/11/17 08:46:02 wiz Exp $
-
-Fix CVE-2021-3671
-Patch from samba
-https://gitlab.com/samba-team/samba/-/commit/0cb4b939f192376bf5e33637863a91a20f74c5a5
-via https://github.com/heimdal/heimdal/issues/849
-
---- kdc/krb5tgs.c.orig 2019-06-07 06:21:39.000000000 +0000
-+++ kdc/krb5tgs.c
-@@ -1660,6 +1660,11 @@ tgs_build_reply(krb5_context context,
- 
-       s = &adtkt.cname;
-       r = adtkt.crealm;
-+    } else if (s == NULL) {
-+      ret = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
-+      krb5_set_error_message(context, ret, "No server in request");
-+      goto out;
-+
-     }
- 
-     _krb5_principalname2krb5_principal(context, &sp, *s, r);
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/patches/patch-lib_hdb_hdb-mitdb.c
--- a/security/heimdal/patches/patch-lib_hdb_hdb-mitdb.c        Tue Nov 22 11:30:51 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-lib_hdb_hdb-mitdb.c,v 1.1 2021/10/21 07:46:02 wiz Exp $
-
-Fix compilation error (already fixed upstream).
-
---- lib/hdb/hdb-mitdb.c.orig   2019-06-07 06:21:39.000000000 +0000
-+++ lib/hdb/hdb-mitdb.c
-@@ -1116,7 +1116,7 @@ krb5_error_code
- hdb_mitdb_create(krb5_context context, HDB **db,
-                const char *filename)
- {
--    MITDB **mdb (MITDB **)db;
-+    MITDB **mdb = (MITDB **)db;
-     *mdb = calloc(1, sizeof(**mdb));
-     if (*mdb == NULL) {
-       krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
diff -r a5e9e252678b -r 7a7c6eec7b02 security/heimdal/patches/patch-lib_hx509_Makefile.in
--- a/security/heimdal/patches/patch-lib_hx509_Makefile.in      Tue Nov 22 11:30:51 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-lib_hx509_Makefile.in,v 1.3 2022/01/27 03:31:21 gutteridge Exp $
-
-Wait for generated includes.
-https://github.com/heimdal/heimdal/issues/851
-
---- lib/hx509/Makefile.in.orig 2019-06-07 06:23:17.000000000 +0000
-+++ lib/hx509/Makefile.in
-@@ -2082,7 +2082,7 @@ $(srcdir)/hx509-private.h: $(dist_libhx5
- hxtool-commands.c hxtool-commands.h: hxtool-commands.in $(SLC)
-       $(heim_verbose)$(SLC) $(srcdir)/hxtool-commands.in
- 
--$(hxtool_OBJECTS): hxtool-commands.h hx509_err.h
-+$(hxtool_OBJECTS): hxtool-commands.h $(nodist_include_HEADERS)
- 
- clean-local:
-       @echo "cleaning PKITS" ; rm -rf PKITS_data



Home | Main Index | Thread Index | Old Index