Commit Graph

695 Commits

Author SHA1 Message Date
Manuel Pégourié-Gonnard
40510a3a79 Update ChangeLog for latest PR merged
fixes #309
2016-01-08 15:22:41 +01:00
Manuel Pégourié-Gonnard
a3a1cd33d1 Update reference to attack in ChangeLog
We couldn't do that before the attack was public
2016-01-08 15:11:12 +01:00
Simon Butcher
84181adae8 Change version number to 1.3.16
Changed version for library files and yotta module
2016-01-04 22:49:30 +00:00
Simon Butcher
a39690e7bf Correction to ChangeLog
Corrected function name for rsa_rsassa_pkcs1_v15_sign()
2016-01-02 00:49:12 +00:00
Simon Butcher
14400c8fb0 Merge memory leak fix into branch 'mbedtls-1.3'
Merge of fix for memory leak in RSA-SSA signing - #372
2016-01-02 00:28:19 +00:00
Simon Butcher
7d3f3a8ac8 Fix for memory leak in RSA-SSA signing
Fix in mbedtls_rsa_rsassa_pkcs1_v15_sign() in rsa.c. Resolves github issue #372
2016-01-02 00:03:39 +00:00
Simon Butcher
a192c8f5d8 Merge branch 'iotssl-541-1.3-pathlen-bugfix' 2016-01-01 01:13:45 +00:00
Manuel Pégourié-Gonnard
c05014459e Fix wrong length limit in GCM
See for example page 8 of
http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf

The previous constant probably came from a typo as it was 2^26 - 2^5 instead
of 2^36 - 2^5. Clearly the intention was to allow for a constant bigger than
2^32 as the ull suffix and cast to uint64_t show.

fixes #362
2015-12-10 16:34:32 +01:00
Manuel Pégourié-Gonnard
c4a47e3483 Fix bug checking pathlen on first intermediate
Remove check on the pathLenConstraint value when looking for a parent to the
EE cert, as the constraint is on the number of intermediate certs below the
parent, and that number is always 0 at that point, so the constraint is always
satisfied.

The check was actually off-by-one, which caused valid chains to be rejected
under the following conditions:
- the parent certificate is not a trusted root, and
- it has pathLenConstraint == 0 (max_pathlen == 1 in our representation)

fixes #280
2015-11-19 12:06:45 +01:00
Simon Butcher
1f4e08c979 Changed version number to 1.3.15
Changed for library
2015-11-05 15:44:46 +00:00
Simon Butcher
34fc23fa6a Corrected typo in ChangeLog 2015-11-03 23:14:16 +00:00
Manuel Pégourié-Gonnard
edb2327609 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Use own implementation of strsep()
  Add Changelog entries for this branch
  Use symbolic constants in test data
  Fixed pathlen contraint enforcement.
  Additional corner cases for testing pathlen constrains. Just in case.
  Added test case for pathlen constrains in intermediate certificates
2015-11-02 06:57:30 +09:00
Manuel Pégourié-Gonnard
f23d6c56a4 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Add ChangeLog entry for previous commit
  cert_write : fix "Destination buffer is too small" error
  Add ChangeLog entry for previous two commits
  Test certificate "Server1 SHA1, key_usage" reissued.
  Fix boolean values according to DER specs
  Fix typo in an OID name
  Disable reportedly broken assembly of Sparc(64)
  ECHDE-PSK does not use a certificate
  Actually ignore most non-fatal alerts
2015-10-30 10:17:05 +01:00
Manuel Pégourié-Gonnard
54150a36d1 Add Changelog entries for this branch 2015-10-30 09:45:00 +01:00
Manuel Pégourié-Gonnard
664b751572 Add ChangeLog entry for previous commit 2015-10-27 15:12:39 +01:00
Manuel Pégourié-Gonnard
96e75ac97c Add ChangeLog entry for previous two commits 2015-10-27 15:12:39 +01:00
Manuel Pégourié-Gonnard
c4baf98ce6 Fix typo in an OID name
fixes #314
2015-10-27 15:12:39 +01:00
Manuel Pégourié-Gonnard
7bbabeae8f Disable reportedly broken assembly of Sparc(64)
fixes #292
2015-10-27 15:12:39 +01:00
Manuel Pégourié-Gonnard
c094a97223 ECHDE-PSK does not use a certificate
fixes #270
2015-10-27 15:12:39 +01:00
Manuel Pégourié-Gonnard
0aaefcebc0 Actually ignore most non-fatal alerts
fixes #308
2015-10-27 15:12:39 +01:00
Manuel Pégourié-Gonnard
758f490c90 Fix potential buffer overflow in asn1write
Ref: IOTSSL-519

