mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-28 18:07:34 +08:00
mbedtls_ssl_cookie_write() only reserves COOKIE_HMAC_LEN bytes for the MAC after the timestamp, but passed COOKIE_MD_OUTLEN as the output size to psa_mac_sign_finish(). PSA fills the unused part of the declared output buffer, so up to 4 bytes (20 with SHA-384) past the end of the caller's buffer were overwritten when it had less than that to spare. Pass the size that was actually reserved and add a regression test. Signed-off-by: Naveed <naveed@bugqore.com> |
||
|---|---|---|
| .. | ||
| 00README.md | ||
| cert-write-der-windows.txt | ||
| cmake-config.txt | ||
| numeric-oid-overflow.txt | ||
| serialized-data-load-hardening.txt | ||
| ssl-context-load-alpn-bounds.txt | ||
| ssl-cookie-write-bounds.txt | ||