int remote_bugs;
const struct ssh_cipher *cipher;
void *v1_cipher_ctx;
+ void *crcda_ctx;
const struct ssh2_cipher *cscipher, *sccipher;
void *cs_cipher_ctx, *sc_cipher_ctx;
const struct ssh_mac *csmac, *scmac;
st->to_read -= st->chunk;
}
- if (ssh->cipher && detect_attack(ssh->pktin.data, st->biglen, NULL)) {
+ if (ssh->cipher && detect_attack(ssh->crcda_ctx, ssh->pktin.data,
+ st->biglen, NULL)) {
bombout(("Network attack (CRC compensation) detected!"));
crReturn(0);
}
logevent(buf);
}
+ ssh->crcda_ctx = crcda_make_context();
+ logevent("Installing CRC compensation attack detector");
+
crWaitUntil(ispkt);
if (ssh->pktin.type != SSH1_SMSG_SUCCESS) {
ssh->s = NULL;
ssh->cipher = NULL;
ssh->v1_cipher_ctx = NULL;
+ ssh->crcda_ctx = NULL;
ssh->cscipher = NULL;
ssh->cs_cipher_ctx = NULL;
ssh->sccipher = NULL;