Closed
Bug 1132468
(CVE-2015-0811)
Opened 10 years ago
Closed 10 years ago
[qcms] heap info leak
Categories
(Core :: Graphics: Color Management, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: groebert, Assigned: BenWa)
References
Details
(Keywords: sec-moderate, Whiteboard: [adv-main37+])
Attachments
(3 files, 1 obsolete file)
211.06 KB,
application/octet-stream
|
Details | |
546.35 KB,
application/octet-stream
|
Details | |
4.68 KB,
patch
|
jrmuizel
:
review+
lizzard
:
approval-mozilla-aurora+
lizzard
:
approval-mozilla-beta+
lizzard
:
approval-mozilla-release-
lizzard
:
approval-mozilla-esr31-
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
Steps to reproduce:
Load sample 98c8e33029be249da9724c3836486677 or 11dcaacb804945e4574317fc56ebc5d3 in a transformation.
Actual results:
heap-buffer-overflow READ of size 4
lut_interp_linear_float third_party/qcms/src/transform_util.c:101:17
or
Program received signal SIGSEGV, Segmentation fault.
lut_interp_linear_float (value=1.35335546e+18, table=0x7ffff6a02050, length=0)
at third_party/qcms/src/transform_util.c:101
101 value = table[upper]*(1. - (upper - value)) + table[lower]*(upper - value);
float lut_interp_linear_float(float value, float *table, size_t length)
{
int upper, lower;
value = value * (length - 1);
// If length is 0, value will have been adjusted to an arbitrary large float.
upper = ceil(value);
lower = floor(value);
value = table[upper]*(1. - (upper - value)) + table[lower]*(upper - value);
// Here the ASAN alert or SIGSEGV occurs.
return value;
}
Potentially this can be used for disclosing memory contents.
Updated•10 years ago
|
Component: Untriaged → GFX: Color Management
Product: Firefox → Core
Updated•10 years ago
|
Assignee: nobody → bgirard
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8566813 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 3•10 years ago
|
||
These sizes don't make any sense so I don't think they is any value in trying to support these profiles. Rejecting these at read time means that we avoid a lot of foot guns later.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 5•10 years ago
|
||
Comment on attachment 8566813 [details] [diff] [review]
patch - disallow 0 length in read_tag_lutmA
Review of attachment 8566813 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/qcms/iccread.c
@@ +585,5 @@
> for (i = 0; i < num_in_channels; i++) {
> clut_size *= read_u8(src, clut_offset + i);
> + if (clut_size == 0) {
> + invalid_source(src, "bad clut_size");
> + return NULL;
Do you need to return here or can you just let things fall through?
@@ +609,5 @@
> for (i = 0; i < num_in_channels; i++) {
> lut->num_grid_points[i] = read_u8(src, clut_offset + i);
> + if (lut->num_grid_points[i] == 0) {
> + invalid_source(src, "bad grid_points");
> + return NULL;
Looks like this leaks. You shouldn't return here just mark the source as invalid.
@@ +695,5 @@
> num_input_table_entries = read_u16(src, offset + 48);
> num_output_table_entries = read_u16(src, offset + 50);
> + if (num_input_table_entries == 0 || num_output_table_entries == 0) {
> + invalid_source(src, "entries is 0");
> + return NULL;
Same here. Does anything bad happen if these values are large?
Attachment #8566813 -
Flags: review?(jmuizelaar) → review-
Updated•10 years ago
|
Keywords: sec-moderate
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8566813 -
Attachment is obsolete: true
Attachment #8568805 -
Flags: review?(jmuizelaar)
Updated•10 years ago
|
Attachment #8568805 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Not sure what the process for landing a security patch is these days.
Keywords: checkin-needed
Comment 8•10 years ago
|
||
status-b2g-v1.4:
--- → wontfix
status-b2g-v2.0:
--- → wontfix
status-b2g-v2.0M:
--- → wontfix
status-b2g-v2.1:
--- → affected
status-b2g-v2.1S:
--- → affected
status-b2g-v2.2:
--- → affected
status-b2g-master:
--- → affected
status-firefox37:
--- → affected
status-firefox38:
--- → affected
status-firefox39:
--- → affected
status-firefox-esr31:
--- → affected
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Comment 10•10 years ago
|
||
Milan, can you please take care of what approval requests this needs? AFAICT, that'd be aurora/beta/esr31/b2g34.
Flags: needinfo?(milan)
Comment 11•10 years ago
|
||
Comment on attachment 8568805 [details] [diff] [review]
patch v2
[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
User impact if declined: Possible info leak
Fix Landed on Version: 39
Risk to taking this patch (and alternatives if risky): Low risk. We do a quick exit if the data is bad.
String or UUID changes made by this patch:
Not requesting uplift to the B2G 34 - we're not actually hitting the QCMS code in B2G, so no particular need to do it. As this hits the beta channel, it will end up in B2G 37, which shouldn't hurt it.
Flags: needinfo?(milan)
Attachment #8568805 -
Flags: approval-mozilla-release?
Attachment #8568805 -
Flags: approval-mozilla-esr31?
Attachment #8568805 -
Flags: approval-mozilla-beta?
Attachment #8568805 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Comment 12•10 years ago
|
||
Comment on attachment 8568805 [details] [diff] [review]
patch v2
Taking this for aurora and beta since it seems low risk, and we're still early in beta -- but not for ESR or release since it doesn't meet the criteria for ESR31 and does not look significant enough to do a second dot release for 36.
Attachment #8568805 -
Flags: approval-mozilla-release?
Attachment #8568805 -
Flags: approval-mozilla-release-
Attachment #8568805 -
Flags: approval-mozilla-esr31?
Attachment #8568805 -
Flags: approval-mozilla-esr31-
Attachment #8568805 -
Flags: approval-mozilla-beta?
Attachment #8568805 -
Flags: approval-mozilla-beta+
Attachment #8568805 -
Flags: approval-mozilla-aurora?
Attachment #8568805 -
Flags: approval-mozilla-aurora+
Comment 13•10 years ago
|
||
Updated•10 years ago
|
Comment 14•10 years ago
|
||
Updated•10 years ago
|
Whiteboard: [adv-main37+]
Updated•10 years ago
|
Alias: CVE-2015-0811
Updated•9 years ago
|
Group: core-security → core-security-release
Updated•9 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•