diff options
author | tb <> | 2025-09-30 12:51:16 +0000 |
---|---|---|
committer | tb <> | 2025-09-30 12:51:16 +0000 |
commit | 0da76a9548849eb542ab090dc5eace7a2be789cb (patch) | |
tree | 1d41466d1fcf1adeb354b305a54426664ae4f5be | |
parent | 4867be3b7736b15337f62460c0a92c9f3f6f5005 (diff) | |
download | openbsd-master.tar.gz openbsd-master.tar.bz2 openbsd-master.zip |
An incorrect length check can result in a 4-byte overwrite and an
8-byte overread.
From Stanislav Fort and Viktor Dukhovni via OpenSSL.
CVE-2025-9230.
ok jsing
-rw-r--r-- | src/lib/libcrypto/cms/cms_pwri.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c index 99def8a215..f64f4ab68c 100644 --- a/src/lib/libcrypto/cms/cms_pwri.c +++ b/src/lib/libcrypto/cms/cms_pwri.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_pwri.c,v 1.34 2025/09/30 12:49:34 tb Exp $ */ | 1 | /* $OpenBSD: cms_pwri.c,v 1.35 2025/09/30 12:51:16 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
4 | * project. | 4 | * project. |
@@ -267,7 +267,7 @@ kek_unwrap_key(unsigned char *out, size_t *outlen, const unsigned char *in, | |||
267 | /* Check byte failure */ | 267 | /* Check byte failure */ |
268 | goto err; | 268 | goto err; |
269 | } | 269 | } |
270 | if (inlen < (size_t)(tmp[0] - 4)) { | 270 | if (inlen < 4 + (size_t)tmp[0]) { |
271 | /* Invalid length value */ | 271 | /* Invalid length value */ |
272 | goto err; | 272 | goto err; |
273 | } | 273 | } |