Skip to content

Commit c72f406

Browse files
authored
Fix #2502
This commit fixes #2502 in the 3.2 branch by checking that the key_share extension is at least 4 bytes long (8 in ASCII-HEX). These 4 bytes encode the group value (2 bytes) and the length of the key (2 bytes).
1 parent c2a3224 commit c72f406

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14455,7 +14455,7 @@ parse_tls_serverhello() {
1445514455
tls_extensions+=" (id=51), len=$extension_len\n"
1445614456
fi
1445714457
if [[ "$process_full" =~ all ]] || [[ "$process_full" == ephemeralkey ]]; then
14458-
if [[ $extension_len -lt 4 ]]; then
14458+
if [[ $extension_len -lt 8 ]]; then
1445914459
debugme tmln_warning "Malformed key share extension."
1446014460
[[ $DEBUG -ge 1 ]] && tmpfile_handle ${FUNCNAME[0]}.txt
1446114461
return 1

0 commit comments

Comments
 (0)