Fixed an authentication bypass issue in SSL/TLS. When the TLS
authentication mode was set to 'optional',
mbedtls_ssl_get_verify_result() would incorrectly return 0 when the
peer's X.509 certificate chain had more than
MBEDTLS_X509_MAX_INTERMEDIATE_CA intermediates (default: 8), even when
it was not trusted. This could be triggered remotely on both the client
and server side. (Note, with the authentication mode set by
mbedtls_ssl_conf_authmode()to be 'required' (the default), the handshake
was correctly aborted).
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Tested-by: Magnus Kroken <mkroken@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
PKG_SOURCE_URL:=https://tls.mbed.org/download/
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
PKG_SOURCE_URL:=https://tls.mbed.org/download/
-PKG_HASH:=312f020006f0d8e9ede3ed8e73d907a629baf6475229703941769372ab0adee2
+PKG_HASH:=a99959d7360def22f9108d2d487c9de384fe76c349697176b1f22370080d5810
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0+
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0+
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
*
* Uncomment to get errors on using deprecated functions.
*/
*
* Uncomment to get errors on using deprecated functions.
*/
/* \} name SECTION: System support */
/* \} name SECTION: System support */
*
* Comment macros to disable the curve and functions for it
*/
*
* Comment macros to disable the curve and functions for it
*/
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
/**
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
/**
* Requires: MBEDTLS_HMAC_DRBG_C
*
* Comment this macro to disable deterministic ECDSA.
* Requires: MBEDTLS_HMAC_DRBG_C
*
* Comment this macro to disable deterministic ECDSA.
/**
* \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
/**
* \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
* MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
*/
* MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
*/
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
* MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
* MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
* MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
* MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
* MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
*/
* MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
*/
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
*/
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
*/
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
*/
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
*/
/**
* \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
/**
* \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
* This option is only useful if both MBEDTLS_SHA256_C and
* MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
*/
* This option is only useful if both MBEDTLS_SHA256_C and
* MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
*/
/**
* \def MBEDTLS_ENTROPY_NV_SEED
/**
* \def MBEDTLS_ENTROPY_NV_SEED
* Uncomment this macro to disable the use of CRT in RSA.
*
*/
* Uncomment this macro to disable the use of CRT in RSA.
*
*/
/**
* \def MBEDTLS_SHA256_SMALLER
/**
* \def MBEDTLS_SHA256_SMALLER
*
* Uncomment to enable the smaller implementation of SHA256.
*/
*
* Uncomment to enable the smaller implementation of SHA256.
*/
/**
* \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
/**
* \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
* misuse/misunderstand.
*
* Comment this to disable support for renegotiation.
* misuse/misunderstand.
*
* Comment this to disable support for renegotiation.
/**
* \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
/**
* \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
* callbacks are provided by MBEDTLS_SSL_TICKET_C.
*
* Comment this macro to disable support for SSL session tickets
* callbacks are provided by MBEDTLS_SSL_TICKET_C.
*
* Comment this macro to disable support for SSL session tickets
/**
* \def MBEDTLS_SSL_EXPORT_KEYS
/**
* \def MBEDTLS_SSL_EXPORT_KEYS
*
* Comment this macro to disable support for truncated HMAC in SSL
*/
*
* Comment this macro to disable support for truncated HMAC in SSL
*/
/**
* \def MBEDTLS_THREADING_ALT
/**
* \def MBEDTLS_THREADING_ALT
* Requires: MBEDTLS_VERSION_C
*
* Comment this to disable run-time checking and save ROM space
* Requires: MBEDTLS_VERSION_C
*
* Comment this to disable run-time checking and save ROM space
/**
* \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
/**
* \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
*/
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
*/
* This module enables the AES-CCM ciphersuites, if other requisites are
* enabled as well.
*/
* This module enables the AES-CCM ciphersuites, if other requisites are
* enabled as well.
*/
/**
* \def MBEDTLS_CERTS_C
/**
* \def MBEDTLS_CERTS_C
*
* This module is used for testing (ssl_client/server).
*/
*
* This module is used for testing (ssl_client/server).
*/
/**
* \def MBEDTLS_CIPHER_C
/**
* \def MBEDTLS_CIPHER_C
*
* This module provides debugging functions.
*/
*
* This module provides debugging functions.
*/
* MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
*
* PEM_PARSE uses DES/3DES for decrypting encrypted keys.
* MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
*
* PEM_PARSE uses DES/3DES for decrypting encrypted keys.
* Requires: MBEDTLS_MD_C
*
* Uncomment to enable the HMAC_DRBG random number geerator.
* Requires: MBEDTLS_MD_C
*
* Uncomment to enable the HMAC_DRBG random number geerator.
* Caller: library/md.c
*
*/
* Caller: library/md.c
*
*/
* Caller:
*
* Requires: MBEDTLS_SSL_CACHE_C
* Caller:
*
* Requires: MBEDTLS_SSL_CACHE_C
/**
* \def MBEDTLS_SSL_COOKIE_C
/**
* \def MBEDTLS_SSL_COOKIE_C
* Caller:
*
* Requires: MBEDTLS_CIPHER_C
* Caller:
*
* Requires: MBEDTLS_CIPHER_C
/**
* \def MBEDTLS_SSL_CLI_C
/**
* \def MBEDTLS_SSL_CLI_C
* Module: library/version.c
*
* This module provides run-time version information.
* Module: library/version.c
*
* This module provides run-time version information.
/**
* \def MBEDTLS_X509_USE_C
/**
* \def MBEDTLS_X509_USE_C
* Module: library/xtea.c
* Caller:
*/
* Module: library/xtea.c
* Caller:
*/