Commit graph

16903 commits

Author SHA1 Message Date
Manuel Pégourié-Gonnard
71ce4ef981 Fix bug with UDP proxy not forwarding enough
We previously introduced a safety check ensuring that if a datagram had
already been dropped twice, it would no longer be dropped or delayed
after that.

This missed an edge case: if a datagram is dropped once, it can be
delayed any number of times. Since "delay" is not defined in terms of
time (x seconds) but in terms of ordering with respect to other messages
(will be forwarded after the next message is forwarded), depending on
the RNG results this could result in an endless loop where all messages
are delayed until the next, which is itself delayed, etc. and no message
is ever forwarded.

The probability of this happening n times in a row is (1/d)^n, where d
is the value passed as delay=d, so for delay=5 and n=5 it's around 0.03%
which seems small but we still happened on such an occurrence in real
life:

    tests/ssl-opt.sh --seed 1625061502 -f 'DTLS proxy: 3d, min handshake, resumption$'

results (according to debug statements added for the investigation) in
the ClientHello of the second handshake being dropped once then delayed
5 times, after which the client stops re-trying and the test fails for
no interesting reason.

Make sure this doesn't happen again by putting a cap on the number of
times we fail to forward a given datagram immediately.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2021-07-06 12:39:43 +02:00
Manuel Pégourié-Gonnard
69c10a41c7 Fix memory leak on failure path in test code
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2021-07-06 12:05:23 +02:00
Joe Subbiani
f37bbe53a0 Extend psa_crypto_metadata tests to check for powers of 2
Add a check to ensure the block_size is or is not a power of 2

Add a new parameter to verify the expected pass/fail when a block_size
is or is not a power of 2.

Add new sets of input data to verify these tests

Fixes #4228

Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
2021-07-06 10:42:54 +01:00
Dave Rodgman
745e3587be Fix Changelog indentation
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-05 18:53:31 +01:00
Dave Rodgman
5b13f60aa3 Fix indentation
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-05 18:09:16 +01:00
TRodziewicz
302ed2bf7d Reverting the TLS 1.3 compatibility
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-07-05 16:55:27 +02:00
Dave Rodgman
16d802ed25 Remove obsolete entry from Changelog
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-05 15:40:35 +01:00
TRodziewicz
5f58dfc9d9 Addition of the changelog file.
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-07-05 16:21:59 +02:00
TRodziewicz
d9be65277d Corrections to the new functions names and error message wording
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-07-05 15:16:00 +02:00
TRodziewicz
053b99b90b Re-introduction of key slot chekcs
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-07-05 12:06:03 +02:00
Yuto Takano
6f6574381e Move repetitive equality check to requires_config_value_equals
Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Yuto Takano
0248582033 Reword and add explanatory comments for MAX_IM_CA tests
- Reword the comment on config.h to suggest that
  `MAX_INTERMEDIATE_CA` may not exist in the config.
- Add a comment explaining why the tests are more restrictive
  than necessary.

Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Yuto Takano
b0a1c5b021 Use requires_max_content_len, add check in Renegotiation
- Abstract out repetitive checks for IN and OUT content lens
- Remove unclear comment and redundant echo
- Add content length constraints in Renegotiation with fragment length test

Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Yuto Takano
2be6f1ac5b Add space between command substitution braces and content
Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Yuto Takano
73e7dcbdfc Add MAX_IM_CA requirement to int_max+1 chain as well
Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Yuto Takano
e43556b6bf Remove hard exit with MAX_INTERMEDIATE_CA in ssl-opt.sh
- Replace last remaining dependency on config.py with query_config
- Replace hard exit with `requires_config_value_at_least` and
  `requires_config_value_at_most` to maintain the same effect

Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Yuto Takano
0509fea3b2 Remove hard exit in ssh-opt.sh, replace with requires functions
- Replace calls to config.py for MAX_IN_LEN and MAX_OUT_LEN with
  `get_config_value_or_default`
- Remove hard exit when MAX_IN/OUT_LEN < 4096, replace with
  `requires_config_value_at_least`

Signed-off-by: Yuto Takano <yuto.takano@arm.com>
2021-07-02 15:37:19 +01:00
Dave Rodgman
527b82a34c Bump .so version numbers to stay ahead of 2.x
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-02 15:19:38 +01:00
Dave Rodgman
8e5020dead Remove obsolete reference to _ret in migration guide
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-02 12:16:03 +01:00
Dave Rodgman
814b099501 Remove obsolete reference to _ret
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-02 12:11:14 +01:00
Dave Rodgman
83f6a3b02c Remove not-required Changelog entries
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:28:56 +01:00
Dave Rodgman
0703f694b8 Remove warning of development instability from README
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:06:26 +01:00
Dave Rodgman
a84a8eb545 Update changelog to cover #4197
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:01:04 +01:00
Dave Rodgman
0eb215f4a4 Update changelog to cover #4246 and #4158
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:00:38 +01:00
Dave Rodgman
aa6a9b1725 Update changelog to cover #4488
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 17:00:06 +01:00
Dave Rodgman
9bd038907b Update changelog to cover #4517
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 16:59:49 +01:00
Dave Rodgman
eaef0b78db Update changelog to cover #4720
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 16:59:13 +01:00
Dave Rodgman
2a9c783625 Add additional generated files
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 09:57:20 +01:00
Dave Rodgman
3e84187132 Add auto-generated files
Add files generated by running make generated_files

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 09:45:38 +01:00
Dave Rodgman
1bc9e934e2 Manual updates to version information
This covers a few files that were missed by scripts/bump_version.sh

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-07-01 09:26:12 +01:00
Dave Rodgman
7601657418 Bump library version numbers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 23:09:51 +01:00
Dave Rodgman
bb2eece7cf Create aggregated ChangeLog
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 23:09:51 +01:00
Dave Rodgman
b1d1c2af73 Fix filename on Changelog item
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 22:51:28 +01:00
Dave Rodgman
34d8cd2892 Merge remote-tracking branch 'restricted/development-restricted' into mbedtls-3.0.0rc0-pr 2021-06-30 22:51:02 +01:00
Dave Rodgman
bd3bfbf5c2
Merge pull request #4737 from daverodgman/migration-guide 2021-06-30 21:31:53 +01:00
Dave Rodgman
7b743193b0 Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 20:10:10 +01:00
Dave Rodgman
9637bd30a3 Move subsections
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 20:07:57 +01:00
Dave Rodgman
b0e6bb54f9 Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 20:03:55 +01:00
Dave Rodgman
26c12eb523 Remove C from code block
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:58:00 +01:00
Dave Rodgman
10963278e7 Mark all code blocks as C
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
a014831732 Add missing backticks
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
7d2ac88f93 Correct hyperlink
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
2482650483 Correct hyperlink
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
2b03457ca5 Improve wording
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
b4d15b1556 Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
8128b69ffe Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
715966862d Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
507827e75a Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
68547187f6 Move subsections
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00
Dave Rodgman
897a95f46c Move subsection
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-06-30 19:13:24 +01:00