mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
nts: don't allow malformed encrypted extension fields
Require data decrypted from the NTS authenticator field to contain correctly formatted extension fields (known or unknown).
This commit is contained in:
@@ -352,8 +352,10 @@ extract_cookies(NNC_Instance inst, unsigned char *plaintext, int length)
|
||||
|
||||
for (parsed = 0; parsed < length; parsed += ef_length) {
|
||||
if (!NEF_ParseSingleField(plaintext, length, parsed,
|
||||
&ef_length, &ef_type, &ef_body, &ef_body_length))
|
||||
break;
|
||||
&ef_length, &ef_type, &ef_body, &ef_body_length)) {
|
||||
DEBUG_LOG("Could not parse encrypted EF");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ef_type != NTP_EF_NTS_COOKIE)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user