Skip to content

Commit acdbdcf

Browse files
authored
Fix #2502 in 3.0 branch
This commit fixes drwetter#2502 in the 3.0 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 212bdbb commit acdbdcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12367,7 +12367,7 @@ parse_tls_serverhello() {
1236712367
tls_extensions+=" (id=51), len=$extension_len\n"
1236812368
fi
1236912369
if [[ "$process_full" =~ all ]] || [[ "$process_full" == ephemeralkey ]]; then
12370-
if [[ $extension_len -lt 4 ]]; then
12370+
if [[ $extension_len -lt 8 ]]; then
1237112371
debugme tmln_warning "Malformed key share extension."
1237212372
[[ $DEBUG -ge 1 ]] && tmpfile_handle ${FUNCNAME[0]}.txt
1237312373
return 1

0 commit comments

Comments
 (0)