blob: 6b744a74fb3d759954007b1ebc0eeea73d923ef7 [file] [log] [blame]
Minos Galanakis93145552025-09-09 18:54:52 +01001Security
2 * Fix possible use-after-free or double-free in code calling
3 mbedtls_x509_string_to_names(). This was caused by the function calling
4 mbedtls_asn1_free_named_data_list() on its head argument, while the
5 documentation did no suggest it did, making it likely for callers relying
6 on the documented behaviour to still hold pointers to memory blocks after
7 they were free()d, resulting in high risk of use-after-free or double-free,
8 with consequences ranging up to arbitrary code execution.
9 In particular, the two sample programs x509/cert_write and x509/cert_req
10 were affected (use-after-free if the san string contains more than one DN).
11 Code that does not call mbedtls_string_to_names() directly is not affected.
12 Found by Linh Le and Ngan Nguyen from Calif.
Minos Galanakiscc3f9872025-09-29 10:58:51 +010013 CVE-2025-47917
Minos Galanakis93145552025-09-09 18:54:52 +010014
15Changes
16 * The function mbedtls_x509_string_to_names() now requires its head argument
17 to point to NULL on entry. This makes it likely that existing risky uses of
18 this function (see the entry in the Security section) will be detected and
19 fixed.