Thu Feb 20 15:27:31 2020 UTC ()
mbedtls: Update to 2.16.4

Security
   * Fix side channel vulnerability in ECDSA. Our bignum implementation is not
     constant time/constant trace, so side channel attacks can retrieve the
     blinded value, factor it (as it is smaller than RSA keys and not guaranteed
     to have only large prime factors), and then, by brute force, recover the
     key. Reported by Alejandro Cabrera Aldaya and Billy Brumley.
   * Zeroize local variables in mbedtls_internal_aes_encrypt() and
     mbedtls_internal_aes_decrypt() before exiting the function. The value of
     these variables can be used to recover the last round key. To follow best
     practice and to limit the impact of buffer overread vulnerabilities (like
     Heartbleed) we need to zeroize them before exiting the function.
     Issue reported by Tuba Yavuz, Farhaan Fowze, Ken (Yihang) Bai,
     Grant Hernandez, and Kevin Butler (University of Florida) and
     Dave Tian (Purdue University).
   * Fix side channel vulnerability in ECDSA key generation. Obtaining precise
     timings on the comparison in the key generation enabled the attacker to
     learn leading bits of the ephemeral key used during ECDSA signatures and to
     recover the private key. Reported by Jeremy Dubeuf.
   * Catch failure of AES functions in mbedtls_ctr_drbg_random(). Uncaught
     failures could happen with alternative implementations of AES. Bug
     reported and fix proposed by Johan Uppman Bruce and Christoffer Lauri,
     Sectra.

Bugfix
   * Remove redundant line for getting the bitlen of a bignum, since the variable
     holding the returned value is overwritten a line after.
     Found by irwir in #2377.
   * Support mbedtls_hmac_drbg_set_entropy_len() and
     mbedtls_ctr_drbg_set_entropy_len() before the DRBG is seeded. Before,
     the initial seeding always reset the entropy length to the compile-time
     default.

Changes
   * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx()
     from the cipher abstraction layer. Fixes #2198.
   * Clarify how the interface of the CTR_DRBG and HMAC modules relates to
     NIST SP 800-90A. In particular CTR_DRBG requires an explicit nonce
     to achieve a 256-bit strength if MBEDTLS_ENTROPY_FORCE_SHA256 is set.


(nia)
diff -r1.10 -r1.11 pkgsrc/security/mbedtls/Makefile
diff -r1.4 -r1.5 pkgsrc/security/mbedtls/PLIST
diff -r1.6 -r1.7 pkgsrc/security/mbedtls/distinfo

cvs diff -r1.10 -r1.11 pkgsrc/security/mbedtls/Makefile (expand / switch to unified diff)

--- pkgsrc/security/mbedtls/Makefile 2020/01/18 21:50:40 1.10
+++ pkgsrc/security/mbedtls/Makefile 2020/02/20 15:27:31 1.11
@@ -1,18 +1,17 @@ @@ -1,18 +1,17 @@
1# $NetBSD: Makefile,v 1.10 2020/01/18 21:50:40 jperkin Exp $ 1# $NetBSD: Makefile,v 1.11 2020/02/20 15:27:31 nia Exp $
2 2
3DISTNAME= mbedtls-2.16.3-apache 3DISTNAME= mbedtls-2.16.4-apache
4PKGNAME= ${DISTNAME:-apache=} 4PKGNAME= ${DISTNAME:-apache=}
5PKGREVISION= 1 
6CATEGORIES= security devel 5CATEGORIES= security devel
7MASTER_SITES= https://tls.mbed.org/download/ 6MASTER_SITES= https://tls.mbed.org/download/
8EXTRACT_SUFX= .tgz 7EXTRACT_SUFX= .tgz
9 8
10MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://tls.mbed.org/ 10HOMEPAGE= https://tls.mbed.org/
12COMMENT= Lightweight, modular cryptographic and SSL/TLS library 11COMMENT= Lightweight, modular cryptographic and SSL/TLS library
13LICENSE= apache-2.0 12LICENSE= apache-2.0
14 13
15CONFLICTS+= polarssl-[0-9]* 14CONFLICTS+= polarssl-[0-9]*
16SUPERSEDES+= polarssl-[0-9]* 15SUPERSEDES+= polarssl-[0-9]*
17 16
18WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} 17WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}

cvs diff -r1.4 -r1.5 pkgsrc/security/mbedtls/PLIST (expand / switch to unified diff)

