Report
CVE-2022-3602: OpenSSL 3.0 stack buffer overflow in ossl_punycode_decode (off-by-one bounds check)
0c65debc-0a09-4085-b94d-2484a3b92150
OpenSSL 3.0.0–3.0.6 has a 4-byte stack buffer overflow in ossl_punycode_decode (crypto/punycode.c). When processing punycode-encoded email address name constraints in an X.509 certificate, the punycode decoder uses an off-by-one bounds check: if (written_out > max_out) instead of >= max_out. This allows writing exactly one unsigned int (4 bytes) past the end of the stack-allocated buf[512] array in ossl_a2ulabel. The overflow can overwrite adjacent stack data and may be exploitable for remote code execution.