Andrzej Kurek
1605074f97
Guard from undefined behaviour in case of an INT_MAX max_pathlen
...
When parsing a certificate with the basic constraints extension
the max_pathlen that was read from it was incremented regardless
of its value. However, if the max_pathlen is equal to INT_MAX (which
is highly unlikely), an undefined behaviour would occur.
This commit adds a check to ensure that such value is not accepted
as valid. Relevant tests for INT_MAX and INT_MAX-1 are also introduced.
Certificates added in this commit were generated using the
test_suite_x509write, function test_x509_crt_check. Input data taken
from the "Certificate write check Server1 SHA1" test case, so the generated
files are like the "server1.crt", but with the "is_ca" field set to 1 and
max_pathlen as described by the file name.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2020-04-15 06:15:45 -04:00
..
2020-01-15 15:55:11 +00:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2020-02-03 10:39:55 +00:00
2019-12-19 10:24:22 +00:00
2019-08-15 15:44:50 +01:00
2020-02-06 09:52:01 +01:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2019-12-03 16:07:18 +00:00
2020-03-19 13:36:33 +01:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2020-01-21 15:02:14 +01:00
2019-12-03 16:07:18 +00:00
2020-03-23 17:55:32 +01:00
2020-01-15 15:55:11 +00:00
2020-03-19 13:36:33 +01:00
2019-09-04 10:11:45 +01:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2020-01-24 12:11:56 +01:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2020-03-19 14:23:45 +01:00
2019-12-03 16:07:18 +00:00
2019-12-19 10:24:22 +00:00
2020-03-23 17:55:31 +01:00
2020-01-15 15:55:11 +00:00
2019-08-15 15:44:50 +01:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2020-03-26 07:18:42 -04:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2020-03-19 14:23:45 +01:00
2019-08-15 15:44:50 +01:00
2020-03-19 13:36:33 +01:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2019-08-15 15:44:50 +01:00
2019-12-03 16:07:18 +00:00
2020-01-31 10:15:32 +01:00
2020-01-31 10:15:32 +01:00
2019-12-03 16:07:18 +00:00
2020-03-19 13:36:33 +01:00
2019-12-03 16:07:18 +00:00
2020-02-18 10:31:29 +01:00
2020-01-31 10:24:21 +01:00
2019-09-04 11:31:35 +01:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2019-08-08 10:58:09 +02:00
2019-07-23 17:30:37 +01:00
2019-10-01 16:55:29 +02:00
2019-10-01 15:22:29 +02:00
2019-10-08 15:57:27 +02:00
2019-08-08 10:58:09 +02:00
2020-01-31 10:24:21 +01:00
2019-07-31 14:15:27 +02:00
2020-02-03 13:55:11 +00:00
2019-09-05 09:34:34 -04:00
2019-12-03 16:07:18 +00:00
2019-08-15 15:44:50 +01:00
2020-01-28 14:43:52 -05:00
2019-12-03 16:07:18 +00:00
2019-12-03 16:07:18 +00:00
2020-01-29 09:46:49 +01:00
2020-03-19 13:36:33 +01:00
2020-03-23 17:55:32 +01:00
2020-03-23 17:55:32 +01:00
2020-03-19 13:36:33 +01:00
2020-04-09 04:30:34 -04:00
2020-03-23 18:02:07 +01:00
2020-03-19 13:36:33 +01:00
2020-04-09 04:33:00 -04:00
2019-08-15 15:44:50 +01:00
2019-08-15 15:44:50 +01:00
2020-03-23 21:54:07 +01:00
2020-03-19 13:36:33 +01:00
2020-03-19 13:36:33 +01:00
2020-04-15 06:15:45 -04:00
2020-03-19 13:36:33 +01:00
2020-03-19 13:36:33 +01:00
2020-03-19 13:36:33 +01:00
2020-03-19 13:36:33 +01:00
2019-08-15 15:44:50 +01:00