Skip to content

Commit 43e6a58

Browse files
committed
Merge DSA reallocation timing fix CVE-2018-0734.
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from #7513)
1 parent 896e8c5 commit 43e6a58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crypto/dsa/dsa_ossl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
279279
goto err;
280280

281281
/* Preallocate space */
282-
q_bits = BN_num_bits(dsa->q);
282+
q_bits = BN_num_bits(dsa->q) + sizeof(dsa->q->d[0]) * 16;
283283
if (!BN_set_bit(&k, q_bits)
284284
|| !BN_set_bit(&l, q_bits)
285285
|| !BN_set_bit(&m, q_bits))

0 commit comments

Comments
 (0)