summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-09-17 06:08:53 +1000
committerDamien Miller <djm@mindrot.org>2006-09-17 06:08:53 +1000
commit3c9c1fbd2184289482710dac4845233f362b917b (patch)
tree0b036f4c90a99e5abf268e1e74894e0cdf020f7d /packet.c
parent223897a01af2f496577cbf8f7fa5c5209109ef8e (diff)
- djm@cvs.openbsd.org 2006/09/16 19:53:37
[deattack.c deattack.h packet.c] limit maximum work performed by the CRC compensation attack detector, problem reported by Tavis Ormandy, Google Security Team; ok markus@ deraadt@
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/packet.c b/packet.c
index a4cb3324e..da843b2c2 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.143 2006/08/05 08:34:04 dtucker Exp $ */ 1/* $OpenBSD: packet.c,v 1.144 2006/09/16 19:53:37 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1000,9 +1000,16 @@ packet_read_poll1(void)
1000 * (C)1998 CORE-SDI, Buenos Aires Argentina 1000 * (C)1998 CORE-SDI, Buenos Aires Argentina
1001 * Ariel Futoransky(futo@core-sdi.com) 1001 * Ariel Futoransky(futo@core-sdi.com)
1002 */ 1002 */
1003 if (!receive_context.plaintext && 1003 if (!receive_context.plaintext) {
1004 detect_attack(buffer_ptr(&input), padded_len) == DEATTACK_DETECTED) 1004 switch (detect_attack(buffer_ptr(&input), padded_len)) {
1005 packet_disconnect("crc32 compensation attack: network attack detected"); 1005 case DEATTACK_DETECTED:
1006 packet_disconnect("crc32 compensation attack: "
1007 "network attack detected");
1008 case DEATTACK_DOS_DETECTED:
1009 packet_disconnect("deattack denial of "
1010 "service detected");
1011 }
1012 }
1006 1013
1007 /* Decrypt data to incoming_packet. */ 1014 /* Decrypt data to incoming_packet. */
1008 buffer_clear(&incoming_packet); 1015 buffer_clear(&incoming_packet);