backport of 22c3b7b
2015-10-27 11:47:37 +01:00
Manuel Pégourié-Gonnard
215a14bf29 Fix potential heap corruption on Windows
If len is large enough, when cast to an int it will be negative and then the
test if( len > MAX_PATH - 3 ) will not behave as expected.

Ref: IOTSSL-518

backport of 261faed725
2015-10-27 11:47:37 +01:00
Manuel Pégourié-Gonnard
9c52176776 Fix potential double-free in ssl_set_psk()
Internal ref: IOTSSL-517
2015-10-27 11:47:37 +01:00
Manuel Pégourié-Gonnard
f093bde91e Bump version to 1.3.14 2015-10-05 19:06:46 +01:00
Manuel Pégourié-Gonnard
c5934272fc Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Fix spurious #endif from previous cherry-pick
  Fix macroization of inline in C++
  Add missing warning in doc
  Fix compile error in net.c with musl libc
2015-10-05 17:06:24 +01:00
Simon Butcher
36abef4c5c Merge multiple backported vulnerability fixes 2015-10-05 16:44:59 +01:00
Manuel Pégourié-Gonnard
20607bb0fa Fix macroization of inline in C++
When compiling as C++, MSVC complains about our macroization of a keyword.
Stop doing that as we know inline is always available in C++
2015-10-05 14:28:17 +01:00
Manuel Pégourié-Gonnard
614624790d Fix compile error in net.c with musl libc
fixes #278
2015-10-05 14:15:46 +01:00
Manuel Pégourié-Gonnard
de9c8a5734 Fix potential overflow in CertificateRequest 2015-10-02 12:04:20 +02:00
Manuel Pégourié-Gonnard
c7e61a2e3f Fix more typos in ChangeLog 2015-10-01 18:22:54 +02:00
Manuel Pégourié-Gonnard
6d6018383e Fix typos in ChangeLog and comments 2015-10-01 18:20:55 +02:00
Manuel Pégourié-Gonnard
48ec2c7b5e Fix potential overflow in base64_encode 2015-10-01 10:07:28 +02:00
Manuel Pégourié-Gonnard
5aff029f9d Fix potential double-free in ssl_set_psk() 2015-10-01 09:58:50 +02:00
Simon Butcher
643a922c56 Reordered extension fields and added to ChangeLog
Reordered the transmission sequence of TLS extension fields in client hello
and added to ChangeLog.
2015-10-01 01:17:10 +01:00
Manuel Pégourié-Gonnard
9bf29bee22 Fix potential random malloc in pem_read() 2015-09-30 17:01:35 +02:00
Manuel Pégourié-Gonnard
59efb6a1b9 Fix potential buffer overflow in mpi_read_string()
Found by Guido Vranken.

Two possible integer overflows (during << 2 or addition in BITS_TO_LIMB())
could result in far too few memory to be allocated, then overflowing the
buffer in the subsequent for loop.

Both integer overflows happen when slen is close to or greater than
SIZE_T_MAX >> 2 (ie 2^30 on a 32 bit system).

Note: one could also avoid those overflows by changing BITS_TO_LIMB(s << 2) to
CHARS_TO_LIMB(s >> 1) but the solution implemented looks more robust with
respect to future code changes.
2015-09-30 16:50:31 +02:00
Manuel Pégourié-Gonnard
7b4b2ac378 Fix stack buffer overflow in pkcs12 2015-09-30 16:46:07 +02:00
Simon Butcher
21823f9a69 Refined credits in ChangeLog for fuzzing issue
Changed GDS to Gotham Digital Science
2015-09-22 10:20:58 +01:00
Manuel Pégourié-Gonnard
df048c59cf Bump version to 1.3.13 2015-09-17 11:53:14 +02:00
Manuel Pégourié-Gonnard
a701d2f5e9 Fix bug in server parsing point formats extension
There is only one length byte but for some reason we skipped two, resulting in
reading one byte past the end of the extension. Fortunately, even if that
extension is at the very end of the ClientHello, it can't be at the end of the
buffer since the ClientHello length is at most SSL_MAX_CONTENT_LEN and the
buffer has some more room after that for MAC and so on. So there is no
buffer overread.

Possible consequences are:
- nothing, if the next byte is 0x00, which is a comment first byte for other
  extensions, which is why the bug remained unnoticed
- using a point format that was not offered by the peer if next byte is 0x01.
  In that case the peer will reject our ServerKeyExchange message and the
handshake will fail.
- thinking that we don't have a common point format even if we do, which will
  cause us to immediately abort the handshake.
None of these are a security issue.

The same bug was fixed client-side in fd35af15

