diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-12-01 11:40:48 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-12-01 11:40:48 +0100 |
commit | 99d11a3ed2eb13e2f3ba13280d416369c45a30a6 (patch) | |
tree | 8634f2188f304a1eca040e653035530e778df2fb /packet.c | |
parent | - (dtucker) [contrib/cygwin/{Makefile,ssh-host-config}] Add new doc files (diff) | |
download | openssh-99d11a3ed2eb13e2f3ba13280d416369c45a30a6.tar.xz openssh-99d11a3ed2eb13e2f3ba13280d416369c45a30a6.zip |
- markus@cvs.openbsd.org 2008/11/21 15:47:38
[packet.c]
packet_disconnect() on padding error, too. should reduce the success
probability for the CPNI-957037 Plaintext Recovery Attack to 2^-18
ok djm@
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.157 2008/07/10 18:08:11 markus Exp $ */ +/* $OpenBSD: packet.c,v 1.158 2008/11/21 15:47:38 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1152,7 +1152,8 @@ packet_read_poll2(u_int32_t *seqnr_p) #ifdef PACKET_DEBUG buffer_dump(&incoming_packet); #endif - packet_disconnect("Bad packet length %u.", packet_length); + packet_disconnect("Bad packet length %-10u", + packet_length); } DBG(debug("input: packet len %u", packet_length+4)); buffer_consume(&input, block_size); @@ -1161,9 +1162,11 @@ packet_read_poll2(u_int32_t *seqnr_p) need = 4 + packet_length - block_size; DBG(debug("partial packet %d, need %d, maclen %d", block_size, need, maclen)); - if (need % block_size != 0) - fatal("padding error: need %d block %d mod %d", + if (need % block_size != 0) { + logit("padding error: need %d block %d mod %d", need, block_size, need % block_size); + packet_disconnect("Bad packet length %-10u", packet_length); + } /* * check if the entire packet has been received and * decrypt into incoming_packet |