mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Add the CRC32 compensation attack detector that all other SSH
clients have had for ages and I forgot about. Of course I've got the version with the buffer overflow fixed! [originally from svn r1535]
This commit is contained in:
5
ssh.c
5
ssh.c
@ -724,6 +724,11 @@ static int ssh1_rdpkt(unsigned char **data, int *datalen)
|
||||
st->to_read -= st->chunk;
|
||||
}
|
||||
|
||||
if (cipher && detect_attack(pktin.data, st->biglen, NULL)) {
|
||||
bombout(("Network attack (CRC compensation) detected!"));
|
||||
crReturn(0);
|
||||
}
|
||||
|
||||
if (cipher)
|
||||
cipher->decrypt(pktin.data, st->biglen);
|
||||
|
||||
|
Reference in New Issue
Block a user