34795 Commits

Author SHA1 Message Date
Valerio Setti
0e35789157 tests|programs: call check_context_after_session_reset whenever mbedtls_ssl_session_reset
Call mbedtls_test_ssl_check_context_after_session_reset both in programs
(ssl_client2 and ssl_server2) and tests to ensure that the SSL context
has been properly handled when mbedtls_ssl_session_reset was called.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-24 14:42:10 +02:00
Valerio Setti
e19a4cfd80 tests: add prototype and implementation of mbedtls_test_ssl_check_context_after_session_reset
Ideally the implementation shouldn't be checked in git, but for the time
being there is no support in building source code for tests from the
binary folder, so it's accepted as a temporary solution.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-24 14:42:10 +02:00
Valerio Setti
0ff7a2e8b7 tests: scripts: add generate_ssl_session_reset_check.py
Togethere with the framework counterpart ('ssl_session_reset_check.py')
this script is used to automatically generate the function
'mbedtls_test_ssl_check_context_after_session_reset()'.
The goal of this function is to verify that 'mbedtls_ssl_session_reset()'
properly handled (reset or keep) all the fields of the
'mbedtls_ssl_context' structure.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-24 14:42:10 +02:00
Valerio Setti
150f1c7b40 tests: ssl: split ssl_helpers between public and internal functions
Move functions in "ssl_helpers.h" that depend on internal headers to
"ssl_helpers_internal.h". This allows to include "ssl_helpers.h" also
in programs (which do not have access to internal headers).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-24 14:42:10 +02:00
Valerio Setti
be883e19f5 include: ssl: add a typedef for unused data in mbedtls_ssl_config and mbedtls_ssl_context
Add mbedtls_ssl_unused_data_t type instead of embedding the union inside
both structures.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-24 14:42:10 +02:00
Ben Taylor
7cbd8582ee Correct error handling in mbedtls_ssl_reset_checksum
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
14cec6ffc1 Fix error codes for tls_transcript_error_propagation
Co-authored-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ben Taylor <32939606+bjwtaylor@users.noreply.github.com>
2026-06-24 11:05:44 +01:00
Ben Taylor
356e535ff5 Improve tls_transcript_error_propagation testing to check for error codes
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
f234fc5a3c Update regression test
Co-authored-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ben Taylor <32939606+bjwtaylor@users.noreply.github.com>
2026-06-24 11:05:44 +01:00
Ben Taylor
809820934c restore missing ext_len set
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
c742ab0a97 remove trailing whitespace
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
52a1b95067 Update ChangeLog with CVE number
Co-authored-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ben Taylor <32939606+bjwtaylor@users.noreply.github.com>
2026-06-24 11:05:44 +01:00
Ben Taylor
3e6608a5b6 Update ChangeLog to add CVE
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Ben Taylor <32939606+bjwtaylor@users.noreply.github.com>
2026-06-24 11:05:44 +01:00
Ben Taylor
62d3b1ecc0 Update dependencies for skipped test
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
9709c1a6e5 fix code style
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
470aeeed9d Improve ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
2e2bbed8f0 Update error handling of return from ssl_write_ecjpake_kkpp_ext
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
76aa4682ce Improve testing
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
6ed6d0e491 Update ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
b0f812d68d Fix reporters in ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
0e3e118220 Remove check for NULL pointer
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
f9a3d649ff Tidy up ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
8c27b60597 Add Reported by to ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
5aa6ab3408 Fix code style issues
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
bc111eed27 Add fix for missing return from ssl_write_ecjpake_kkpp_ext
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
86140ccd4a Add additional fix for return with error
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
d93c7b6289 Add client tests for RMS computation error
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:44 +01:00
Ben Taylor
64b837bef9 Add unsupported trigger check
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
6b60598c88 Add further documentation to tls_abort_transcript_context
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
4570537978 Fix issues with hanging seed length
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
a58163a339 Fixed code style
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
0a0c86dca4 refactor initialisation in tls_transcript_error_propagation, so that the variables are initialised straight after they are declared
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
cdad2f42b7 Add additional guard for sha256 in tests
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
d6e6012544 Improve layout of the code for debugging with breakpoints
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
d6019b932d Add security impact
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
29bdcc319a Update ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ben Taylor
d066076211 Add ChangeLog
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:43 +01:00
Ronald Cron
762b68fe26 Improve dependencies and error handling
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:05:42 +01:00
Ben Taylor
591a5f24c2 tests: ssl: add regression tests for EMS/RMS error propagation
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:04:57 +01:00
Ben Taylor
4e26c248ec ssl: propagate transcript-hash computation failures
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2026-06-24 11:03:39 +01:00
Gilles Peskine
657760964e
Merge pull request #1660 from bjwtaylor/info-leak-in-ssl_write_new_session_ticket-4.1
Info leak in ssl write new session ticket 4.1
2026-06-24 09:42:16 +02:00
Gilles Peskine
7674b49934
Merge pull request #1656 from valeriosetti/issue1598-backport4.1
[4.1] PKCS7 accepts weak hashes
2026-06-23 16:40:44 +02:00
Minos Galanakis
a6d2af8cdb Added attribution
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-23 10:52:01 +01:00
Minos Galanakis
5998104fd6 Added CVE
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-06-22 22:35:54 +01:00
Ronald Cron
788a536868
Merge pull request #1673 from bjwtaylor/pkcs-free-stale-pointers-4.1
Pkcs free stale pointers 4.1
2026-06-22 17:54:49 +02:00
minosgalanakis
0e69eb6990
Merge pull request #1667 from gilles-peskine-arm/badmac_seen_or_in_hsfraglen-test-4.1
Backport 4.1: test badmac_seen with renegotiation
2026-06-22 15:49:58 +01:00
Valerio Setti
5b67d61d02 pkcs7: do not mention PK algorithms in the documentation
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-22 11:46:29 +02:00
Valerio Setti
ba5c9383ab config-options-current: add new symbol MBEDTLS_PKCS7_ALLOW_WEAK_SIGNATURES
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-22 11:46:29 +02:00
Valerio Setti
dfa6a1441e pkcs7: improve documentation and changelog for MBEDTLS_PKCS7_ALLOW_WEAK_SIGNATURES
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-22 11:46:29 +02:00
Valerio Setti
4008c7f811 pkcs7: mention MBEDTLS_PKCS7_ALLOW_WEAK_SIGNATURES in pkcs7.h documentation
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-06-22 11:46:29 +02:00