Commit Graph

32759 Commits

Author SHA1 Message Date
Minos Galanakis
b4f4be1a60 Changelog: Fixed references to TF-PSA-Crypto
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-04-17 15:48:03 +01:00
Gilles Peskine
1958093556 Merge pull request #10686 from gilles-peskine-arm/maintainer-scripts-create-directory-3.6
Backport 3.6: Create a directory for maintainer-only Python scripts
2026-04-15 08:19:27 +00:00
Gilles Peskine
3ff1783005 Merge pull request #10680 from gilles-peskine-arm/pake-init-gcc15-3.6
Backport 3.6: PAKE getters test failure with GCC 15
2026-04-15 08:18:28 +00:00
Valerio Setti
6d403ad146 Merge pull request #10690 from valeriosetti/backport-pr1006
[Backport 3.6] Rename BEFORE_COLON/BC to avoid conflicts
2026-04-14 13:47:58 +00:00
Stefan Gloor
f20aecf116 fix: rename BEFORE_COLON and BC to avoid conflicts
Namespace BEFORE_COLON and BC defines by prepending MBEDTLS_
and expanding BC to BEFORE_COLON_STR. This is to avoid naming
conflicts with third-party code. No functional change.

Signed-off-by: Stefan Gloor <stefan.gloor@siemens.com>
2026-04-13 14:27:49 +02:00
Stefan Gloor
6d2afad395 fix: remove superfluous BEFORE_COLON in x509_crl.c
BEFORE_COLON and BC defines with the accompanying comment are only
required in x509_crt and x509_csr, but not used in x509_crl.c.

Signed-off-by: Stefan Gloor <stefan.gloor@siemens.com>
2026-04-13 14:27:49 +02:00
Gilles Peskine
4a62fdc25a Merge pull request #10677 from gilles-peskine-arm/analyze_outcomes-uncovered-3.6
Outcome analysis: rename IGNORED_TESTS to UNCOVERED_TESTS
2026-04-10 14:51:40 +00:00
Gilles Peskine
4877c0838d Fix an infinite loop if cleanup fails in some tests
Don't call a macro that does `goto exit` on failure after the `exit:` label:
that would cause an infinite loop if something does go wrong.

Generally, cleanup functions don't error out, so it is unlikely to be a
problem in practice. If an error does happen during cleanup, it's probably
due to memory corruption caused by a bug that happened earlier, and that is
likely to have been detected in an earlier function. So we don't really need
to assert the return code of functions called during cleanup, and normally
we don't. Only a few places did so, wrongly.

