projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
145f12d
)
ssl: fix coverity 1451515: out of bounds memory access
author
Pauli
<ppzgs1@gmail.com>
Wed, 17 Mar 2021 02:00:42 +0000
(12:00 +1000)
committer
Pauli
<ppzgs1@gmail.com>
Thu, 18 Mar 2021 11:19:15 +0000
(21:19 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14585)
ssl/statem/statem_clnt.c
patch
|
blob
|
history
diff --git
a/ssl/statem/statem_clnt.c
b/ssl/statem/statem_clnt.c
index e7917be4fbb1e436e78efb6ee1cbb1f332c67ae9..666ee43363c4867030ddb22ba5e5bf4cc7424f52 100644
(file)
--- a/
ssl/statem/statem_clnt.c
+++ b/
ssl/statem/statem_clnt.c
@@
-2767,6
+2767,7
@@
static int tls_construct_cke_psk_preamble(SSL *s, WPACKET *pkt)
if (psklen > PSK_MAX_PSK_LEN) {
SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
+ psklen = PSK_MAX_PSK_LEN; /* Avoid overrunning the array on cleanse */
goto err;
} else if (psklen == 0) {
SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_PSK_IDENTITY_NOT_FOUND);