mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-04 04:22:47 +00:00
BUG/MAJOR: ssl: segfault upon an heartbeat request
7b5fd1e
("MEDIUM: connections: Move some fields from struct connection
to ssl_sock_ctx.") introduced a bug in the heartbleed mitigation code.
Indeed the code used conn->ctx instead of conn->xprt_ctx for the ssl
context, resulting in a null dereference.
This commit is contained in:
parent
a6cc7e872a
commit
7e1770b151
@ -1735,7 +1735,7 @@ void ssl_sock_msgcbk(int write_p, int version, int content_type, const void *buf
|
||||
for a received record) */
|
||||
if ((content_type == TLS1_RT_HEARTBEAT) && (write_p == 0)) {
|
||||
struct connection *conn = SSL_get_ex_data(ssl, ssl_app_data_index);
|
||||
struct ssl_sock_ctx *ctx = conn->ctx;
|
||||
struct ssl_sock_ctx *ctx = conn->xprt_ctx;
|
||||
const unsigned char *p = buf;
|
||||
unsigned int payload;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user