pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/mbedtls
Module Name: pkgsrc
Committed By: nia
Date: Sun May 2 08:16:14 UTC 2021
Modified Files:
pkgsrc/security/mbedtls: Makefile PLIST buildlink3.mk distinfo
Log Message:
mbedtls: update to 2.26.0
This release of Mbed TLS provides bug fixes, minor enhancements and new features. This release includes fixes for security issues.
API changes
Renamed the PSA Crypto API output buffer size macros to bring them in line
with version 1.0.0 of the specification.
The API glue function mbedtls_ecc_group_of_psa() now takes the curve size
in bits rather than bytes, with an additional flag to indicate if the
size may have been rounded up to a whole number of bytes.
Renamed the PSA Crypto API AEAD tag length macros to bring them in line
with version 1.0.0 of the specification.
Default behavior changes
In mbedtls_rsa_context objects, the ver field was formerly documented
as always 0. It is now reserved for internal purposes and may take
different values.
New deprecations
PSA_KEY_EXPORT_MAX_SIZE, PSA_HASH_SIZE, PSA_MAC_FINAL_SIZE,
PSA_BLOCK_CIPHER_BLOCK_SIZE, PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE and
PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN have been renamed, and the old names
deprecated.
PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH
have been renamed, and the old names deprecated.
Features
The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG.
CTR_DRBG is used by default if it is available, but you can override
this choice by setting MBEDTLS_PSA_HMAC_DRBG_MD_TYPE at compile time.
Fix #3354.
Automatic fallback to a software implementation of ECP when
MBEDTLS_ECP_xxx_ALT accelerator hooks are in use can now be turned off
through setting the new configuration flag MBEDTLS_ECP_NO_FALLBACK.
The PSA crypto subsystem can now be configured to use less static RAM by
tweaking the setting for the maximum amount of keys simultaneously in RAM.
MBEDTLS_PSA_KEY_SLOT_COUNT sets the maximum number of volatile keys that
can exist simultaneously. It has a sensible default if not overridden.
Partial implementation of the PSA crypto driver interface: Mbed TLS can
now use an external random generator instead of the library's own
entropy collection and DRBG code. Enable MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
and see the documentation of mbedtls_psa_external_get_random() for details.
Applications using both mbedtls_xxx and psa_xxx functions (for example,
applications using TLS and MBEDTLS_USE_PSA_CRYPTO) can now use the PSA
random generator with mbedtls_xxx functions. See the documentation of
mbedtls_psa_get_random() for details.
In the PSA API, the policy for a MAC or AEAD algorithm can specify a
minimum MAC or tag length thanks to the new wildcards
PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and
PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG.
Security
Fix a security reduction in CTR_DRBG when the initial seeding obtained a
nonce from entropy. Applications were affected if they called
mbedtls_ctr_drbg_set_nonce_len(), if they called
mbedtls_ctr_drbg_set_entropy_len() with a size that was 3/2 times the key
length, or when the entropy module uses SHA-256 and CTR_DRBG uses AES-256.
In such cases, a random nonce was necessary to achieve the advertised
security strength, but the code incorrectly used a constant instead of
entropy from the nonce.
Found by John Stroebel in #3819 and fixed in #3973.
Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating
|A| - |B| where |B| is larger than |A| and has more limbs (so the
function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only
applications calling mbedtls_mpi_sub_abs() directly are affected:
all calls inside the library were safe since this function is
only called with |A| >= |B|. Reported by Guido Vranken in #4042.
Fix an errorneous estimation for an internal buffer in
mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd
value the function might fail to write a private RSA keys of the largest
supported size.
Found by Daniel Otte, reported in #4093 and fixed in #4094.
Fix a stack buffer overflow with mbedtls_net_poll() and
mbedtls_net_recv_timeout() when given a file descriptor that is
beyond FD_SETSIZE. Reported by FigBug in #4169.
Guard against strong local side channel attack against base64 tables by
making access aceess to them use constant flow code.
Bugfix
Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c
Fix memory leak that occured when calling psa_close_key() on a
wrapped key with MBEDTLS_PSA_CRYPTO_SE_C defined.
Fix an incorrect error code if an RSA private operation glitched.
Fix a memory leak in an error case in psa_generate_derived_key_internal().
Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C
is enabled, on platforms where initializing a mutex allocates resources.
This was a regression introduced in the previous release. Reported in
#4017, #4045 and #4071.
Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free()
twice is safe. This happens for RSA when some Mbed TLS library functions
fail. Such a double-free was not safe when MBEDTLS_THREADING_C was
enabled on platforms where freeing a mutex twice is not safe.
Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key()
when MBEDTLS_THREADING_C is enabled on platforms where initializing
a mutex allocates resources.
Fixes a bug where, if the library was configured to include support for
both the old SE interface and the new PSA driver interface, external keys were
not loaded from storage. This was fixed by #3996.
This change makes 'mbedtls_x509write_crt_set_basic_constraints'
consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST
include this extension in all CA certificates that contain public keys
used to validate digital signatures on certificates and MUST mark the
extension as critical in such certificates." Previous to this change,
the extension was always marked as non-critical. This was fixed by
#3698.
Changes
A new library C file psa_crypto_client.c has been created to contain
the PSA code needed by a PSA crypto client when the PSA crypto
implementation is not included into the library.
On recent enough versions of FreeBSD and DragonFlyBSD, the entropy module
now uses the getrandom syscall instead of reading from /dev/urandom.
Who should update
We recommend all users should update to take advantage of the bug fixes contained in this release at an appropriate point in their development lifecycle.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/security/mbedtls/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/security/mbedtls/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/security/mbedtls/buildlink3.mk
cvs rdiff -u -r1.14 -r1.15 pkgsrc/security/mbedtls/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/mbedtls/Makefile
diff -u pkgsrc/security/mbedtls/Makefile:1.20 pkgsrc/security/mbedtls/Makefile:1.21
--- pkgsrc/security/mbedtls/Makefile:1.20 Tue Oct 27 00:06:59 2020
+++ pkgsrc/security/mbedtls/Makefile Sun May 2 08:16:13 2021
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.20 2020/10/27 00:06:59 mcf Exp $
+# $NetBSD: Makefile,v 1.21 2021/05/02 08:16:13 nia Exp $
-DISTNAME= mbedtls-2.24.0
+DISTNAME= mbedtls-2.26.0
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_GITHUB:=ARMmbed/}
GITHUB_TAG= ${DISTNAME}
Index: pkgsrc/security/mbedtls/PLIST
diff -u pkgsrc/security/mbedtls/PLIST:1.8 pkgsrc/security/mbedtls/PLIST:1.9
--- pkgsrc/security/mbedtls/PLIST:1.8 Thu Sep 3 20:30:56 2020
+++ pkgsrc/security/mbedtls/PLIST Sun May 2 08:16:13 2021
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2020/09/03 20:30:56 nia Exp $
+@comment $NetBSD: PLIST,v 1.9 2021/05/02 08:16:13 nia Exp $
bin/mbedtls_aescrypt2
bin/mbedtls_benchmark
bin/mbedtls_cert_app
@@ -74,6 +74,7 @@ include/mbedtls/cipher_internal.h
include/mbedtls/cmac.h
include/mbedtls/compat-1.3.h
include/mbedtls/config.h
+include/mbedtls/config_psa.h
include/mbedtls/ctr_drbg.h
include/mbedtls/debug.h
include/mbedtls/des.h
@@ -133,10 +134,9 @@ include/mbedtls/x509_crt.h
include/mbedtls/x509_csr.h
include/mbedtls/xtea.h
include/psa/crypto.h
-include/psa/crypto_accel_driver.h
include/psa/crypto_compat.h
+include/psa/crypto_config.h
include/psa/crypto_driver_common.h
-include/psa/crypto_entropy_driver.h
include/psa/crypto_extra.h
include/psa/crypto_platform.h
include/psa/crypto_se_driver.h
@@ -147,7 +147,7 @@ include/psa/crypto_values.h
lib/libmbedcrypto.a
lib/libmbedcrypto.so
lib/libmbedcrypto.so.${PKGVERSION}
-lib/libmbedcrypto.so.5
+lib/libmbedcrypto.so.6
lib/libmbedtls.a
lib/libmbedtls.so
lib/libmbedtls.so.13
Index: pkgsrc/security/mbedtls/buildlink3.mk
diff -u pkgsrc/security/mbedtls/buildlink3.mk:1.3 pkgsrc/security/mbedtls/buildlink3.mk:1.4
--- pkgsrc/security/mbedtls/buildlink3.mk:1.3 Tue Jul 7 11:21:39 2020
+++ pkgsrc/security/mbedtls/buildlink3.mk Sun May 2 08:16:13 2021
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.3 2020/07/07 11:21:39 nia Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2021/05/02 08:16:13 nia Exp $
BUILDLINK_TREE+= mbedtls
@@ -6,7 +6,7 @@ BUILDLINK_TREE+= mbedtls
MBEDTLS_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.mbedtls+= mbedtls>=0.10.0
-BUILDLINK_ABI_DEPENDS.mbedtls?= mbedtls>=2.23.0
+BUILDLINK_ABI_DEPENDS.mbedtls?= mbedtls>=2.26.0
BUILDLINK_PKGSRCDIR.mbedtls?= ../../security/mbedtls
pkgbase := mbedtls
Index: pkgsrc/security/mbedtls/distinfo
diff -u pkgsrc/security/mbedtls/distinfo:1.14 pkgsrc/security/mbedtls/distinfo:1.15
--- pkgsrc/security/mbedtls/distinfo:1.14 Thu Sep 3 20:30:56 2020
+++ pkgsrc/security/mbedtls/distinfo Sun May 2 08:16:13 2021
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.14 2020/09/03 20:30:56 nia Exp $
+$NetBSD: distinfo,v 1.15 2021/05/02 08:16:13 nia Exp $
-SHA1 (mbedtls-2.24.0.tar.gz) = 1bd2b5f5b8b8f970331a6da0065d64b424abdbed
-RMD160 (mbedtls-2.24.0.tar.gz) = 2cc3e3460d75ec4a6c8f11e524c4afff5f78cb40
-SHA512 (mbedtls-2.24.0.tar.gz) = 5437ea57eb8b8af9446a796876aa2bfe3c59c88f926b1638c7e8a021a8bef9f4bc6cb1b254e7387e2afe095bd27c518060719726bbaf5478582a56c34315cfb8
-Size (mbedtls-2.24.0.tar.gz) = 3912697 bytes
+SHA1 (mbedtls-2.26.0.tar.gz) = 1cb65fb2fb37a1c6e4216205cc10bee60300c35e
+RMD160 (mbedtls-2.26.0.tar.gz) = c7c5ec41b4974d3b24897ac0d65ed3bcd50e50e8
+SHA512 (mbedtls-2.26.0.tar.gz) = 959f6dd0759bfd8dcc497a0527b8b9e9975adb9fee01461e6bcc37475cf9e4eae597687e05e077dfe51d0542c81bc3b90e6d9a692353dca331e020e02d642196
+Size (mbedtls-2.26.0.tar.gz) = 4080986 bytes
Home |
Main Index |
Thread Index |
Old Index