Closed Bug 1273701 Opened 5 years ago Closed 5 years ago
pixman image ref-counting races with cairo solid colors
24.63 KB, text/plain
14.31 KB, patch
|Details | Diff | Splinter Review|
https://cgit.freedesktop.org/cairo/commit/?id=71e8a4c23019b01aa43b334fcb2784c70daae9b5 https://bugs.freedesktop.org/show_bug.cgi?id= pixman_image_t has virtual function pointers, making use after free serious, but triggering the race is likely difficult.
OS: Unspecified → All
Hardware: Unspecified → All
Attachment #8753622 - Flags: review?(jmuizelaar)
Attachment #8753622 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8753622 [details] [diff] [review] don't reuse pixman images when not thread-safe [Security approval request comment] > How easily could an exploit be constructed based on the patch? Difficult but conceivable. An increment needs to be run concurrently with a decrement and these can only happen on main and compositor threads afaik. Content would need to control the content of an allocation very soon after the refcount decrement, but that could be done on a worker thread. The |cache| variable provides opportunity to retry continually until success. > Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? Yes. > Which older supported branches are affected by this flaw? All of them. > If not all supported branches, which bug introduced the flaw? Bug dates back to bug 562746 at least. > Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be? The code has not changed much so backports are not difficult. > How likely is this patch to cause regressions; how much testing does it need? Unlikely. It just removes some reuse of objects, instead now creating a new object each time.
Attachment #8753622 - Flags: sec-approval?
(In reply to Karl Tomlinson (ni?:karlt) from comment #3) > [Security approval request comment] > > If not all supported branches, which bug introduced the flaw? > Bug dates back to bug 562746 at least. Sorry, that's not correct. The bug was introduced with OMTC, bug 899785.
sec-approval+ for trunk. I'd like to get a patch nominated for Aurora, Beta, and ESR45 as well.
Attachment #8753622 - Flags: sec-approval? → sec-approval+
Comment on attachment 8753622 [details] [diff] [review] don't reuse pixman images when not thread-safe Approval Request Comment [Feature/regressing bug #]: Bug 899785. [User impact if declined]: Random crash (bug 1268202), potentially exploitable. [Describe test coverage new/current, TreeHerder]: No new test. Exploiting the race would require careful timing or brute force. Code is widely used and so exercised by existing tests. [Risks and why]: Unlikely. The patch just removes some reuse of objects, instead now creating a new object each time. [String/UUID change made/needed]: None [Approval Request Comment] Fix Landed on Version: 49
Target Milestone: --- → mozilla49
Comment on attachment 8753622 [details] [diff] [review] don't reuse pixman images when not thread-safe Sec-high, Aurora48+, Beta47+, ESR45+
Attachment #8753622 - Flags: approval-mozilla-esr45?
Attachment #8753622 - Flags: approval-mozilla-esr45+
Attachment #8753622 - Flags: approval-mozilla-beta?
Attachment #8753622 - Flags: approval-mozilla-beta+
Attachment #8753622 - Flags: approval-mozilla-aurora?
Attachment #8753622 - Flags: approval-mozilla-aurora+
Whiteboard: [post-critsmash-triage] → [post-critsmash-triage][adv-main47+][adv-esr45.2+]
You need to log in before you can comment on or make changes to this bug.