1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-02 20:42:25 +03:00
Commit Graph

18895 Commits

Author SHA1 Message Date
751dc022f4 Merge pull request #1192 from davidhorstmann-arm/psa-shared-memory-changelog-2.28
[Backport 2.28] Add ChangeLog for PSA buffer sharing fix
2024-03-14 16:18:38 +00:00
4ef1faf4f7 Merge pull request #1200 from davidhorstmann-arm/invert-buffer-protection-option-2.28
[Backport 2.28] Invert and rename buffer protection config option
2024-03-14 16:17:25 +00:00
89e9fa0978 Merge pull request #8830 from paul-elliott-arm/add_framework_meta_tests_2_28
[Backport 2.28] Add metatests for failing TEST_EQUAL and TEST_LE_*
2024-03-14 15:54:49 +00:00
a7cb1d0fc9 Preserve alphabetical sorting of config options
In the list that is excluded from the full config.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 14:54:42 +00:00
5bada225eb Update generated files with inverted option
Achieved by running:

tests/scripts/check-generated-files.sh -u

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 11:21:34 +00:00
c34fa81ea9 Remove MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS from full
This option removes a feature (buffer protection) so should not be
in the full config.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 11:18:22 +00:00
43c128db3e Update wrapper generation script and regenerate
Update the guards generated by the wrapper generation script to use
!MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS and regenerate the PSA test
wrappers.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 11:18:22 +00:00
4201533196 Invert and rename config option
Replace MBEDTLS_PSA_COPY_CALLER_BUFFERS with inverse:
!MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS. This ensures that buffer
protection is enabled by default without any change to the Mbed TLS
config file.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-14 11:17:56 +00:00
227189f6b3 Reference issue #3266
This is the issue that tracks incomplete support for buffer overlap, so
we should refer to it when we discuss partial support whenever
MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS is set.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-13 14:09:41 +00:00
f70eceec03 Use the exact phrase 'shared memory'
This allows people searching for this phrase to find this ChangeLog
entry.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-13 14:06:58 +00:00
b596eb644f Merge pull request #1198 from tom-daubney-arm/backpot_buffer_sharing_cleanup
[Backport] Buffer sharing cleanup
2024-03-13 13:55:50 +00:00
b3301390bd Mention the CVE number that is fixed
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-13 13:36:43 +00:00
3aff45584b Reword ChangeLog entry. Specifically:
* Fix a grammatical typo
* Mention shared memory
* Mention overlap support in the security section
* Improve wording

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-13 13:36:43 +00:00
9a1e3e43e9 Merge pull request #1195 from davidhorstmann-arm/wrapper-generation-logic-invert
[Backport 2.28] Flip logic of PSA memory poisoning generation
2024-03-13 09:38:04 +00:00
2888f05e9a Merge pull request #8895 from daverodgman/quietbuild2-2.28
Follow-up non-verbose logs 2.28
2024-03-12 20:20:09 +00:00
28fe6654d8 Remove LOCAL_OUTPUT_ALLOC_WITH_COPY
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-03-12 17:54:55 +00:00
ca92831a60 Add missing semicolon
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-03-12 17:53:30 +00:00
8b4cea2710 Add bugfix section about buffer sharing
Mention that arbitrary overlap is now supported, except whenever
MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS is set.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-12 17:00:37 +00:00
59c1f53088 Reword ChangeLog entry for shared memory work
Specifically:
* Clarify that passing shared buffers is now secure by default (not
  newly supported)
* Remove spurious hyphen
* Clarify that we do not guarantee copying, but rather guarantee
  protection, allowing us to implement this differently in future if
  required.
* Mention both protection of inputs from modification and outputs from
  exposure of intermediate results.
