summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2025-09-30 15:27:08 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2025-09-30 15:31:43 +0000
commit75d258af9fe98e79ead9c54d7f15b30f970155a7 (patch)
tree2b50dab9a96db2fd612eb8fe55966ed6310a1372
parent978e04ff5bcf0a750cd3ef19561f5e0f67860620 (diff)
Fix multiple security issues in OpenSSL.
Out-of-bounds read & write in RFC 3211 KEK Unwrap (CVE-2025-9230) Out-of-bounds read in HTTP client no_proxy handling (CVE-2025-9232) Obtained from: OpenSSL Approved by: so Security: FreeBSD-SA-25:08.openssl Security: CVE-2025-9230 Security: CVE-2025-9232 (cherry picked from commit 270158508d7c55a0737c2a9915cd4afc8fabdaf0)
-rw-r--r--crypto/openssl/crypto/cms/cms_pwri.c2
-rw-r--r--crypto/openssl/crypto/http/http_lib.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssl/crypto/cms/cms_pwri.c b/crypto/openssl/crypto/cms/cms_pwri.c
index 2373092bed55..6b507c3f0176 100644
--- a/crypto/openssl/crypto/cms/cms_pwri.c
+++ b/crypto/openssl/crypto/cms/cms_pwri.c
@@ -228,7 +228,7 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen,
/* Check byte failure */
goto err;
}
- if (inlen < (size_t)(tmp[0] - 4)) {
+ if (inlen < 4 + (size_t)tmp[0]) {
/* Invalid length value */
goto err;
}
diff --git a/crypto/openssl/crypto/http/http_lib.c b/crypto/openssl/crypto/http/http_lib.c
index 9c41f57541d7..614fd200b7c0 100644
--- a/crypto/openssl/crypto/http/http_lib.c
+++ b/crypto/openssl/crypto/http/http_lib.c
@@ -267,6 +267,7 @@ static int use_proxy(const char *no_proxy, const char *server)
/* strip leading '[' and trailing ']' from escaped IPv6 address */
sl -= 2;
strncpy(host, server + 1, sl);
+ host[sl] = '\0';
server = host;
}