curl/tests/data/test1657
Stefan Eissing 65fca12e63
x509asn1: add parse recursion limit
For ASN.1 tags with indefinite length, curl's own parser for TLS
backends that do not support certificate inspection calls itself
recursively. A malicious server certificate can then lead to high
recursion level exhausting the stack space.

This PR limits the recursion level to 16 which should be safe on all
architectures.

Added unit test 1657 to verify behaviour.

Fixes #16135
Reported-by: z2_
Closes #16137
2025-02-03 20:10:09 +01:00

23 lines
238 B
Plaintext

<testcase>
<info>
<keywords>
unittest
Curl_x509_getASN1Element
</keywords>
</info>
#
# Client-side
<client>
<server>
none
</server>
<features>
unittest
</features>
<name>
Curl_x509_getASN1Element unit tests
</name>
</client>
</testcase>