mbedtls/tests
Gilles Peskine 42a1acfd0e get_len_step: Fix end-of-buffer calculation when buffer_size==0
Fix get_len_step when buffer_size==0. The intent of this test is to
ensure (via static or runtime buffer overflow analysis) that
mbedtls_asn1_get_len does not attempt to access beyond the end of the
buffer. When buffer_size is 0 (reached from get_len when parsing a
1-byte buffer), the buffer is buf[1..1] because allocating a 0-byte
buffer might yield a null pointer rather than a valid pointer. In this
case the end of the buffer is p==buf+1, not buf+buffer_size which is
buf+0.

The test passed because calling mbedtls_asn1_get_len(&p,end,...) with
end < p happens to work, but this is not guaranteed.
2020-01-21 16:12:07 +01:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
configs Add a test component with malloc(0) returning NULL 2019-09-24 18:28:26 +02:00
data_files pk_write test cases with short/long private key 2019-11-05 15:32:53 +01:00
docker/bionic Improve compatibility with firewalled networks 2019-06-29 17:45:34 -05:00
git-scripts Merge development commit 8e76332 into development-psa 2019-01-31 08:20:20 -05:00
scripts Merge pull request #334 from dgreen-arm/fix-pylint-warnings 2019-12-20 16:06:53 +00:00
suites get_len_step: Fix end-of-buffer calculation when buffer_size==0 2020-01-21 16:12:07 +01:00
.gitignore PSA return status coverage script 2019-09-06 19:28:47 +02:00
CMakeLists.txt cmake: update interpreter requirement for the test suite generator 2019-11-13 14:33:34 +00:00
Descriptions.txt Remove tests that depend on TLS or X.509 2019-03-11 16:49:26 +00:00
make-in-docker.sh Clean up file prologue comments 2019-06-29 17:45:34 -05:00
Makefile Makefiles: move the dependencies block to be after DLEXT definition 2019-10-07 09:24:22 -04:00
psa_crypto_helpers.h PSA return status coverage script 2019-09-06 19:28:47 +02:00
psa_helpers.h Move the one non-crypto-specific PSA helper macro to a new header 2019-06-20 12:54:43 +02:00