[RFR] JDK-8224997: ChaCha20-Poly1305 TLS cipher suite decryption throws ShortBufferException

Jamil Nimeh jamil.j.nimeh at oracle.com
Mon Aug 12 19:58:16 UTC 2019


Hello all,

This fix addresses a problem first found by Netty/Jetty when decrypting 
payloads in excess of ~4096 bytes using one of the ChaCha20-Poly1305 
cipher suites.  The root cause of the issue is not in the TLS code, it 
is actually an issue with how ChaCha20-Poly1305 was implementing 
CipherSpi.engineGetOutputSize().

The bug was also partially worked around due to changes in CipherSpi 
from 8181386, but this properly addresses the output buffer sizing.

Thanks to Adrian Todt and Bradley Wagner for the Catnip and Jetty 
support while trying to replicate the issue originally.

Bug: https://bugs.openjdk.java.net/browse/JDK-8224997

Webrev: http://cr.openjdk.java.net/~jnimeh/reviews/8224997/webrev.01/

--Jamil




More information about the security-dev mailing list