diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-02-17 19:41:44 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-02-17 19:41:44 +0800 |
commit | dcb41e91eb7ec97d8af0e9ad748345cdd1c1319e (patch) | |
tree | 1d31f2350269dbdccc4927f04eda08c9a8a38edf | |
parent | 7e8094d53a1c01ac671156ff2e67157b64d01a3a (diff) |
limit rsa->e size to 64 bits
--HG--
branch : fuzz
-rw-r--r-- | rsa.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -68,6 +68,12 @@ int buf_get_rsa_pub_key(buffer* buf, dropbear_rsa_key *key) { goto out; } + /* 64 bit is limit used by openssl, so we won't block any keys in the wild */ + if (mp_count_bits(key->e) > 64) { + dropbear_log(LOG_WARNING, "RSA key bad e"); + goto out; + } + TRACE(("leave buf_get_rsa_pub_key: success")) ret = DROPBEAR_SUCCESS; out: |