[openssl.org #3289] base64 BIO decoding bug - patch supplied + examples

2014-06-01 Thread Stephen Henson via RT
Fixed now, resolving ticket.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #3289] base64 BIO decoding bug - patch supplied + examples

2014-05-06 Thread Tim Hudson via RT
Re-opening item.

See https://rt.openssl.org/Ticket/Display.html?id=3345

This patch introduced an uninitialised read.

A num=0 initialisation is required prior to the for loop.

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #3289] base64 BIO decoding bug - patch supplied + examples

2014-04-29 Thread Tim Hudson via RT
On Wed Apr 02 19:22:14 2014, e...@pobox.com wrote:
 Fixing one of my own bugs, there since SSLeay days I belive :-)

Closing item as resolved.

SteveH committed the fix across all branches ...

https://github.com/openssl/openssl/commit/10378fb5f4c67270b800e8f7c600cd0548874811
https://github.com/openssl/openssl/commit/bfc3424d1fbaf684c812c03e3c6cb8d38d2d6f1d
etc


Thanks,

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #3289] base64 BIO decoding bug - patch supplied + examples

2014-04-02 Thread Eric Young via RT
Fixing one of my own bugs, there since SSLeay days I belive :-)

If a short PEM encoded sequence is passed to the BIO, and the file
has 2 \n following, it will fail.
openssl asn1parse -in f2.bad
where f2.bad = EOF
-BEGIN PARAMETERS-
MA0GByqGSM49AQECAgD/
-END PARAMETERS-

EOF

The patch is

diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c
index 72a2a67..ac6d441 100644
--- a/crypto/evp/bio_b64.c
+++ b/crypto/evp/bio_b64.c
@@ -264,7 +264,7 @@ static int b64_read(BIO *b, char *out, int outl)
}
 
/* we fell off the end without starting */
-   if (j == i)
+   if ((j == i)  (num == 0))
{
/* Is this is one long chunk?, if so, keep on
 * reading until a new line. */

Attached is a tar of working/failing cases




bio_b64-bug.tar.gz
Description: application/compressed-tar