From 43c7f4a7f16134807da0614913d96042fbd357f4 Mon Sep 17 00:00:00 2001 From: delphij Date: Tue, 13 May 2014 23:17:24 +0000 Subject: Fix OpenSSL NULL pointer deference vulnerability. Obtained from: OpenBSD Security: FreeBSD-SA-14:09.openssl Security: CVE-2014-0198 --- crypto/openssl/ssl/s3_pkt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crypto') diff --git a/crypto/openssl/ssl/s3_pkt.c b/crypto/openssl/ssl/s3_pkt.c index 8deeab3..1b1613e 100644 --- a/crypto/openssl/ssl/s3_pkt.c +++ b/crypto/openssl/ssl/s3_pkt.c @@ -657,6 +657,10 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, if (i <= 0) return(i); /* if it went, fall through and send more stuff */ + /* we may have released our buffer, so get it again */ + if (wb->buf == NULL) + if (!ssl3_setup_write_buffer(s)) + return -1; } if (len == 0 && !create_empty_fragment) -- cgit v1.1