--- pkgsrc/security/mbedtls/PLIST 2019/10/01 17:44:11 1.4
+++ pkgsrc/security/mbedtls/PLIST 2020/02/20 15:27:31 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.4 2019/10/01 17:44:11 nia Exp $ 1@comment $NetBSD: PLIST,v 1.5 2020/02/20 15:27:31 nia Exp $
2${PLIST.tools}bin/aescrypt2 2${PLIST.tools}bin/aescrypt2
3${PLIST.tools}bin/benchmark 3${PLIST.tools}bin/benchmark
4${PLIST.tools}bin/cert_app 4${PLIST.tools}bin/cert_app
5${PLIST.tools}bin/cert_req 5${PLIST.tools}bin/cert_req
6${PLIST.tools}bin/cert_write 6${PLIST.tools}bin/cert_write
7${PLIST.tools}bin/crl_app 7${PLIST.tools}bin/crl_app
8${PLIST.tools}bin/crypt_and_hash 8${PLIST.tools}bin/crypt_and_hash
9${PLIST.tools}bin/dh_client 9${PLIST.tools}bin/dh_client
10${PLIST.tools}bin/dh_genprime 10${PLIST.tools}bin/dh_genprime
11${PLIST.tools}bin/dh_server 11${PLIST.tools}bin/dh_server
12${PLIST.tools}bin/dtls_client 12${PLIST.tools}bin/dtls_client
13${PLIST.tools}bin/dtls_server 13${PLIST.tools}bin/dtls_server
14${PLIST.tools}bin/gen_entropy 14${PLIST.tools}bin/gen_entropy
@@ -111,23 +111,23 @@ include/mbedtls/ssl_ciphersuites.h @@ -111,23 +111,23 @@ include/mbedtls/ssl_ciphersuites.h
111include/mbedtls/ssl_cookie.h 111include/mbedtls/ssl_cookie.h
112include/mbedtls/ssl_internal.h 112include/mbedtls/ssl_internal.h
113include/mbedtls/ssl_ticket.h 113include/mbedtls/ssl_ticket.h
114include/mbedtls/threading.h 114include/mbedtls/threading.h
115include/mbedtls/timing.h 115include/mbedtls/timing.h
116include/mbedtls/version.h 116include/mbedtls/version.h
117include/mbedtls/x509.h 117include/mbedtls/x509.h
118include/mbedtls/x509_crl.h 118include/mbedtls/x509_crl.h
119include/mbedtls/x509_crt.h 119include/mbedtls/x509_crt.h
120include/mbedtls/x509_csr.h 120include/mbedtls/x509_csr.h
121include/mbedtls/xtea.h 121include/mbedtls/xtea.h
122lib/libmbedcrypto.a 122lib/libmbedcrypto.a
123lib/libmbedcrypto.so 123lib/libmbedcrypto.so
124lib/libmbedcrypto.so.${PKGVERSION} 124lib/libmbedcrypto.so.2.16.3
125lib/libmbedcrypto.so.3 125lib/libmbedcrypto.so.3
126lib/libmbedtls.a 126lib/libmbedtls.a
127lib/libmbedtls.so 127lib/libmbedtls.so
128lib/libmbedtls.so.12 128lib/libmbedtls.so.12
129lib/libmbedtls.so.${PKGVERSION} 129lib/libmbedtls.so.2.16.3
130lib/libmbedx509.a 130lib/libmbedx509.a
131lib/libmbedx509.so 131lib/libmbedx509.so
132lib/libmbedx509.so.0 132lib/libmbedx509.so.0
133lib/libmbedx509.so.${PKGVERSION} 133lib/libmbedx509.so.2.16.3

cvs diff -r1.6 -r1.7 pkgsrc/security/mbedtls/distinfo (expand / switch to unified diff)

--- pkgsrc/security/mbedtls/distinfo 2019/10/01 17:44:11 1.6
+++ pkgsrc/security/mbedtls/distinfo 2020/02/20 15:27:31 1.7
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.6 2019/10/01 17:44:11 nia Exp $ 1$NetBSD: distinfo,v 1.7 2020/02/20 15:27:31 nia Exp $
2 2
3SHA1 (mbedtls-2.16.3-apache.tgz) = dce8550f8f9465f3aea44cb7d0f9d0ba8140034a 3SHA1 (mbedtls-2.16.4-apache.tgz) = e446cbac7d24fc3ff1b1c4ee7c021694ede86db6
4RMD160 (mbedtls-2.16.3-apache.tgz) = 611635dce5ac99372272dd5c6edcb64d886f6e3b 4RMD160 (mbedtls-2.16.4-apache.tgz) = 1b3f927dc2ff886bca1877beb4808a35a7414e8a
5SHA512 (mbedtls-2.16.3-apache.tgz) = 62b984d04570334e740ff8b857b4dad73804a4d0aec22b224cb813eb8a6a4b2ec9bff3126c198552e030da94201fd98ed764e8b9f53056e2f94a51dfdbb47cdd 5SHA512 (mbedtls-2.16.4-apache.tgz) = 7b72a83c941bcb2b6b7710e00e68e390ee3c856eff957ff1608fe9d59c4d40b36f536283a83d3a1c4fe53dc268e877a56360f3654d226f967a881287df3dcbe7
6Size (mbedtls-2.16.3-apache.tgz) = 2553709 bytes 6Size (mbedtls-2.16.4-apache.tgz) = 2692484 bytes
7SHA1 (patch-library_net__sockets.c) = cd8f9cf84947800eb73d004847789626511ceb35 7SHA1 (patch-library_net__sockets.c) = cd8f9cf84947800eb73d004847789626511ceb35