* Invert the config option, from an enable-option to a disable-option.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-12 17:00:37 +00:00
4698e692e8 Flip logic of PSA memory poisoning generation
Change to excluding mbedtls_psa_inject_entropy() (not a PSA function)
rather than explicitly including every PSA function.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-12 14:15:38 +00:00
98ff287ab4 Simplify locating original tool
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-12 13:37:14 +00:00
9554940fb5 Remove unnecessary use of export
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-12 13:37:13 +00:00
40895498b7 Merge pull request #8851 from billatarm/mbedtls-2.28-add-pc-files
Mbedtls 2.28 add pc files
2024-03-12 11:30:30 +00:00
4fef9337a9 Merge pull request #1189 from davidhorstmann-arm/buffer-sharing-merge-2.28
Update mbedtls-2.28-restricted after buffer sharing work completion
2024-03-12 11:36:14 +01:00
c14cd0dc12 Add ChangeLog for PSA buffer sharing fix
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-11 17:37:01 +00:00
f06494dc9e Merge branch 'mbedtls-2.28' into buffer-sharing-merge-2.28 2024-03-11 16:28:50 +00:00
479448dbc8 Merge pull request #1182 from tom-daubney-arm/backport_key_agreement_buffer_protection
[Backport] Implement safe buffer copying in key agreement
2024-03-11 15:10:51 +00:00
b75b47563a Avoid recursion for relative paths
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-07 17:26:16 +00:00
ec84093ae6 Follow-up for less verbose logging
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-07 17:26:16 +00:00
cfe1be3bee ssl_mail_client: Fix unbounded write of sprintf()
These calls to sprintf may overflow buf because opt.mail_from and opt.mail_to
are controlled by users. Fix by replacing sprintf with snprintf.

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2024-03-06 22:28:52 +00:00
7c89d1f8de Merge branch 'mbedtls-2.28-restricted' into backport_key_agreement_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
2024-03-06 17:35:59 +00:00
9d0fe6e8df Fix issue with large allocation in tests
In test_suite_psa_crypto_op_fail.generated.function
the function key_agreement_fail was setting the
public_key_length variable to SIZE_MAX which meant that
a huge allocation was being attempted.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-03-06 17:34:35 +00:00
81a14e0dfd Merge pull request #1168 from gabor-mezei-arm/bp228_buffer_protection_for_cipher
[Backport] Buffer protection for cipher functions
2024-03-05 18:43:01 +00:00
5bc604f33c Merge pull request #8873 from daverodgman/quietbuild-2.28
Make builds less verbose - 2.28 backport
2024-03-05 18:04:11 +00:00
a19f6bfcad Merge pull request #8823 from davidhorstmann-arm/fix-config-bitflag-2.28
[Backport 2.28] Update `SSL_SERIALIZED_SESSION_CONFIG_BITFLAG` with new flags
2024-03-05 13:17:43 +00:00
fc8cacf9a2 Add missing config guards in comment
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-05 10:46:26 +00:00
f3c3504f5a Fix merge
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-03-04 17:17:51 +01:00
26bbd8dd4e Merge branch 'mbedtls-2.28-restricted' into bp228_buffer_protection_for_cipher
Signed-off-by: Gábor Mezei <63054694+gabor-mezei-arm@users.noreply.github.com>
2024-03-04 15:39:35 +00:00
126dc1cd52 Merge pull request #1173 from davidhorstmann-arm/generate-random-buffer-protection-backport
[Backport 2.28] Add secure buffer copying to `psa_generate_random()`
2024-03-04 13:23:50 +00:00
5e5056d6ab cmake: Use GnuInstallDirs to customize install directories
Replace custom LIB_INSTALL_DIR with standard CMAKE_INSTALL_LIBDIR variable.
For backward compatibility, set CMAKE_INSTALL_LIBDIR if LIB_INSTALL_DIR is set.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2024-03-01 12:05:00 -06:00
dff18da29a fix zlib test
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-03-01 15:53:52 +00:00
f5a6fa2e4a Fix code style
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 12:31:35 +00:00
ec8a5b175e Add ChangeLog entry for ssl serialization bitflags
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 12:19:00 +00:00
11def97472 Fix naming inconsistencies in config bits
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 12:15:56 +00:00
363db7759a Add config guards to ssl session comment
Show which members of the session structure are dependent on
configuration options and which aren't.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 12:11:24 +00:00
e264a7dcd1 Fix generate_visualc_files.pl
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 21:22:59 +00:00
422f9bcea0 Fix formatting
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 18:42:07 +00:00
ff783e0bda Do not copy the content to the local output buffer with allocation
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-02-29 16:46:12 +00:00
7f4b7dd382 Remove write check in driver wrappers tests
This check is intended to ensure that we do not write intermediate
results to the shared output buffer. This check will be made obselete
by generic memory-poisoning-based testing for all functions.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-02-29 16:44:24 +00:00
8677edda6e Fix buffer protection handling for cipher_generate_iv
Use the `LOCAL_OUTPUT_` macros for buffer protection instead of the existing
local variable.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-02-29 16:44:24 +00:00