Commit Graph

5146 Commits

Author SHA1 Message Date
Simon Butcher
e9a437fe59 Correct logic to exclude i386 inline assenbly when -O0
The i386 MPI inline assembly code was being incorrectly included when
all compiler optimisation was disabled.
2018-07-23 13:42:05 +01:00
Simon Butcher
698cb3469d Add additional i386 tests to all.sh
Added an additional i386 test to all.sh, to allow one test with -O0 which
compiles out inline assembly, and one to test with -01 which includes the inline
assembly.
2018-07-23 13:41:56 +01:00
Jaeden Amero
7ef1f5b0c6 all.sh: Return error on keep-going failure
When calling all.sh from a script and using "--keep-going", errors were
sometimes missed due to all.sh always returning 0 "success" return code.
Return 1 if there is any failure encountered during a "keep-going" run.
2018-07-23 10:24:53 +01:00
Simon Butcher
f218c0c5cf Expand i386 all.sh tests to full config ASan builds
The i386 test builds were only building the default configuration and had
no address sanitisation. This commit expands the test configuration to the full
configuration in all.sh and builds with ASan for when the test suites are
executed.
2018-07-20 21:40:52 +01:00
Simon Butcher
c098ec3af6 Merge remote-tracking branch 'public/pr/1779' into mbedtls-2.1 2018-07-20 14:47:37 +01:00
Simon Butcher
3a97bc2ced Merge remote-tracking branch 'public/pr/1837' into mbedtls-2.1 2018-07-19 20:01:44 +01:00
Simon Butcher
ff5bd6220b Fix ChangeLog entry for issue #1663
The ChangeLog entry was under the wrong version, and under Changes, not
Bug Fixes.
2018-07-19 19:59:02 +01:00
Simon Butcher
eebee76f93 Merge remote-tracking branch 'public/pr/1846' into mbedtls-2.1 2018-07-19 19:48:40 +01:00
Simon Butcher
f11daf6ff6 Merge remote-tracking branch 'public/pr/1850' into mbedtls-2.1 2018-07-19 16:14:44 +01:00
Ron Eldor
41273200a2 Update ChangeLog
Remove extra entries added by a bad cherry-pick.
2018-07-17 14:16:12 +03:00
Ron Eldor
99b9f12a91 Repharse comments
Rephrase comments to clarify them.
2018-07-17 13:31:57 +03:00
Andres Amaya Garcia
dc8b6df7a7 Add test for empty app data records to ssl-opt.sh 2018-07-16 20:22:30 +01:00
Andres Amaya Garcia
01daf2a5ef Add ChangeLog entry for empty app data fix 2018-07-16 20:22:28 +01:00
Andres Amaya Garcia
6aa5169c7a Fix ssl_client2 to send 0-length app data 2018-07-16 20:22:20 +01:00
Angus Gratton
fd1c5e8453 Check for invalid short Alert messages
(Short Change Cipher Spec & Handshake messages are already checked for.)
2018-07-16 20:20:51 +01:00
Angus Gratton
485b3930c9 TLSv1.2: Treat zero-length fragments as invalid, unless they are application data
TLS v1.2 explicitly disallows other kinds of zero length fragments (earlier standards
don't mention zero-length fragments at all).
2018-07-16 20:20:49 +01:00
Angus Gratton
1226dd7715 CBC mode: Allow zero-length message fragments (100% padding)
Fixes https://github.com/ARMmbed/mbedtls/issues/1632
2018-07-16 20:20:44 +01:00
k-stachowiak
b435e99693 Update change log 2018-07-16 12:27:34 +02:00
k-stachowiak
2d2d80b916 Prevent buffer overread by one byte 2018-07-16 12:27:23 +02:00
Manuel Pégourié-Gonnard
534fea790e Clarify attack conditions in the ChangeLog.
Referring to the previous entry could imply that the current one was limited
to SHA-384 too, which it isn't.
2018-07-12 10:20:33 +02:00
Manuel Pégourié-Gonnard
671f932a87 Avoid debug message that might leak length
The length to the debug message could conceivably leak through the time it
takes to print it, and that length would in turn reveal whether padding was
correct or not.
2018-07-12 10:20:33 +02:00
Manuel Pégourié-Gonnard
99b6a711c8 Add counter-measure to cache-based Lucky 13
The basis for the Lucky 13 family of attacks is for an attacker to be able to
distinguish between (long) valid TLS-CBC padding and invalid TLS-CBC padding.
Since our code sets padlen = 0 for invalid padding, the length of the input to
the HMAC function, and the location where we read the MAC, give information
about that.

A local attacker could gain information about that by observing via a
cache attack whether the bytes at the end of the record (at the location of
would-be padding) have been read during MAC verification (computation +
comparison).

Let's make sure they're always read.
2018-07-12 10:20:33 +02:00
Manuel Pégourié-Gonnard
69675d056a Fix Lucky 13 cache attack on MD/SHA padding
The basis for the Lucky 13 family of attacks is for an attacker to be able to
distinguish between (long) valid TLS-CBC padding and invalid TLS-CBC padding.
Since our code sets padlen = 0 for invalid padding, the length of the input to
the HMAC function gives information about that.

Information about this length (modulo the MD/SHA block size) can be deduced
from how much MD/SHA padding (this is distinct from TLS-CBC padding) is used.
If MD/SHA padding is read from a (static) buffer, a local attacker could get
information about how much is used via a cache attack targeting that buffer.

Let's get rid of this buffer. Now the only buffer used is the internal MD/SHA
one, which is always read fully by the process() function.
2018-07-12 10:20:33 +02:00
Ron Eldor
2e7b686f71 Remove reference to ECJPAKE
Remove reference to `MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED` as branch
`mbedtls-2.1` doesn't have `ECJPAKE`. This definition was accidently
inserted in a backport.
2018-07-11 13:37:38 +03:00
Simon Butcher
4171347709 Disable use of the i386 assembly for option -O0
We don't compile in the assembly code if compiler optimisations are disabled as
the number of registers used in the assembly code doesn't work with the -O0
option. Also anyone select -O0 probably doesn't want to compile in the assembly
code anyway.
2018-07-10 23:02:27 +01:00
Simon Butcher
54cf322c05 Add fix for #1550 and credit to the ChangeLog 2018-07-10 23:02:15 +01:00
Simon Butcher
cdad40dfce Add ebx to the i386 clobber list for MPI assembly
This fix adds the ebx register to the clobber list for the i386 inline assembly
for the multiply helper function.

ebx was used but not listed, so when the compiler chose to also use it, ebx was
getting corrupted. I'm surprised this wasn't spotted sooner.

Fixes Github issues #1550.
2018-07-10 23:00:38 +01:00
Simon Butcher
57e9fe2df4 Merge remote-tracking branch 'public/pr/1808' into mbedtls-2.1 2018-07-10 14:59:56 +01:00
Simon Butcher
275265dc1d Merge remote-tracking branch 'public/pr/1823' into mbedtls-2.1 2018-07-10 14:34:34 +01:00
Simon Butcher
7175918621 Merge remote-tracking branch 'public/pr/1445' into mbedtls-2.1 2018-07-10 12:57:56 +01:00
Simon Butcher
ec971d7434 Merge remote-tracking branch 'public/pr/1828' into mbedtls-2.1 2018-07-10 12:51:03 +01:00
Gilles Peskine
2347d4eb3b Add ChangeLog entry 2018-07-10 13:03:54 +02:00
Simon Butcher
cb74333a8a Merge remote-tracking branch 'public/pr/1820' into mbedtls-2.1 2018-07-10 11:39:10 +01:00
k-stachowiak
9e070019ad Update change log 2018-07-09 14:44:26 +02:00
k-stachowiak
4772a1fd3c Fix memory leak in ssl_setup 2018-07-09 10:43:37 +02:00
Philippe Antoine
bbc7918b6b Fixes different off by ones 2018-07-09 10:33:08 +02:00
Jaeden Amero
d1da083175 tests: dhm: Rename Hallman to Hellman
Fix typo of Diffie-Hallman to Diffie-Hellman.
2018-07-06 14:28:02 +01:00
Ron Eldor
5c8e588444 Minor fixes
1. Rephrase ChangeLog entry.
2. Add a full stop at the end of the fuinction documentation.
2018-07-05 14:59:23 +03:00
Ron Eldor
3cd35d1cee Revert changes in the configs folder
Revert the changes in the `configs` folder to
align with the `README.txt` file.
2018-07-05 14:48:19 +03:00
Simon Butcher
4b57a1f182 Add ChangeLog entry for #992 fix 2018-07-02 12:18:35 +01:00
Brendan Shanks
9e31693f67 x509.c: Remove unused includes
Remove unused includes guarded by MBEDTLS_FS_IO, which doesn't appear
anywhere else in the file.
2018-07-02 12:17:44 +01:00
Ron Eldor
6877685ac6 Restore accidentally deleted lines
Restore lines that were accidentally deleted by a previous
moerge conflict.
2018-07-01 10:05:49 +03:00
Gilles Peskine
2cc7ad4cfc Fix ssl-opt.sh not starting when lsof is not available
$START_DELAY was used before it was defined.
2018-06-29 16:03:18 +02:00
niisato
000e48af07 Add ChangeLog 2018-06-29 11:31:52 +01:00
niisato
8ba6ff578d about a issue Replace "new" variable #1782 2018-06-29 11:30:03 +01:00
Ron Eldor
2eee2e63e5 Update ssl-opt.sh test to run condition
1. Update the test script to un the ECC tests only if the relevant
configurations are defined in `config.h` file
2. Change the HASH of the ciphersuite from SHA1 based to SHA256
for better example
2018-06-28 16:20:00 +03:00
Ron Eldor
b27a1ab18f Add ECC extensions test in ssl-opts.sh
Add test to verify if an ecc based extension exists
or not if an ecc based ciphersuite is used or not.
2018-06-28 16:09:31 +03:00
Ron Eldor
f27f8aeb19 Update ChangeLog
Update ChangeLog with a less ambigous description.
2018-06-28 16:08:09 +03:00
Ron Eldor
5c141d28ca Add entry in ChangeLog
Add an entry in the ChangeLog, describing the fix.
2018-06-28 16:08:01 +03:00
Ron Eldor
b847d8f2a9 Add ecc extensions only if ecc ciphersuite is used
Fix compliancy to RFC4492. ECC extensions should be included
only if ec ciphersuites are used. Interoperability issue with
bouncy castle. #1157
2018-06-28 16:07:22 +03:00