On 28/02/15 06:53, Erik Forsberg wrote:
> Hi.
> I seem to have run into a really hard to pin down issue in
> OpenSSL 1.0.2. Normally, it simply causes an EFAULT during
> a write syscall, which makes me close the connection, but
> to investigate, I added a core dump at that time. This is what I see
> 


Hi Erik

Thanks for the really useful analysis of this issue.

Please could you try out the attached patch and see if that solves
things for you? Let me know how you get on.

Many thanks

Matt

diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index ec56c55..ad4ee87 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -780,7 +780,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
 
             i = ssl3_write_pending(s, type, &buf[tot], nw);
             if (i <= 0) {
-                if (i < 0) {
+                if (i < 0 && (!s->wbio || !BIO_should_retry(s->wbio))) {
                     OPENSSL_free(wb->buf);
                     wb->buf = NULL;
                 }
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to