Closed
Bug 338356
Opened 19 years ago
Closed 19 years ago
Coverity Leak in PK11_TokenKeyGenWithFlags (security/nss/lib/pk11wrap/pk11skey.c)
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.2
People
(Reporter: kherron+mozilla, Assigned: nelson)
References
()
Details
(Keywords: coverity, Whiteboard: CID 318)
Attachments
(1 file, 1 obsolete file)
2.01 KB,
patch
|
rrelyea
:
review+
alvolkov.bgs
:
review+
|
Details | Diff | Splinter Review |
This is coverity CID 318. Please see the sample URL.
|pk11_CreateSymKey| normally returns a pointer to allocated memory (via PORT_New). Here, the calls at lines 943 and 947 are leaked if the test at 956 succeeds.
Assignee | ||
Comment 1•19 years ago
|
||
correction to comment 0:
the SYMKEYS allocated at lines 943 and 947 are leaked if the test at 956
succeeds.
Assignee: nobody → rrelyea
Severity: minor → normal
Priority: -- → P2
Target Milestone: --- → 3.11.2
Version: unspecified → 3.10
Assignee | ||
Comment 2•19 years ago
|
||
This is one of two alternative patches for this bug.
Bob, please pick one.
Assignee | ||
Comment 3•19 years ago
|
||
This is the second of the proposed alternatives.
Attachment #224830 -
Flags: review?(rrelyea)
Assignee | ||
Comment 4•19 years ago
|
||
The second alternative is intended to avoid unnecessarily allocating and
freeing a symkey object before we're sure we've got the right conditions
to use it once created.
Bob, please vote ith your review. :)
Assignee | ||
Comment 5•19 years ago
|
||
Comment on attachment 224829 [details] [diff] [review]
patch - alternative 1 of 2
I'm withdrawing the review request for this patch,
because I only want to check in the other one.
Attachment #224829 -
Attachment is obsolete: true
Attachment #224829 -
Flags: review?(rrelyea)
Assignee | ||
Updated•19 years ago
|
Attachment #224830 -
Flags: review?(alexei.volkov.bugs)
Comment 6•19 years ago
|
||
Comment on attachment 224830 [details] [diff] [review]
Patch - Alternative 2
I think it will work.
r=alexei.volkov
Attachment #224830 -
Flags: review?(alexei.volkov.bugs) → review+
Assignee | ||
Comment 7•19 years ago
|
||
Fix leak and OOM crash. Bug 338352 and 338356. Coverity.
r=rrelyea, alexei.volkov
Checking in pk11skey.c; new revision: 1.109; previous revision: 1.108
Checking in pk11skey.c; new revision: 1.108.2.1; previous revision: 1.108
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 9•19 years ago
|
||
Comment on attachment 224830 [details] [diff] [review]
Patch - Alternative 2
r=rrelyea
Moving the test is safe and the right thing to do.
bob
Attachment #224830 -
Flags: review?(rrelyea) → review+
Updated•19 years ago
|
Summary: Leak in PK11_TokenKeyGenWithFlags (security/nss/lib/pk11wrap/pk11skey.c) → Coverity Leak in PK11_TokenKeyGenWithFlags (security/nss/lib/pk11wrap/pk11skey.c)
You need to log in
before you can comment on or make changes to this bug.
Description
•