Paul Bakker 956c9e063d Reduced the input / output overhead with 200+ bytes and covered corner
case

The actual input / output buffer overhead is only 301 instead of 512.
This requires a proper check on the padding_idx to prevent out of bounds
reads.

Previously a remote party could potentially trigger an access error and
thus stop the application when sending a malicious packet having
MAX_CONTENT_LEN of data, 32 bytes of MAC and a decrypted padlen of .
This would result in reading from in_ctr + 13 + 32 + MAX_CONTENT_LEN - 1 - 1
for 256 bytes (including fake padding check). Or 13 + 32 bytes over the
buffer length.

We now reset padding_idx to 0, if it's clear that it will never be a
valid padding (padlen > msg_len || msg_len + padlen + 256 > buffer_len)
2013-12-30 15:00:51 +01:00
..
2013-12-30 13:53:58 +01:00
2013-12-30 13:54:23 +01:00
2013-12-05 15:58:38 +01:00
2013-10-11 09:38:49 +02:00
2013-09-29 15:02:07 +02:00
2013-11-21 17:31:06 +01:00
2013-12-30 13:54:23 +01:00
2013-12-17 17:38:55 +01:00
2013-11-25 13:29:43 +01:00
2013-09-20 10:58:59 +02:00
2013-09-28 15:24:59 +02:00
2010-07-18 20:36:00 +00:00
2013-10-28 21:19:10 +01:00
2013-10-28 21:19:10 +01:00