Backport of f7022d1
2015-09-17 11:46:56 +02:00
Manuel Pégourié-Gonnard
a1cdcd2364 Add counter-measure against RSA-CRT attack
https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/

backport of 5f50104
2015-09-09 12:23:47 +02:00
Manuel Pégourié-Gonnard
bb564e0fb4 Fix possible client crash on API misuse 2015-09-03 10:44:32 +02:00
Manuel Pégourié-Gonnard
5f6b2b67c4 Changelog entry for the previous commits 2015-09-01 19:40:02 +02:00
Manuel Pégourié-Gonnard
6512554f42 Fix handling of long PSK identities
backport from c3b5d83

see #238
2015-08-31 11:43:47 +02:00
Manuel Pégourié-Gonnard
6432c7e782 Fix memory corruption in rsa sign/verify programs
backport from d74c697

see #210
2015-08-31 11:30:07 +02:00
Manuel Pégourié-Gonnard
e217ceea38 Fix warning with MD/SHA ALT implementation
backport of 8b2641d

see #239
2015-08-31 11:22:47 +02:00
Manuel Pégourié-Gonnard
a67fd79e8f Fix -Wshadow warnings
Backport of ea35666 and 824ba72

see #240
2015-08-31 11:07:51 +02:00
Manuel Pégourié-Gonnard
5efed09c5f Fix possible unlock before lock in RSA
Backport of 1385a28 and 4d04cdc

see #257
2015-08-31 10:21:10 +02:00
Manuel Pégourié-Gonnard
89789be80f Fix handling of new config option
fixes #256
2015-08-27 09:54:16 +02:00
Paul Bakker
3edec6c4ed Prepare for 1.3.12 release 2015-08-11 13:22:10 +01:00
Manuel Pégourié-Gonnard
cc86ac5d56 Fix compile error with armcc5 --gnu 2015-08-10 12:10:39 +02:00
Manuel Pégourié-Gonnard
b5d77d3fd9 Accept a trailing space at end of PEM lines
With certs being copy-pasted from webmails and all, this will probably become
more and more common.
2015-08-10 12:01:50 +02:00
Manuel Pégourié-Gonnard
1b1254fa05 Fix missing -static-libgcc when building dlls 2015-08-10 11:56:54 +02:00
Manuel Pégourié-Gonnard
a64b15ee73 Fix bug with cmake and old version of GCC 2015-08-10 11:35:02 +02:00
Manuel Pégourié-Gonnard
f0f399d66c Up default server DHM size to 2048 bits 2015-07-03 17:45:57 +02:00
Manuel Pégourié-Gonnard
006f655218 Add forgotten programs in Makefile
Closes #209
2015-06-29 18:52:57 +02:00
Manuel Pégourié-Gonnard
9ea1b23cc4 Up min size of DHM params to 1024 bits on client 2015-06-29 18:52:57 +02:00
Manuel Pégourié-Gonnard
6c3ccf5fd0 Fix thread-safety issue in debug.c
Closes #203
2015-06-29 18:52:57 +02:00
Paul Bakker
19eef51487 Prepare for 1.3.11 release 2015-06-04 14:49:19 +02:00
Manuel Pégourié-Gonnard
dccb80b7e5 Fix compile errors with NO_STD_FUNCTIONS 2015-06-03 10:20:33 +01:00
Manuel Pégourié-Gonnard
f2ec505c34 Ack external bugfix in Changelog 2015-06-03 09:50:07 +01:00
Manuel Pégourié-Gonnard
3e87a9f57f FIx misplaced Changelog entry (oops) 2015-06-03 09:48:26 +01:00
Manuel Pégourié-Gonnard
d22514e8f6 Fix contributor's name in Changelog 2015-06-02 12:59:59 +01:00
Manuel Pégourié-Gonnard
5866848092 Update ChangeLog for recent external bugfix 2015-06-02 09:08:35 +01:00
Manuel Pégourié-Gonnard
61977614d8 Fix memleak with repeated [gc]cm_setkey() 2015-05-27 17:40:16 +02:00
Manuel Pégourié-Gonnard
154b00b07b Update Changelog for recent contribution 2015-05-11 21:05:36 +02:00
Manuel Pégourié-Gonnard
fa950c9480 fix bug in ssl_mail_client 2015-04-30 12:50:22 +02:00
Manuel Pégourié-Gonnard
159c524df8 Fix undefined behaviour in x509 2015-04-30 11:21:18 +02:00
Manuel Pégourié-Gonnard
7b12492c77 Include changes from the 1.2 branch 2015-04-30 10:16:19 +02:00
Manuel Pégourié-Gonnard
7d1e95c991 Add countermeasure against cache-based lucky 13 2015-04-29 17:07:31 +02:00
Manuel Pégourié-Gonnard
e16b62c3a9 Make results of (ext)KeyUsage accessible 2015-04-29 17:07:31 +02:00
Manuel Pégourié-Gonnard
770b5e1e9e Fix missing NULL check in MPI 2015-04-29 17:02:01 +02:00
Manuel Pégourié-Gonnard
d97828e7af Fix detection of getrandom() 2015-04-29 14:28:48 +02:00
Manuel Pégourié-Gonnard
f5203e0bb5 Fix "make install" handling of symlinks 2015-04-29 14:28:48 +02:00
Manuel Pégourié-Gonnard
39a183a629 Add x509_crt_verify_info() 2015-04-17 17:24:25 +02:00
Manuel Pégourié-Gonnard
ba334201a9 Fix typo in contributor name (oops!) 2015-04-17 17:24:20 +02:00
Manuel Pégourié-Gonnard
a2fce21ae5 Fix potential NULL dereference on bad usage 2015-04-15 21:04:19 +02:00
Manuel Pégourié-Gonnard
12a8b66961 Update Changelog for recent merge 2015-04-15 14:20:14 +02:00
Manuel Pégourié-Gonnard
95f00892d2 Update Changelog for DH params 2015-04-15 14:12:05 +02:00
Manuel Pégourié-Gonnard
0645bfa74e Fix typos in Changelog 2015-04-15 11:21:24 +02:00
Manuel Pégourié-Gonnard
e6c8366b46 Fix bug in pk_parse_key() 2015-04-15 11:21:24 +02:00
Paul Bakker
6152b0267c Fixed typos 2015-04-14 15:00:09 +02:00
Manuel Pégourié-Gonnard
23ce09b18f Deprecate HAVE_INT8 and HAVE_INT16 2015-04-09 14:51:51 +02:00
Manuel Pégourié-Gonnard
a98af5e2b2 Deprecate using NET_C without HAVE_IPV6 2015-04-09 14:40:46 +02:00
Manuel Pégourié-Gonnard
8c3f0f4c16 Official deprecate compat-1.2.h and openssl.h 2015-04-09 14:10:26 +02:00
Manuel Pégourié-Gonnard
29f777ef54 Fix bug with ssl_set_curves() check on client 2015-04-03 17:57:59 +02:00
Manuel Pégourié-Gonnard
cf201201e6 Fix bug in Via Padlock support 2015-04-02 10:53:59 +01:00
Manuel Pégourié-Gonnard
0878a0d884 Add missing depends in x509 programs 2015-03-31 15:14:37 +02:00
Manuel Pégourié-Gonnard
88fca3ef0e Fix thread safety issue in RSA operations
The race was due to mpi_exp_mod storing a Montgomery coefficient in the
context (RM, RP, RQ).

