You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/01/01 03:59:33 UTC
[Bug 61948] BufferUnderflowException and IllegalArgumentException in
TLSClientHelloExtractor
https://bz.apache.org/bugzilla/show_bug.cgi?id=61948
--- Comment #1 from Evgenij Ryazanov <ka...@gmail.com> ---
The following simple code causes BufferUnderflowException in
TLSClientHelloExtractor.isClientHello() and IllegalArgumentException in
TLSClientHelloExtractor.skipBytes().
import java.io.OutputStream;
import java.net.Socket;
import javax.net.SocketFactory;
byte[][] data = {
{ /* TLS handshake */ 22, /* TLS 1.0 */ 3, 1, /* Length 0 */ 0, 0 },
{ /* TLS handshake */ 22, /* TLS 1.0 */ 3, 1, /* Length 4 */ 0, 4, /* Type 1 */
1, /* Size 0 */ 0, 0, 0 },
};
for (byte[] a : data)
try (Socket s = SocketFactory.getDefault().createSocket("hostname", 443);
OutputStream out = s.getOutputStream()) {
out.write(a);
}
There are many ways to get exceptions with larger ill-formed packets.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org