Closed Bug 1615298 Opened 5 years ago Closed 1 year ago

Uninitialized memory issue in AddNscpCertType in certutil

Categories

(NSS :: Tools, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: jschanck)

Details

(Keywords: reporter-external)

Attachments

(1 file)

Splitting this from bug bug 1614250:

(In reply to mlfbrown from bug 1614250 comment #0)

In AddNscpCertType, value appears to used without being defined.
I can't determine any invariants that should make this safe, but apologies if
I have missed some.

Function here
https://searchfox.org/mozilla-central/source/security/nss/cmd/certutil/certext.c#662

int value;                                                                                     
if (parseNextCmdInput(nsCertTypeKeyWordArray, &value, &nextPos, &isCriticalExt) == SECFailure) 
  return SECFailure

--> within parseNextCmdInput
--> (https://searchfox.org/mozilla-central/source/security/nss/cmd/certutil/certext.c#272)
--> if (!strncmp("critical", thisPos, keyLen))
--> ... if (*nextPos == NULL)
--> return SECSuccess without setting value

keyUsage |= (0x80 >> value);
(https://searchfox.org/mozilla-central/source/security/nss/cmd/certutil/certext.c#706)

Keywords: sec-other

certutil is not covered by the bug bounty program

Flags: sec-bounty-
Severity: normal → S2
Priority: -- → P3

There's no attacker controlled input here, so it's a stretch to call it a security bug.

Assignee: nobody → jschanck
Group: crypto-core-security
Severity: S2 → S4
Status: NEW → ASSIGNED
Keywords: sec-other
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: