Closed
Bug 337110
Opened 19 years ago
Closed 18 years ago
Coverity OOM Crash and memory leak [@ PK11_CreatePBEParams]
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.2
People
(Reporter: timeless, Assigned: alvolkov.bgs)
References
()
Details
(Keywords: coverity, crash, memory-leak)
Crash Data
Attachments
(2 files, 2 obsolete files)
3.09 KB,
patch
|
nelson
:
review+
|
Details | Diff | Splinter Review |
3.78 KB,
patch
|
julien.pierre
:
review+
nelson
:
review+
|
Details | Diff | Splinter Review |
Updated•19 years ago
|
Assignee: nobody → alexei.volkov.bugs
Keywords: coverity
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → 3.11.2
Assignee | ||
Comment 1•19 years ago
|
||
Also fixed mem leak by replacing SECITEM_AllocItem with PORT_ZAlloc and fixed missuse(and therefore mem leak) of PORT_ZFree.
Attachment #222757 -
Flags: review?(nelson)
Comment 2•19 years ago
|
||
Comment on attachment 222757 [details] [diff] [review]
check value of allocated ptrs
r=nelson
Until bug 320336 is fixed, I think this is the only reasonable solution to this problem.
Attachment #222757 -
Flags: review?(nelson) → review+
Assignee | ||
Comment 3•18 years ago
|
||
Since bug 320336 is fixed, please review new patch that uses SECITEM_AllocItem
Attachment #225313 -
Flags: review?(nelson)
Comment 4•18 years ago
|
||
Comment on attachment 225313 [details] [diff] [review]
patch that uses SECITEM_AllocItem
The patch contains:
>+ loser:
>-loser:
Please don't indent the label loser:
Other than that, r=nelsonb
Attachment #225313 -
Flags: review?(nelson) → review+
Assignee | ||
Comment 5•18 years ago
|
||
tip:
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pbe.c,v <-- pk11pbe.c
new revision: 1.13; previous revision: 1.12
3.11 branch:
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pbe.c,v <-- pk11pbe.c
new revision: 1.11.24.2; previous revision: 1.11.24.1
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 7•18 years ago
|
||
This patch caused some bad problems.
Status: VERIFIED → REOPENED
Keywords: mlk
Resolution: FIXED → ---
Summary: OOM Crash [@ PK11_CreatePBEParams] → OOM Crash and memory leak [@ PK11_CreatePBEParams]
Comment 8•18 years ago
|
||
I backed out the above patch, and also Julien's patch for bug 341455,
on the NSS_3_11_BRANCH only.
My apologies for not catching the problems in my previous reviews. :(
I will work on a replacement patch for the one above.
At Julien's request, I'm leaving the trunk broken so that we can test
Tinderbox's ability to detect failures like this.
Comment 9•18 years ago
|
||
I believe this patch fixes the crashes and/or leaks.
This patch also plugs the leak reported in bug 341117.
I have not yet tested this patch, but will do so next.
Attachment #225313 -
Attachment is obsolete: true
Attachment #225525 -
Flags: superreview?(julien.pierre.bugs)
Attachment #225525 -
Flags: review?(alexei.volkov.bugs)
Comment 10•18 years ago
|
||
All.sh passes on my WinXP PC with this patch applied. Please review.
Assignee | ||
Comment 11•18 years ago
|
||
Comment on attachment 225525 [details] [diff] [review]
patch v3
Deallocation of memory blocks that are used for pPassword and pSalt. Pretty bad one.
I'm sorry about this.
Nelson's patch is good and strait forward.
Attachment #225525 -
Flags: review?(alexei.volkov.bugs) → review+
Assignee | ||
Comment 12•18 years ago
|
||
Comment on attachment 225525 [details] [diff] [review]
patch v3
Yet, one more thing was found with the patch.
paramRV->data is allocated with PORT_Alloc. data was not init with zeros.
If pbe_params->pPassword is failed to be allocated, we call pk11_destroy_ck_pbe_params
and since pbe_params->pSalt can have non-zero values, PORT_ZFree will be call to free unallocated memory block.
Attachment #225525 -
Flags: review+ → review-
Updated•18 years ago
|
Attachment #225525 -
Flags: superreview?(julien.pierre.bugs)
Assignee | ||
Comment 13•18 years ago
|
||
Attachment #225525 -
Attachment is obsolete: true
Attachment #225619 -
Flags: superreview?(nelson)
Attachment #225619 -
Flags: review?(julien.pierre.bugs)
Comment 14•18 years ago
|
||
Comment on attachment 225619 [details] [diff] [review]
patch v4
This patch looks good. I think is is actually patch v5 if you count the one I put yesterday in bug 341455 ;)
Attachment #225619 -
Flags: review?(julien.pierre.bugs) → review+
Comment 15•18 years ago
|
||
Comment on attachment 225619 [details] [diff] [review]
patch v4
r=nelson
Attachment #225619 -
Flags: superreview?(nelson) → review+
Reporter | ||
Comment 16•18 years ago
|
||
i didn't file this bug w/ coverity keyword which should mean i found it on my own.
Assignee | ||
Comment 17•18 years ago
|
||
3.11 branch
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pbe.c,v <-- pk11pbe.c
new revision: 1.11.24.5; previous revision: 1.11.24.4
Assignee | ||
Comment 18•18 years ago
|
||
tip:
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pbe.c,v <-- pk11pbe.c
new revision: 1.14; previous revision: 1.13
Comment 19•18 years ago
|
||
Thanks for the checkin, Alexei. The tinderbox on Intel just went green ! The others should go green very soon hopefully. So, I'm closing this bug.
Attachment 225313 [details] [diff], which got checked in on tuesday, had the curious side effect of causing an infinite loop on the Linux platforms. It's not immediately obvious to me why. This latest fix should make it go away. But it might still be worth figuring out why once we have more cycles.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Summary: OOM Crash and memory leak [@ PK11_CreatePBEParams] → Coverity OOM Crash and memory leak [@ PK11_CreatePBEParams]
Updated•13 years ago
|
Crash Signature: [@ PK11_CreatePBEParams]
You need to log in
before you can comment on or make changes to this bug.
Description
•