Bug 772628
Summary: | nss_Init() leaks memory | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Kamil Dudka <kdudka> | ||||||
Component: | nss | Assignee: | Elio Maldonado Batiz <emaldona> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Aleš Mareček <amarecek> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 6.2 | CC: | amarecek, ebenes, hkario, jrieden, rrelyea | ||||||
Target Milestone: | rc | Keywords: | Patch | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | nss-3.13.3-4.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
No documentation needed
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 812423 975755 (view as bug list) | Environment: | |||||||
Last Closed: | 2012-06-20 07:23:43 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 738456, 812423 | ||||||||
Attachments: |
|
Description
Kamil Dudka
2012-01-09 13:27:09 UTC
Created attachment 551566 [details]
a proposed fix
Thank you for the patch but is not needed since the update to nss 3.13.1. In the current code in nssinit.c we have loser: if (initContextPtr && *initContextPtr) { PORT_Free(*initContextPtr); *initContextPtr = NULL; if (configStrings) { PR_smprintf_free(configStrings); } } and with initContextPtr NULL configStrings = pk11_config_strings whose allocation/deallocation is handled by PK11_ConfigurePKCS11 and PK11_UnconfigurePKCS11. (In reply to comment #3) > Thank you for the patch but is not needed since the update to nss 3.13.1. I disagree. > In the current code in nssinit.c we have > loser: > if (initContextPtr && *initContextPtr) { > PORT_Free(*initContextPtr); > *initContextPtr = NULL; > if (configStrings) { > PR_smprintf_free(configStrings); > } > } This code is not new to 3.13.1 and does not solve the issue I reported. > and with initContextPtr NULL configStrings = pk11_config_strings whose > allocation/deallocation is handled by PK11_ConfigurePKCS11 and > PK11_UnconfigurePKCS11. Right, then we need to handle this case separately to avoid a double free. Created attachment 566601 [details]
a proposed fix V2
Avoid a double free.
Is this NSS bug required for fixing bug 738456? (In reply to comment #6) > Is this NSS bug required for fixing bug 738456? Without this patch applied, nss will start to leak on initialization as soon as bug 738456 is fixed. From my point of view, such amount of memory leakage is acceptable, but I am not the one here to make decisions. upstream bug? Elio, could you please apply my fix on Fedora? This bug breaks curl's test-suite badly: http://koji.fedoraproject.org/koji/getfile?taskID=3987501&name=build.log (In reply to comment #13) Kamil, I applied your fix to Fedora Rawhide and submitted it upstream. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No documentation needed Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0973.html |