Closed
Bug 337326
Opened 19 years ago
Closed 19 years ago
Coverity Leak in nsslowcert_UpdateSubjectEmailAddr (security/nss/lib/softoken/pcertdb.c)
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.2
People
(Reporter: kherron+mozilla, Assigned: alvolkov.bgs)
References
()
Details
(Keywords: coverity, Whiteboard: [CID 581] FIPS)
Attachments
(1 file, 1 obsolete file)
2.35 KB,
patch
|
nelson
:
review+
|
Details | Diff | Splinter Review |
Please refer to the sample URL. At line 2699, |nsslowcert_FixupEmailAddr| allocates a copy of |emailAddr| and returns a pointer to it, which is stored in |emailAddr|. At lines 2723 and 2733, the function can return without freeing this copy.
Reporter | ||
Updated•19 years ago
|
Whiteboard: [good first bug]
Updated•19 years ago
|
Target Milestone: --- → 3.11.2
Updated•19 years ago
|
Priority: -- → P2
Assignee | ||
Updated•19 years ago
|
Assignee: nobody → alexei.volkov.bugs
Whiteboard: [good first bug] → [good first bug] PKIX
Assignee | ||
Updated•19 years ago
|
Whiteboard: [good first bug] PKIX → [good first bug] FIPS
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #222285 -
Flags: review?(nelson)
Comment 2•19 years ago
|
||
Comment on attachment 222285 [details] [diff] [review]
Fix for the problem
There's one problem with this patch.
In the original code, the interpretation of "index" was different depending
on the "updateType". If updateType was nsslowcert_remove, then index == -1
meant a shortcut to success (don't have to do anything to remove the entry
if it's not actually there). But if updateType was any other value besides
nsslowcert_remove, then the shortcut to success is index != 1, the opposite
of the other test.
This patch substitutes (index == -1) as the shortcut for all updateTypes,
which I believe causes all updateTypes except nsslowcert_remove to fail.
So, r- for that. Otherwise, this patch was OK.
Attachment #222285 -
Flags: review?(nelson) → review-
Assignee | ||
Comment 3•19 years ago
|
||
missread the code.
Attachment #222285 -
Attachment is obsolete: true
Attachment #222386 -
Flags: review?(nelson)
Comment 4•19 years ago
|
||
Comment on attachment 222386 [details] [diff] [review]
prev patch, but with restored "if"s
r=nelson
Attachment #222386 -
Flags: review?(nelson) → review+
Assignee | ||
Comment 5•19 years ago
|
||
trunk:
/cvsroot/mozilla/security/nss/lib/softoken/pcertdb.c,v <-- pcertdb.c
new revision: 1.63; previous revision: 1.62
3.11 branch:
/cvsroot/mozilla/security/nss/lib/softoken/pcertdb.c,v <-- pcertdb.c
new revision: 1.53.2.10; previous revision: 1.53.2.9
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Summary: Leak in nsslowcert_UpdateSubjectEmailAddr (security/nss/lib/softoken/pcertdb.c) → Coverity Leak in nsslowcert_UpdateSubjectEmailAddr (security/nss/lib/softoken/pcertdb.c)
You need to log in
before you can comment on or make changes to this bug.
Description
•