Use constant-time memcmp when comparing sensitive buffers
This helps to avoid timing attacks. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:

committed by
Jeffrey Altman

parent
20f038f4f0
commit
b19633f9b9
@@ -230,7 +230,7 @@ v2_verify_message(gss_buffer_t in,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (memcmp(checksum, out, 16) != 0)
|
||||
if (ct_memcmp(checksum, out, 16) != 0)
|
||||
return GSS_S_BAD_MIC;
|
||||
|
||||
return GSS_S_COMPLETE;
|
||||
|
Reference in New Issue
Block a user