diff options
author | Matt Caswell <matt@openssl.org> | 2015-04-29 14:22:18 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-05-01 00:12:39 +0200 |
commit | 34166d41892643a36ad2d1f53cc0025e2edc2a39 (patch) | |
tree | 187707b055945ef9d707d0f17b8e808d9474b0ac /crypto/ec/eck_prn.c | |
parent | Add sanity check to print_bin function (diff) | |
download | openssl-34166d41892643a36ad2d1f53cc0025e2edc2a39.tar.xz openssl-34166d41892643a36ad2d1f53cc0025e2edc2a39.zip |
Fix buffer overrun in RSA signing
The problem occurs in EVP_PKEY_sign() when using RSA with X931 padding.
It is only triggered if the RSA key size is smaller than the digest length.
So with SHA512 you can trigger the overflow with anything less than an RSA
512 bit key. I managed to trigger a 62 byte overflow when using a 16 bit RSA
key. This wasn't sufficient to cause a crash, although your mileage may
vary.
In practice RSA keys of this length are never used and X931 padding is very
rare. Even if someone did use an excessively short RSA key, the chances of
them combining that with a longer digest and X931 padding is very
small. For these reasons I do not believe there is a security implication to
this. Thanks to Kevin Wojtysiak (Int3 Solutions) and Paramjot Oberoi (Int3
Solutions) for reporting this issue.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/ec/eck_prn.c')
0 files changed, 0 insertions, 0 deletions