mbedtls/library
Demi Marie Obenour 889534a4d2 Fix segfault in mbedtls_oid_get_numeric_string
When passed an empty OID, mbedtls_oid_get_numeric_string would read one
byte from the zero-sized buffer and return an error code that depends on
its value.  This is demonstrated by the test suite changes, which
check that an OID with length zero and an invalid buffer pointer does
not cause Mbed TLS to segfault.

Also check that second and subsequent subidentifiers are terminated, and
add a test case for that.  Furthermore, stop relying on integer division
by 40, use the same loop for both the first and subsequent
subidentifiers, and add additional tests.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-03-16 01:06:41 -04:00
..
.gitignore
aes.c Add en(de)crypt routine 2023-02-07 17:11:53 +08:00
aesce.c Improve macro naming 2023-03-14 16:03:57 +00:00
aesce.h Improve comment about conflicts between aesce and sha512-crypto 2023-02-28 12:50:00 +08:00
aesni.c Tidy-up - move asm #define into build_info.h 2023-01-20 14:04:48 +00:00
aesni.h Switch to the new code style 2023-01-11 14:50:10 +01:00
alignment.h Fix mbedtls_bswap64() on 32-bit systems 2023-03-08 13:23:24 +00:00
aria.c Switch to the new code style 2023-01-11 14:50:10 +01:00
asn1parse.c Switch to the new code style 2023-01-11 14:50:10 +01:00
asn1write.c Switch to the new code style 2023-01-11 14:50:10 +01:00
base64.c Switch to the new code style 2023-01-11 14:50:10 +01:00
bignum.c Fix IAR Warnings 2023-02-13 15:35:35 +00:00
bignum_core.c Switch to the new code style 2023-01-11 14:50:10 +01:00
bignum_core.h Fix typos 2023-03-07 11:39:52 +00:00
bignum_mod.c bignum_mod_raw: Renamed m -> N in mbedtls_mpi_mod_raw_neg() 2023-01-17 11:25:26 +05:30
bignum_mod.h Fix typos in doxygen commands in new bignum modules 2023-02-01 08:43:54 +00:00
bignum_mod_raw.c Merge pull request #6941 from gabor-mezei-arm/6375_quasi-reduction_function 2023-01-31 11:25:25 +01:00
bignum_mod_raw.h Merge pull request #6957 from tom-cosgrove-arm/fix-spelling-of-doxygen-return 2023-01-24 21:56:45 +01:00
bignum_mod_raw_invasive.h Update documentation 2023-01-23 19:10:26 +01:00
bn_mul.h Tidy-up - move asm #define into build_info.h 2023-01-20 14:04:48 +00:00
camellia.c Switch to the new code style 2023-01-11 14:50:10 +01:00
ccm.c Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
chacha20.c Switch to the new code style 2023-01-11 14:50:10 +01:00
chachapoly.c Switch to the new code style 2023-01-11 14:50:10 +01:00
check_crypto_config.h Switch to the new code style 2023-01-11 14:50:10 +01:00
cipher.c Switch to the new code style 2023-01-11 14:50:10 +01:00
cipher_wrap.c Switch to the new code style 2023-01-11 14:50:10 +01:00
cipher_wrap.h Switch to the new code style 2023-01-11 14:50:10 +01:00
cmac.c Switch to the new code style 2023-01-11 14:50:10 +01:00
CMakeLists.txt Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
common.h Have MBEDTLS_STATIC_ASSERT() match current development more closely 2023-03-14 12:03:47 +00:00
constant_time.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
constant_time_internal.h Switch to the new code style 2023-01-11 14:50:10 +01:00
constant_time_invasive.h Switch to the new code style 2023-01-11 14:50:10 +01:00
ctr_drbg.c Remove redundant SIZE_MAX guards 2023-02-10 16:03:44 +00:00
debug.c move ticket_flags debug helpers 2023-01-13 11:06:01 +08:00
des.c Switch to the new code style 2023-01-11 14:50:10 +01:00
dhm.c Switch to the new code style 2023-01-11 14:50:10 +01:00
ecdh.c Switch to the new code style 2023-01-11 14:50:10 +01:00
ecdsa.c Make ECDSA restartable sign and verify functions public 2023-02-15 23:34:29 +00:00
ecjpake.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
ecp.c Remove unneeded include 2023-01-30 16:27:48 +01:00
ecp_curves.c Fix typos 2023-03-07 11:39:52 +00:00
ecp_internal_alt.h Switch to the new code style 2023-01-11 14:50:10 +01:00
ecp_invasive.h Merge pull request #7184 from gabor-mezei-arm/6349_Secp224r1_fast_reduction 2023-03-07 10:57:58 +00:00
entropy.c Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
entropy_poll.c Switch to the new code style 2023-01-11 14:50:10 +01:00
entropy_poll.h Switch to the new code style 2023-01-11 14:50:10 +01:00
gcm.c Switch to the new code style 2023-01-11 14:50:10 +01:00
hash_info.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
hash_info.h Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
hkdf.c Switch to the new code style 2023-01-11 14:50:10 +01:00
hmac_drbg.c Switch to the new code style 2023-01-11 14:50:10 +01:00
lmots.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
lmots.h Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
lms.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
Makefile Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
md.c Group MD_LIGHT and MD_C parts of md.c 2023-02-23 20:45:26 +01:00
md5.c Switch to the new code style 2023-01-11 14:50:10 +01:00
md_wrap.h Switch to the new code style 2023-01-11 14:50:10 +01:00
memory_buffer_alloc.c Switch to the new code style 2023-01-11 14:50:10 +01:00
mps_common.h Switch to the new code style 2023-01-11 14:50:10 +01:00
mps_error.h Switch to the new code style 2023-01-11 14:50:10 +01:00
mps_reader.c Switch to the new code style 2023-01-11 14:50:10 +01:00
mps_reader.h Switch to the new code style 2023-01-11 14:50:10 +01:00
mps_trace.c Switch to the new code style 2023-01-11 14:50:10 +01:00
mps_trace.h Switch to the new code style 2023-01-11 14:50:10 +01:00
net_sockets.c Switch to the new code style 2023-01-11 14:50:10 +01:00
nist_kw.c Switch to the new code style 2023-01-11 14:50:10 +01:00
oid.c Fix segfault in mbedtls_oid_get_numeric_string 2023-03-16 01:06:41 -04:00
padlock.c Tidy-up - move asm #define into build_info.h 2023-01-20 14:04:48 +00:00
padlock.h Switch to the new code style 2023-01-11 14:50:10 +01:00
pem.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
pk.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
pk_wrap.c Duplicate error logic in pk_wrap deprecated functions 2023-03-03 05:23:45 -05:00
pk_wrap.h Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
pkcs5.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
pkcs7.c Update wording in comments 2023-03-13 12:15:49 +00:00
pkcs12.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
pkparse.c pkarse: Added pk_group_id_from_specified() documentation. 2023-01-23 10:33:06 +00:00
pkwrite.c Switch to the new code style 2023-01-11 14:50:10 +01:00
pkwrite.h Switch to the new code style 2023-01-11 14:50:10 +01:00
platform.c Switch to the new code style 2023-01-11 14:50:10 +01:00
platform_util.c Enable explicit_bzero() on OpenBSD 2023-03-07 12:51:11 +00:00
poly1305.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto.c Merge pull request #7196 from mprse/ecjpake-driver-dispatch-peer-user 2023-03-15 09:37:30 +01:00
psa_crypto_aead.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_aead.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_cipher.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_cipher.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_client.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_core.h Merge pull request #6567 from mprse/ecjpake-driver-dispatch 2023-03-09 19:23:05 +00:00
psa_crypto_driver_wrappers.h Merge pull request #6567 from mprse/ecjpake-driver-dispatch 2023-03-09 19:23:05 +00:00
psa_crypto_ecp.c Make mbedtls_sa_ecp_load_public_part return psa_status_t 2023-02-15 23:34:29 +00:00
psa_crypto_ecp.h Merge pull request #7098 from gilles-peskine-arm/retval-non-empty 2023-02-24 09:10:53 +00:00
psa_crypto_hash.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_hash.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_invasive.h Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_its.h Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_mac.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_mac.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_pake.c Further pake code optimizations 2023-03-08 09:54:00 +01:00
psa_crypto_pake.h Further pake code optimizations 2023-03-08 09:54:00 +01:00
psa_crypto_random_impl.h Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_rsa.c psa_crypto_rsa: remove PK_WRITE_C in psa_rsa_export_key 2023-03-08 11:03:09 +01:00
psa_crypto_rsa.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_se.c Implement and use MBEDTLS_STATIC_ASSERT() 2023-03-08 14:19:51 +00:00
psa_crypto_se.h Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_slot_management.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_crypto_slot_management.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_storage.c Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_crypto_storage.h Make \retval commands non-empty 2023-02-14 19:21:09 +01:00
psa_its_file.c Switch to the new code style 2023-01-11 14:50:10 +01:00
psa_util.c Rename error_pair_t to mbedtls_error_pair_t 2023-03-03 05:54:13 -05:00
ripemd160.c Fix use of sizeof without brackets 2023-02-02 12:40:50 +00:00
rsa.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
rsa_alt_helpers.c Switch to the new code style 2023-01-11 14:50:10 +01:00
rsa_alt_helpers.h Switch to the new code style 2023-01-11 14:50:10 +01:00
sha1.c Switch to the new code style 2023-01-11 14:50:10 +01:00
sha256.c Improve macro naming 2023-03-14 16:03:57 +00:00
sha512.c Improve macro naming 2023-03-14 16:03:57 +00:00
ssl_cache.c Switch to the new code style 2023-01-11 14:50:10 +01:00
ssl_ciphersuites.c Switch to the new code style 2023-01-11 14:50:10 +01:00
ssl_client.c Fix code style 2023-02-21 15:39:12 +01:00
ssl_client.h Switch to the new code style 2023-01-11 14:50:10 +01:00
ssl_cookie.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
ssl_debug_helpers.h refine ticket_flags printing helper 2023-01-16 11:28:49 +08:00
ssl_misc.h Merge pull request #7082 from valeriosetti/issue6861 2023-03-08 16:45:38 +01:00
ssl_msg.c Merge pull request #7171 from daverodgman/pr5527 2023-03-13 10:46:29 +00:00
ssl_ticket.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
ssl_tls.c Merge pull request #7196 from mprse/ecjpake-driver-dispatch-peer-user 2023-03-15 09:37:30 +01:00
ssl_tls12_client.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
ssl_tls12_server.c Implement and use MBEDTLS_STATIC_ASSERT() 2023-03-08 14:19:51 +00:00
ssl_tls13_client.c Merge pull request #7218 from tom-cosgrove-arm/fix-typos-230307 2023-03-08 17:19:59 +00:00
ssl_tls13_generic.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
ssl_tls13_invasive.h Switch to the new code style 2023-01-11 14:50:10 +01:00
ssl_tls13_keys.c Unify PSA to Mbed TLS error translation 2023-03-03 05:23:44 -05:00
ssl_tls13_keys.h Enhancement: change some functions to static in ssl_tls13_keys.c 2023-01-12 14:54:26 +08:00
ssl_tls13_server.c Fix code style 2023-02-21 15:39:12 +01:00
threading.c Switch to the new code style 2023-01-11 14:50:10 +01:00
timing.c Switch to the new code style 2023-01-11 14:50:10 +01:00
version.c Switch to the new code style 2023-01-11 14:50:10 +01:00
x509.c Use const char for names and adapt style 2023-02-20 15:09:50 +01:00
x509_create.c Switch to the new code style 2023-01-11 14:50:10 +01:00
x509_crl.c Switch to the new code style 2023-01-11 14:50:10 +01:00
x509_crt.c Don't use lstrlenW() on Windows 2023-02-10 12:52:13 +00:00
x509_csr.c Fix code style 2023-01-26 22:30:45 +01:00
x509write_crt.c Use MD, not low-level SHA1, in X.509 2023-02-24 12:37:07 +01:00
x509write_csr.c Switch to the new code style 2023-01-11 14:50:10 +01:00