The fix was verified with -fsanitize-thread using ssl_pthread_server and two
concurrent clients.

A more fine-grained fix should be possible, locking just enough time to check
if those values are OK and set them if not, rather than locking for the whole
mpi_exp_mod() operation, but it will be for later.
2015-03-27 15:12:05 +01:00
Manuel Pégourié-Gonnard
39ead3ef2f Add test certificate for bitstring in DN 2015-03-27 13:11:33 +01:00
Manuel Pégourié-Gonnard
f7dbedb7db Update Changelog for deprecation config flags 2015-03-23 14:20:04 +01:00
Manuel Pégourié-Gonnard
40f315ac16 Document recent make changes 2015-03-13 13:50:30 +00:00
Manuel Pégourié-Gonnard
1a90147dc5 Add missing extern "C" guard in aesni.h 2015-03-10 16:12:29 +00:00
Manuel Pégourié-Gonnard
51bccd3889 Fix compile error with renego disabled 2015-03-10 16:09:08 +00:00
Manuel Pégourié-Gonnard
f427f8854a Stop checking key-cert match systematically 2015-03-10 15:35:29 +00:00
Manuel Pégourié-Gonnard
df4e44025d Update Changelog 2015-02-18 10:11:06 +00:00
Manuel Pégourié-Gonnard
ad350ed759 Update Changelog for the mem-measure branch 2015-02-16 17:45:35 +00:00
Manuel Pégourié-Gonnard
ea0184bbeb Document changes to make for windows 2015-02-16 15:42:16 +00:00
Manuel Pégourié-Gonnard
09eb14c01e Revert "Require unix-utils in path for windows make"
This reverts commit 5d46cca09a.

In preparation of merging an external contribution that superseedes this

Conflicts:
	ChangeLog
2015-02-16 15:25:31 +00:00
Manuel Pégourié-Gonnard
6fdc4cae53 Fix potential signedness issue 2015-02-16 09:13:40 +00:00