This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's the dirty bastard that broke the internet (above two lines, copying data with no bounds checking). I wonder how many more of these little buggers are lurking around revealing your secrets.
if (r >= 0&&s->msg_callback)
s->msg_callback(1, s->version, TLS1_RT_HEARTBEAT,
buffer, 3+payload+padding,
s, s->msg_callback_arg);
OPENSSL_free(buffer);
if (r<0)
returnr;
}
elseif (hbtype==TLS1_HB_RESPONSE)
{
unsigned intseq;
/* We only send sequence numbers (2 bytes unsigned int),
* and 16 random bytes, so we just try to read the
* sequence number */
n2s(pl, seq);
if (payload==18&&seq==s->tlsext_hb_seq)
{
s->tlsext_hb_seq++;
s->tlsext_hb_pending=0;
}
}
return0;
}
int
tls1_heartbeat(SSL*s)
{
unsigned char*buf, *p;
intret;
unsigned intpayload=18; /* Sequence number + random bytes */
unsigned intpadding=16; /* Use minimum padding */
/* Only send if peer supports and accepts HB requests... */
if (!(s->tlsext_heartbeat&SSL_TLSEXT_HB_ENABLED) ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's the dirty bastard that broke the internet (above two lines, copying data with no bounds checking). I wonder how many more of these little buggers are lurking around revealing your secrets.