I found the problematic places with
```
ag 'exit:[^}]*(PSA_ASSERT|TEST_ASSERT|TEST_EQUAL)' tests/suites/*.function
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 11:48:46 +02:00
Gilles Peskine
dd921414d3 Don't assert anything about uninitialized parts of structures
In a PAKE operation that has been initialized with `PSA_PAKE_OPERATION_INIT`
or `psa_pake_operation_init()`, the content of the driver-specific part is
indeterminate. It is actually all-bits-zero on most platforms, but not all,
e.g. not with GCC 15 or CompCert. So don't assert anything about it.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-10 11:39:09 +02:00
Gilles Peskine
9e7fe65b2c Create a directory for maintainer-only Python scripts
This directory is currently excluded from `check-python-files.sh`, because
we run it on the CI in an old Python version that doesn't support some of
our new maintainer scripts.

There are no such scripts in mbedtls for now (only in TF-PSA-Crypto), but be
ready if we want to add some.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-09 19:38:21 +02:00
Valerio Setti
f7350dc4ff Merge pull request #10679 from valeriosetti/backport-pr723
[3.6] psa_crypto.c: Fix ifdefs to avoid build warning
2026-04-09 14:05:10 +00:00
Gilles Peskine
87eba69926 Merge pull request #10658 from gilles-peskine-arm/audit_validity_dates-move-to-framework-3.6-actually-remove-scripts
3.6 only: Move some scripts from mbedtls into the framework redux
2026-04-09 07:58:45 +00:00
Gilles Peskine
c3fe74f302 Use short initializers in PAKE tests
When initializing a PAKE operation structure, use an
auxiliary function that doesn't initialize union members to all-bits-zero.
Context: on most compilers, initializing a union to `{0}` initializes it to
all bits zero; but on some compilers, the trailing part of members other
than the first is left uninitialized. This way, we can run the tests on any
platform and validate that the code would work correctly on platforms where
union initialization is short, such as GCC 15.

This commit extends 93dd99571b to
`test_suite_psa_crypto_pake.function`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-09 09:42:42 +02:00
Alberto Escolar Piedras
c30e6af2cc psa_crypto.c: Fix ifdefs to avoid build warning
Add a couple of missing ifdefs to avoid having unreachable code with
AT_LEAST_ONE_BUILTIN_KDF not defined, which otherwise causes a build
warning with clang.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-04-08 14:58:57 +02:00
Gilles Peskine
278dbecd97 Rename IGNORED_TESTS to UNCOVERED_TESTS
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-07 11:05:44 +02:00
Gilles Peskine
7b0cc09213 Update framework with UNCOVERED_TESTS in outcome analysis
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-07 11:05:01 +02:00
David Horstmann
4eb967981f Merge pull request #10667 from gilles-peskine-arm/security-md-mention-compiler-3.6
Backport 3.6: Mention compiler optimization in the threat model
2026-04-01 15:44:54 +00:00
Gilles Peskine
168ac78034 Be more specific about what compiler options we consider legitimate
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-01 10:08:29 +02:00
Gilles Peskine
778ea0af9b Mention the new advice about compiler options in the changelog
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-01 10:08:28 +02:00
Gilles Peskine
b937689ba6 Add a section about compiler-introduced timing side channels
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-04-01 10:08:28 +02:00
Minos Galanakis
629898bbba Revert "Added generated files"
This reverts commit 0bebf8b8c7.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-31 15:37:10 +01:00
Minos Galanakis
2d3fdb6608 Merge tag 'mbedtls-3.6.6' into mbedtls-3.6.6_mergeback
Mbed TLS mbedtls-3.6.6

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-31 15:36:51 +01:00
Valerio Setti
0c9da91b4f Merge pull request #10660 from krish2718/fix_unused_func
Fix unused function warning
2026-03-30 10:54:45 +00:00
Minos Galanakis
0bebf8b8c7 Added generated files
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
mbedtls-3.6.6 v3.6.6
2026-03-26 22:03:13 +00:00
Minos Galanakis
1baa5bba69 Update BRANCHES.md
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 22:03:13 +00:00
Minos Galanakis
69454b4bfe Assemble ChangeLog
./framework/scripts/assemble_changelog.py

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 21:50:06 +00:00
Minos Galanakis
3cfe12bf11 Bump version
./scripts/bump_version.sh --version 3.6.6

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 21:48:57 +00:00
Minos Galanakis
6cb4a1e9d2 Updated framework submodule
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 21:47:46 +00:00
Minos Galanakis
809410026f Merge remote-tracking branch 'restricted/mbedtls-3.6-restricted' into mbedtls-3.6.6.rc3
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 21:47:09 +00:00
Gilles Peskine
77b1a22bc3 Merge pull request #1536 from ronald-cron-arm/3.6-context_load_and_session_load_documentation
3.6 backport: Tighten context/session load and save APIs documentation
2026-03-26 21:32:09 +01:00
minosgalanakis
39acf7d2c8 Merge pull request #1535 from Mbed-TLS/release/changelog_fixes_3.6.6
[Release] Added attributions & CVE to ChangeLogs (3.6 LTS)
2026-03-26 17:38:26 +00:00
Ronald Cron
86b6812003 Update change log.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-26 18:25:06 +01:00
Minos Galanakis
860cde63e6 MOufa
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 16:43:03 +00:00
Minos Galanakis
e4c6f6819e Added attribution for ffdh-peerkey-check
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 16:42:23 +00:00
Minos Galanakis
441beaeeac Extended attributions & CVE
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 14:51:36 +00:00
Chaitanya Tata
ecfaeaddb3 Fix unused function warning
commit 4ac4008fa0 ("Access
ssl->hostname through abstractions in certificate verification").

Due to this an unused function warning can occur if neither SNI nor
handshake is enabled.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-03-26 19:03:40 +05:30
Ronald Cron
f45d735826 Improve change log
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-26 13:18:10 +01:00
Ronald Cron
e7076b1639 Add change log
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-26 13:18:10 +01:00
Ronald Cron
e7c9b1dfb3 Reduce duplication between save/load documentations
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-26 13:18:10 +01:00
Ronald Cron
dd20b0644a Add warning in mbedtls_ssl_session_load/save documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-26 13:18:10 +01:00
Ronald Cron
6712bd07b3 Add warning in mbedtls_ssl_context_save/load documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-26 13:18:10 +01:00
Minos Galanakis
0205ff782b Added attributions & CVE
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-26 11:11:12 +00:00
Gilles Peskine
ef44c2e99c Update path of moved script
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-26 10:55:17 +01:00
Manuel Pégourié-Gonnard
3746d7bbe0 Merge pull request #1531 from minosgalanakis/bugfix/ccm_finish_boundary_check_3.6_accr
Added attribution to fix-ccm-finish changelog entry (mbedtls3.6)
2026-03-26 09:36:56 +01:00
minosgalanakis
e944c99027 Merge pull request #1519 from ronald-cron-arm/dtls-3.6
3.6: Fixes relative to DTLS invalid/unexpected first record
2026-03-25 22:31:18 +00:00
Gilles Peskine
deba38fac0 Move some scripts from mbedtls into the framework
Move a bunch of files from `scripts` and `mbedtls/scripts` to the framework.
Most are not called from any scripts invoked by the CI, but a couple are.
A subsequent commit will adapt the scripts. None of these scripts are
referenced from other repositories except in documentation.

The following files will be removed, and added to `mbedtls-framework`:

* `scripts/ecp_comb_table.py`
* `scripts/massif_max.pl`
* `tests/scripts/audit-validity-dates.py` (moved to `scripts/`)
* `tests/scripts/gen_ctr_drbg.pl` (moved to `scripts/`)
* `tests/scripts/gen_gcm_decrypt.pl` (moved to `scripts/`)
* `tests/scripts/gen_gcm_encrypt.pl` (moved to `scripts/`)
* `tests/scripts/gen_pkcs1_v21_sign_verify.pl` (moved to `scripts/`)
* `tests/scripts/generate-afl-tests.sh` (moved to `scripts/`)
* `tests/scripts/generate_server9_bad_saltlen.py` (moved to `scripts/`)
* `tests/scripts/run-metatests.sh` (moved to `scripts/`)
* `tests/scripts/run_demos.py` (moved to `scripts/`)
* `tests/scripts/test_config_script.py` (moved to `scripts/`)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-03-25 21:42:43 +01:00
minosgalanakis
6522a260b2 Merge pull request #1530 from mpg/ffdh-changelog-fix
Remove attribution that wasn't agreed on
2026-03-25 19:38:16 +00:00
Minos Galanakis
17c19f9782 Added attribution to fix-ccm-finish changelog entry
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2026-03-25 16:14:18 +00:00
Ronald Cron
0c718e863a dtls: Log mapping of UNEXPECTED_RECORD to UNEXPECTED_MESSAGE
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 15:05:53 +01:00
Ronald Cron
eb1cdf45cd dtls: Fix adaptation to first ClientHello
For each received ClientHello fragment, check
that its epoch is zero and update the
record-level sequence number.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2026-03-25 14:28:17 +01:00