v1rtu3x 5af05a964a x509: Accept basicConstraints with omitted cA
RFC 5280 defines cA as BOOLEAN DEFAULT FALSE, so a basicConstraints
extension containing only pathLenConstraint (SEQUENCE { INTEGER n })
is syntactically valid and must be interpreted as cA=FALSE. The fix
for CVE-2026-49300 rejected this encoding outright, breaking
compatibility with certificates emitted by devices such as
Eaton/CODESYS PLCs.

Tolerate MBEDTLS_ERR_ASN1_UNEXPECTED_TAG from the cA BOOLEAN parse,
keeping cA FALSE and letting the existing INTEGER parser validate
pathLenConstraint. The INTEGER value is never used to determine cA,
so the CVE fix is preserved.

Fixes #11006

Signed-off-by: v1rtu3x <149050962+v1rtu3x@users.noreply.github.com>
(cherry picked from commit 62dd8a556c01cc289d4fb3f19352a78ede90dac2)
2026-10-21 13:09:57 +03:00
..
.gitignore Revert "Added generated files" 2026-07-07 17:26:50 +01:00
aes.c Use optimised counter increment in AES-CTR and CTR-DRBG 2024-01-15 11:45:01 +00:00
aesce.c built-in drivers(aesce): Fixed clang arm intrinsics for verions < 7 2026-01-26 11:06:58 +00:00
aesce.h Merge remote-tracking branch 'origin/development' into msft-aarch64 2023-11-30 11:01:50 +00:00
aesni.c Add a note about processor memory reordering 2025-06-12 18:30:45 +02:00
aesni.h Merge pull request #8124 from yanrayw/support_cipher_encrypt_only 2023-11-23 17:43:00 +00:00
alignment.h Merge pull request #10731 from AmyChan-Intel/mbedtls-3.6 2026-06-30 09:34:49 +00:00
aria.c aria: remove leftover in comments 2024-01-30 16:28:09 +01:00
asn1parse.c pem: do not parse ASN1 data after decryption (removes ASN1 dependency) 2024-02-16 15:26:12 +01:00
asn1write.c Fix possible UB in mbedtls_asn1_write_raw_buffer() 2025-06-03 11:23:19 +02:00
base64_internal.h Header updates 2023-11-03 12:21:36 +00:00
base64.c Include common.h before system headers 2025-12-02 22:35:16 +01:00
bignum_core_invasive.h Unit-test mpi_core_div2_mod_odd() 2025-07-18 09:40:14 +02:00
bignum_core.c Try again to clarify connection with the paper 2025-07-24 12:22:16 +02:00
bignum_core.h bignum: update comment about users of bignum_core 2026-05-18 10:45:11 +02:00
bignum_internal.h Be explicit about modinv output range 2025-09-11 09:58:45 +02:00
bignum_mod_raw_invasive.h Header updates 2023-11-03 12:21:36 +00:00
bignum_mod_raw.c Header updates 2023-11-03 12:21:36 +00:00
bignum_mod_raw.h Header updates 2023-11-03 12:21:36 +00:00
bignum_mod.c Header updates 2023-11-03 12:21:36 +00:00
bignum_mod.h Header updates 2023-11-03 12:21:36 +00:00
bignum.c Revert "Fix side-channel in prime checking/generation" 2026-10-09 09:50:47 +02:00
block_cipher_internal.h block_cipher: add encrypt() 2023-11-10 12:14:53 +01:00
block_cipher.c Fix NULL argument handling in mbedtls_xxx_free() functions 2024-03-22 14:46:04 -04:00
bn_mul.h Header updates 2023-11-03 12:21:36 +00:00
camellia.c Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only 2023-11-23 10:31:26 +08:00
ccm.c ccm: Fixed a missing error flag assertion. 2026-03-12 11:09:31 +00:00
chacha20_internal.h Improve comments and guards 2026-06-02 13:50:32 +01:00
chacha20.c Correct logic for keystream_bytes_used 2026-06-11 14:11:24 +01:00
chachapoly.c Improve comments and guards 2026-06-02 13:50:32 +01:00
check_crypto_config.h library: check_crypto_config: remove redundant check on hash algorithms for TLS 1.2 2026-02-12 22:09:06 +01:00
cipher_invasive.h Switch legacy cipher to constant-time invalid padding reporting 2025-08-08 15:14:47 +02:00
cipher_wrap.c Constify cipher_wrap:mbedtls_cipher_base_lookup_table 2025-04-18 09:24:36 +02:00
cipher_wrap.h Constify cipher_wrap:mbedtls_cipher_base_lookup_table 2025-04-18 09:24:36 +02:00
cipher.c Switch legacy cipher to constant-time invalid padding reporting 2025-08-08 15:14:47 +02:00
cmac.c Merge branch 'development' into 'development-restricted' 2024-03-19 22:24:40 +00:00
CMakeLists.txt CMake improvements: relocatable, transformation, and more test 2026-08-20 09:10:41 +01:00
common.h Support testing baremetal builds without the UNIXLIKE code 2026-03-03 15:19:58 +01:00
constant_time_impl.h Tiny fix in library/constant_time_impl.h 2024-08-06 16:26:41 +01:00
constant_time_internal.h Header updates 2023-11-03 12:21:36 +00:00
constant_time.c Include common.h before system headers 2025-12-02 22:35:16 +01:00
ctr_drbg.c DRBG: make reseed_counter not be off by 1 2026-03-04 17:54:56 +01:00
ctr.h Add header guards 2024-01-17 11:06:31 +00:00
debug_internal.h test_suite_debug: test the printf used by debug.c 2026-03-03 15:19:58 +01:00
debug.c test_suite_debug: test the printf used by debug.c 2026-03-03 15:19:58 +01:00
des.c Header updates 2023-11-03 12:21:36 +00:00
dhm.c dhm: remove unused variable (and improve comment) 2025-08-26 11:31:52 +02:00
ecdh.c ECDH: use more precise error code 2026-04-02 09:42:05 +02:00
ecdsa.c ecdsa: rm unused variable 2025-08-26 11:33:12 +02:00
ecjpake.c Use size_t cast for pointer subtractions 2023-11-21 17:09:46 +00:00
ecp_curves_new.c ecp: add back dummy ecp_curves_new.c for compat 2026-05-18 10:49:04 +02:00
ecp_curves.c Remove surplus parentheses 2026-07-21 10:22:24 +01:00
ecp_internal_alt.h Header updates 2023-11-03 12:21:36 +00:00
ecp_invasive.h ecp: update doc for Koblitz raw quasi-reductions 2026-05-21 12:07:32 +02:00
ecp.c ecp: clarify static constants in grp 2026-05-18 10:45:11 +02:00
entropy_poll.c fix(platform): detect getrandom syscall support 2026-09-03 19:17:28 +08:00
entropy_poll.h Header updates 2023-11-03 12:21:36 +00:00
entropy.c Fix NULL argument handling in mbedtls_xxx_free() functions 2024-03-22 14:46:04 -04:00
gcm.c Check gcc version 2024-03-13 09:55:33 +00:00
hkdf.c Header updates 2023-11-03 12:21:36 +00:00
hmac_drbg.c DRBG: make reseed_counter not be off by 1 2026-03-04 17:54:56 +01:00
lmots.c Built-in lms/lmots driver: Harden public key import against enum truncation 2025-06-04 15:54:46 +01:00
lmots.h Use standard byte conversion fns in lms 2023-11-21 17:09:46 +00:00
lms.c lms.c: Updated documentation 2025-06-06 14:35:07 +01:00
Makefile Revert "Added generated files" 2026-07-07 17:26:50 +01:00
md5.c md5/sha1/ripemd160: fix the same 4GiB ilen truncation as sha256 2026-09-30 22:20:09 +01:00
md_psa.h md: move PSA conversion functions from md_psa.h to psa_util.h 2024-01-02 13:26:04 +01:00
md_wrap.h Header updates 2023-11-03 12:21:36 +00:00
md.c md: fix guards for mbedtls_md_error_from_psa() 2024-05-02 18:18:45 +02:00
memory_buffer_alloc.c platform: fix -Wcast-align warnings in memory_buffer_alloc.c 2026-04-14 16:35:22 +02:00
mps_common.h Fix some non-standard headers 2023-11-03 12:24:58 +00:00
mps_error.h Fix some non-standard headers 2023-11-03 12:24:58 +00:00
mps_reader.c Fix some non-standard headers 2023-11-03 12:24:58 +00:00
mps_reader.h Fix some non-standard headers 2023-11-03 12:24:58 +00:00
mps_trace.c Fix some non-standard headers 2023-11-03 12:24:58 +00:00
mps_trace.h Fix some non-standard headers 2023-11-03 12:24:58 +00:00
net_sockets.c Unify the detection of Unix-like platforms 2026-03-03 15:19:58 +01:00
nist_kw.c Fix NULL argument handling in mbedtls_xxx_free() functions 2024-03-22 14:46:04 -04:00
oid.c Reject overflowing numeric OID components 2026-10-06 23:18:23 +03:00
padlock.c Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only 2023-11-23 10:31:26 +08:00
padlock.h Header updates 2023-11-03 12:21:36 +00:00
pem.c Add fix for PEM underflow 2025-06-04 10:06:26 +01:00
pk_ecc.c Backport EC public key 1 byte overread 2026-05-28 15:10:14 +01:00
pk_internal.h Add parentheses to unsafe macros 2026-07-21 10:21:43 +01:00
pk_wrap.c pk: fix builds without PKCS#1 v1.5 2026-06-08 12:00:02 +02:00
pk_wrap.h pk_wrap: remove last references to MBEDTLS_PSA_CRYPTO_C 2023-12-20 12:59:57 +02:00
pk.c PK: use PSA size macros when exporting to PSA 2026-03-03 09:50:53 +01:00
pkcs5.c pkcs[5/12]: add CIPHER_C for [en/de]crypting functions 2023-12-21 16:39:04 +01:00
pkcs7.c Merge pull request #1675 from valeriosetti/issue1598-backport3.6 2026-06-23 16:40:40 +02:00
pkcs12.c pkcs[5/12]: add CIPHER_C for [en/de]crypting functions 2023-12-21 16:39:04 +01:00
pkparse.c pk: move ECC setters to a separate file 2024-03-11 09:48:40 +01:00
pkwrite.c PK: use EC macro for EC key size 2026-03-03 09:53:08 +01:00
pkwrite.h pkwrite: add new internal symbol for the max supported public key DER length 2024-03-20 17:10:35 +01:00
platform_util.c Unify the detection of Unix-like platforms 2026-03-03 15:19:58 +01:00
platform.c Header updates 2023-11-03 12:21:36 +00:00
poly1305.c Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_aead.c Remove dead code 2025-10-23 14:43:52 +01:00
psa_crypto_aead.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_cipher.c Remove redundant memset on freshly initialized buffer 2025-09-08 12:22:39 +02:00
psa_crypto_cipher.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_client.c Remove domain parameters from psa_key_attributes_t 2024-02-26 16:57:30 +01:00
psa_crypto_core_common.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_core.h Declare psa_can_do_cipher() in a public header 2025-09-12 11:27:07 +02:00
psa_crypto_driver_wrappers_no_static.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_ecp.c mbedtls_psa_ecp_generate_key: don't calculate the public key 2024-10-30 12:18:16 +01:00
psa_crypto_ecp.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_ffdh.c Merge pull request #1501 from mpg/restricted-ffdh-peerkey-checks 2026-03-13 12:44:30 +01:00
psa_crypto_ffdh.h psa_crypto_ffdh: move dhm.h inclusion to c file 2024-01-26 09:35:18 +01:00
psa_crypto_hash.c Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_hash.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_invasive.h Change to use test-hook-based approach 2023-12-11 17:58:56 +00:00
psa_crypto_its.h Reject UID 0 in pas_its 2026-08-12 16:00:36 +01:00
psa_crypto_mac.c Grammar in comments 2025-05-13 11:53:31 +02:00
psa_crypto_mac.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_pake.c Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_pake.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_random_impl.h Protect the PSA RNG from duplication on fork 2026-03-16 17:50:06 +01:00
psa_crypto_random.c Extend PSA RNG fork protection to NV-seed-only configurations 2026-03-16 17:50:06 +01:00
psa_crypto_random.h Move PSA internal RNG functions to a new module 2026-03-04 17:54:56 +01:00
psa_crypto_rsa.c Define and use mbedtls_rsa_decrypt_decompose_ret() 2026-06-08 11:39:44 +02:00
psa_crypto_rsa.h Documentation improvements 2024-08-06 13:13:05 +02:00
psa_crypto_se.c Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_se.h Header updates 2023-11-03 12:21:36 +00:00
psa_crypto_slot_management.c psa_crypto_slot_management: check key ID range when loading a persistent key 2025-10-27 11:12:07 +01:00
psa_crypto_slot_management.h Clarify some internal documentation 2024-08-09 14:04:46 +02:00
psa_crypto_storage.c Switch key slots to psa_key_attributes_t 2024-02-28 01:30:24 +01:00
psa_crypto_storage.h psa: move default definition of MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE 2024-10-22 13:31:19 +02:00
psa_crypto.c Merge pull request #1636 from mpg/restricted-rsa-padding-3.6 2026-06-24 09:34:57 +02:00
psa_its_file.c Reject UID 0 in pas_its 2026-08-12 16:00:36 +01:00
psa_util_internal.h psa_util: change guard for mbedtls_psa_get_random() to CRYPTO_CLIENT 2024-02-29 16:14:29 +01:00
psa_util.c mbedtls_ecdsa_raw_to_der and mbedtls_ecdsa_der_to_raw: reject bits==0 2024-10-28 10:09:18 +01:00
ripemd160.c md5/sha1/ripemd160: fix the same 4GiB ilen truncation as sha256 2026-09-30 22:20:09 +01:00
rsa_alt_helpers.c RSA: remove undocumented check 2025-12-03 11:35:28 +01:00
rsa_alt_helpers.h Minor grammar fix in comment 2025-08-26 11:34:45 +02:00
rsa_internal.h Define and use mbedtls_rsa_decrypt_decompose_ret() 2026-06-08 11:39:44 +02:00
rsa.c Define and use mbedtls_rsa_decrypt_decompose_ret() 2026-06-08 11:39:44 +02:00
sha1.c md5/sha1/ripemd160: fix the same 4GiB ilen truncation as sha256 2026-09-30 22:20:09 +01:00
sha3.c Add parentheses to unsafe macros 2026-07-21 10:21:43 +01:00
sha256.c sha256: fold high bits of ilen into total[1] on 64-bit platforms 2026-09-27 09:52:45 +01:00
sha512.c drivers sha256|512: Adjusted tf_psa_crypto_common.h inclusion 2026-01-21 14:16:18 +00:00
ssl_cache.c Header updates 2023-11-03 12:21:36 +00:00
ssl_ciphersuites_internal.h ssl_ciphersuites: move internal functions declarations to a private header 2024-01-18 15:08:28 +01:00
ssl_ciphersuites.c library/tests: replace md_psa.h with psa_util.h as include file for MD conversion 2024-01-02 13:27:32 +01:00
ssl_client.c ssl_write_supported_groups_ext: Updated documentation 2026-05-26 10:31:34 +01:00
ssl_client.h Header updates 2023-11-03 12:21:36 +00:00
ssl_cookie.c Fix NULL argument handling in mbedtls_xxx_free() functions 2024-03-22 14:46:04 -04:00
ssl_debug_helpers.h ssl_tls.c: Rename and expand ssl_tls13_get_hs_msg_name 2026-02-18 14:41:56 +01:00
ssl_misc.h tls13_fetch_handshake_msg(): Remove require_record_boundary parameter 2026-06-24 16:16:08 +02:00
ssl_msg.c Use functions instead of macros for badmac_seen_or_in_hsfraglen setters 2026-06-16 14:56:59 +02:00
ssl_ticket.c Fix NULL argument handling in mbedtls_xxx_free() functions 2024-03-22 14:46:04 -04:00
ssl_tls12_client.c Merge pull request #1654 from bjwtaylor/ECDHE-PSK-integer-overflow-restricted-3.6 2026-06-16 11:50:01 +02:00
ssl_tls12_server.c Correct error handling in mbedtls_ssl_reset_checksum 2026-06-24 10:48:59 +01:00
ssl_tls13_client.c Check ServerHello record boundary alignment only in TLS 1.3 case 2026-06-24 16:16:08 +02:00
ssl_tls13_generic.c Merge tag 'mbedtls-3.6.7' into mbedtls-3.6.7_mergeback-2 2026-07-07 17:25:52 +01:00
ssl_tls13_invasive.h Header updates 2023-11-03 12:21:36 +00:00
ssl_tls13_keys.c Replace __attribute__((nonstring)) with macro MBEDTLS_ATTRIBUTE_UNTERMINATED_STRING 2025-06-12 11:13:33 +01:00
ssl_tls13_keys.h Replace __attribute__((nonstring)) with macro MBEDTLS_ATTRIBUTE_UNTERMINATED_STRING 2025-06-12 11:13:33 +01:00
ssl_tls13_server.c tls13_fetch_handshake_msg(): Remove require_record_boundary parameter 2026-06-24 16:16:08 +02:00
ssl_tls.c Reject out-of-bounds ALPN length in ssl_context_load 2026-10-04 22:49:43 +05:30
threading_internal.h Fix code style 2025-08-29 10:46:52 +02:00
threading.c Unify the detection of Unix-like platforms 2026-03-03 15:19:58 +01:00
timing.c Unify the detection of Unix-like platforms 2026-03-03 15:19:58 +01:00
version.c Header updates 2023-11-03 12:21:36 +00:00
x509_create.c Fix null pointer dereference in string to names 2026-02-26 13:22:35 +00:00
x509_crl.c fix: remove superfluous BEFORE_COLON in x509_crl.c 2026-04-13 14:27:49 +02:00
x509_crt.c x509: Accept basicConstraints with omitted cA 2026-10-21 13:09:57 +03:00
x509_csr.c Remove unreachable CSR extensionRequest check 2026-06-05 11:33:23 +02:00
x509_internal.h x509: make profile checking functions internally available 2026-06-22 11:49:45 +02:00
x509.c x509: move internal functions declarations to a private header 2024-01-19 09:07:35 +01:00
x509write_crt.c Restore behaviour of mbedtls_x509write_set_foo_name() 2025-05-05 16:49:45 +02:00
x509write_csr.c Restore behaviour of mbedtls_x509write_set_foo_name() 2025-05-05 16:49:45 +02:00
x509write.c x509: move internal functions declarations to a private header 2024-01-19 09:07:35 +01:00