mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-29 02:17:27 +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> |
||
|---|---|---|
| .. | ||
| .jenkins | ||
| configs | ||
| git-scripts | ||
| include/test | ||
| opt-testcases | ||
| scripts | ||
| src | ||
| suites | ||
| .gitignore | ||
| CMakeLists.txt | ||
| compat-in-docker.sh | ||
| compat.sh | ||
| context-info.sh | ||
| Descriptions.txt | ||
| make-in-docker.sh | ||
| Makefile | ||
| ssl-opt.sh | ||