Buffer Underflow Affecting armmbed/mbedtls package, versions [3.5.0,3.6.2)
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-UNMANAGED-ARMMBEDMBEDTLS-8235242
- published 21 Oct 2024
- disclosed 15 Oct 2024
- credit Unknown
Introduced: 15 Oct 2024
CVE-2024-49195 Open this link in a new tabHow to fix?
Upgrade armmbed/mbedtls
to version 3.6.2 or higher.
Overview
Affected versions of this package are vulnerable to Buffer Underflow in the mbedtls_pk_write_key_der()
and mbedtls_pk_write_key_pem()
functions when processing data from an opaque key PK context (MBEDTLS_PK_OPAQUE
), when the MBEDTLS_USE_PSA_CRYPTO
option is in use. An attacker can cause stack or heap corruption by supplying a malicious key pair.
mbedtls_pk_write_key_der()
is vulnerable if either the MBEDTLS_ECP_C
option is enabled and the output buffer in use is smaller than the public key representation, or the output buffer for an RSA key is smaller than the actual output.
mbedtls_pk_write_key_pem()
is vulnerable if MBEDTLS_MPI_MAX_SIZE <= 420
for an RSA key.
Workaround
This vulnerability can be avoided by disabling the compile-time MBEDTLS_USE_PSA_CRYPTO
option.