use-after-free in nsFlexContainerFrame::MeasureAscentAndBSizeForFlexItem
Categories
(Core :: Layout: Flexbox, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr68 | - | unaffected |
| firefox74 | --- | unaffected |
| firefox75 | --- | unaffected |
| firefox76 | + | verified |
People
(Reporter: tarafans7, Assigned: emilio)
References
(Regression)
Details
(4 keywords, Whiteboard: [sec-survey])
Attachments
(2 files, 1 external file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
Steps to reproduce:
A use-after-free bug is triggered when fuzzing Firefox Nightly ASAN build.
The PoC and the ASAN log reproduced by ffpuppet against the official build on Mar. 30 are attached.
Wen Xu from sslab, gatech
Updated•6 years ago
|
| Assignee | ||
Comment 3•6 years ago
|
||
This saves an allocation and prevents some ::first-line + svg text edge cases
from clearing the caches.
It's really weird to invalidate intrinsic sizes on ancestors while reflowing
them, but it can happen.
Updated•6 years ago
|
| Assignee | ||
Comment 4•6 years ago
|
||
Comment on attachment 9137171 [details]
Bug 1626152 - Clear cached result instead of removing the property. r=dholbert,TYLin
Security Approval Request
- How easily could an exploit be constructed based on the patch?: not too easily.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
- Which older supported branches are affected by this flaw?: all
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: No
- If not, how different, hard to create, and risky will they be?: I think not too hard. Would need to backport bug 1624247 part 3 or such. But nothing too scary.
- How likely is this patch to cause regressions; how much testing does it need?: not likely at all.
Comment 5•6 years ago
|
||
Setting affected flags per comment 4.
Comment 6•6 years ago
|
||
Notably: the patch makes complete sense to do, as an optimization on its own (it's a logical followup to bug 1624247).
If it's judged to be worthwhile, I'm sure emilio could spin off a public version of this bug with the patch as a drive-by improvement, with no security-related classification/notes whatsoever on that bug. That would let us land the patch & fix the issue & ride the trains, without drawing attention to it from having it land with a security-sensitive bug number.
(Not sure that's worth it -- it's just more of an option here than it is in many other sec bugs, given that the patch is trivial & makes total sense on its own, regardless of the security edge-case that it happens to help with here.)
Comment 7•6 years ago
|
||
(I'll defer to the sec-approval-granting folks on whether comment 6 is worth it.)
Updated•6 years ago
|
Updated•6 years ago
|
Comment 8•6 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #6)
Notably: the patch makes complete sense to do, as an optimization on its own (it's a logical followup to bug 1624247).
If it's judged to be worthwhile, I'm sure emilio could spin off a public version of this bug with the patch as a drive-by improvement,
The nice thing about landing now (before Monday) is we don't need to uplift to Beta to ship in Fx76 (Fx75 is a wrap--this doesn't warrant an RC respin). But it's the weekend now -- Sorry I didn't get to the sec-approvals with the chemspill stuff going on. I'm not sure when the merge actually takes place. Do folks in Europe-time get to land some stuff in their morning before it happens?
- if you can land this before the merge then you have sec-approval to land on mozilla-central under this bug number.
- if we miss that then a public bug might be best so the uplift-to-beta doesn't look suspicious.
- Don't land on ESR until much closer to shipping, the week of April 20 at the earliest. We'll need a combo-patch that has the bits from bug 1624247 that you need.
Updated•6 years ago
|
| Assignee | ||
Comment 9•6 years ago
|
||
if you can land this before the merge then you have sec-approval to land on mozilla-central under this bug number.
I asked the sheriffs and confirmed that it'd get in before the merge, so landed https://hg.mozilla.org/integration/autoland/rev/3cf71917b15056473e97d520e96f40b9a5edb09c
ESR probably needs a rebased patch, so I'll hold off on preparing that for now. Please ni? me when you want me to provide a patch :)
Comment 11•6 years ago
|
||
https://hg.mozilla.org/integration/autoland/rev/3cf71917b15056473e97d520e96f40b9a5edb09c
https://hg.mozilla.org/mozilla-central/rev/3cf71917b150
| Assignee | ||
Comment 12•6 years ago
|
||
On ESR? I assume that's not what you meant per comment 8... I had already pushed to autoland (see comment 9).
Comment 13•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #12)
On ESR? I assume that's not what you meant per comment 8... I had already pushed to autoland (see comment 9).
Yeah, I missed that it was already on autoland there. Thanks for double-checking!
Comment 14•6 years ago
|
||
As part of a security bug pattern analysis, we are requesting your help with a high level analysis of this bug. It is our hope to develop static analysis (or potentially runtime/dynamic analysis) in the future to identify classes of bugs.
Please visit this google form to reply.
Updated•6 years ago
|
Comment 16•6 years ago
|
||
We're ready for that ESR rebase and uplift request now :)
| Assignee | ||
Comment 17•6 years ago
|
||
Ah, I lie, ESR turns out not to be affected. This bug was introduced in bug 1621989 (part 3). Which is in 76, so I think we're good!
Comment 18•6 years ago
|
||
Thanks for checking!
Updated•6 years ago
|
| Reporter | ||
Comment 19•6 years ago
|
||
Dear developers,
I wonder if this bug will be acknowledged by a CVE number and/or qualified for security bug bounty?
Thanks a lot.
Comment 20•6 years ago
|
||
Reproduced the initial issue using the poc file attacked using an old Nightly build. Verified that the this is not reproducible anymore using latest Nightly fuzz asan build and latest Beta 76.0b9 fuzz asan on Ubuntu 18.04 64bit.
| Assignee | ||
Comment 21•6 years ago
|
||
(In reply to tarafans7 from comment #19)
I wonder if this bug will be acknowledged by a CVE number and/or qualified for security bug bounty?
I don't know about the CVE, specially given it didn't affect anything else than pre-release builds, but it probably qualifies for a bounty?
See https://www.mozilla.org/en-US/security/client-bug-bounty/#claiming-a-bounty, it seems you haven't filed the bug via the bounty form, so you should probably mail security@
Comment 22•6 years ago
|
||
Tagging for the bounty committee at the reporter's request.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•2 years ago
|
Description
•