Closed
Bug 1458122
Opened 7 years ago
Closed 6 years ago
Potential double free bug in zonemeta.cpp (ICU4C)
Categories
(Core :: JavaScript: Internationalization API, defect, P3)
Core
JavaScript: Internationalization API
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: pauljt, Assigned: anba)
References
Details
Semmle has detected a potential double free bug in zonemeta.cpp. The mzMappings variable is deleted on line 692, and again on line 706.
From https://searchfox.org/mozilla-central/source/intl/icu/source/i18n/zonemeta.cpp#692
if (mzMappings == NULL) {
mzMappings = new UVector(deleteOlsonToMetaMappingEntry, NULL, status);
if (U_FAILURE(status)) {
delete mzMappings; // mzMappings is deleted here
uprv_free(entry);
break;
}
}
mzMappings->addElement(entry, status);
if (U_FAILURE(status)) {
break;
}
}
ures_close(mz);
if (U_FAILURE(status)) {
if (mzMappings != NULL) {
delete mzMappings; // we might try to delete mzMappings again
I don't know if/how an attacker might induce this case - there doesn't seem to be a lot of attack surface here, but I'm filing this to investigate further. I also note that this is similar but different to bug 1387937, which was another UAF found through a static analysis tool apparently.
Reporter | ||
Updated•7 years ago
|
Blocks: semmle-analysis
Updated•7 years ago
|
Group: core-security-release → javascript-core-security
Component: Internationalization → JavaScript: Internationalization API
Comment 1•7 years ago
|
||
When UVector::UVector gets failed, malloc is failed (due to OOM) in UVector::UVector. We should file a bug to ICU.
Comment 2•7 years ago
|
||
Filed against ICU.
http://bugs.icu-project.org/trac/ticket/13749
I think this isn't sec-anything. Unless the last paragraph of comment 0 is still sensitive, we should open it.
Updated•7 years ago
|
Group: javascript-core-security
Comment 3•7 years ago
|
||
This has been fixed in upstream trunk. The fix will be in the next ICU release (62.1).
Updated•7 years ago
|
Priority: -- → P3
Comment 4•6 years ago
|
||
ICU has been updated to 62.1 by bug 1466471.
Updated•6 years ago
|
Assignee: nobody → andrebargull
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Depends on: 1466471
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
Type: enhancement → defect
You need to log in
before you can comment on or make changes to this bug.
Description
•