]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix off-by-one error in BN_bn2hex
authorMatt Caswell <matt@openssl.org>
Tue, 19 May 2015 12:59:47 +0000 (13:59 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 4 Jun 2015 08:33:01 +0000 (09:33 +0100)
commit9759ff0cd908270fad328ba7f35fed021e619868
treea3f44aa3a1cc268a15bc47d00191d932499959ab
parentf9603f2673154bfba52d24654bc6e5f5dd19a88a
Fix off-by-one error in BN_bn2hex

A BIGNUM can have the value of -0. The function BN_bn2hex fails to account
for this and can allocate a buffer one byte too short in the event of -0
being used, leading to a one byte buffer overrun. All usage within the
OpenSSL library is considered safe. Any security risk is considered
negligible.

With thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and
Filip Palian for discovering and reporting this issue.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit c56353071d9849220714d8a556806703771b9269)

Conflicts:
crypto/bn/bn_print.c
crypto/bn/bn_print.c