Closed Bug 1835425 Opened 3 years ago Closed 3 years ago

RSA overflow check fails with really small modulus

Categories

(NSS :: Libraries, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: iaroslav.gridin, Unassigned)

References

Details

(Keywords: reporter-external, sec-audit)

Attachments

(1 file)

Steps to reproduce:

call RSA_Sign with modulus size less than (3 + RSA_BLOCK_MIN_PAD_LEN)

Actual results:

heap overflow and memory overwrite. Security threat is not significant I think since that modulus is not normal.

Expected results:

check in rsa_FormatBlock worked and returned SECFailure

Blocks: 1750697

In its current state, signed modulusLen overflows when it is less than
RSA_BLOCK_MIN_PAD_LEN + 3, the check fails and this leads to an
overflow in rsa_FormatOneBlock().

I'm flagging this as security sensitive until we have a chance to review it in detail.

Group: crypto-core-security

John and Anne said this shouldn't affect Firefox because we impose a minimum key length for RSA keys

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: sec-audit

I am still leaving the security sensitive as installed for now.

Group: crypto-core-security
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Sorry for the burst of bugspam: filter on tinkling-glitter-filtrate
Adding reporter-external keyword to security bugs found by non-employees for accounting reasons

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: