Closed Bug 1714391 Opened 5 years ago Closed 5 years ago

Crash in [@ nouveau_fence_next] -- UAF, called from WebGL

Categories

(Core :: Graphics, defect)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox-esr78 90+ fixed
firefox89 --- wontfix
firefox90 + fixed
firefox91 + fixed

People

(Reporter: jesup, Assigned: aosmond)

Details

(Keywords: crash, csectype-uaf, sec-high, Whiteboard: [sec-survey][adv-main90+r][adv-esr78.12+r])

Crash Data

Attachments

(2 files)

This is mostly happening in 78.7.1 -- it used to happen in versions up through 88, but perhaps is fixed in 89+?

UAF in code called from WebGL

Crash report: https://crash-stats.mozilla.org/report/index/6e143ade-2813-4ea7-bacd-f679d0210603

Reason: SIGSEGV /SEGV_MAPERR

Top 10 frames of crashing thread:

0 nouveau_dri.so nouveau_fence_next /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/gallium/drivers/nouveau/../../../../../../src/gallium/drivers/nouveau/nouveau_fence.c:226
1 nouveau_dri.so nv30_context_kick_notify /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/gallium/drivers/nouveau/../../../../../../src/gallium/drivers/nouveau/nv30/nv30_context.c:47
2 libdrm_nouveau.so.2 pushbuf_submit /build/libdrm-JmVZ1P/libdrm-2.4.67/build/nouveau/../../nouveau/pushbuf.c:328
3 libdrm_nouveau.so.2 pushbuf_flush /build/libdrm-JmVZ1P/libdrm-2.4.67/build/nouveau/../../nouveau/pushbuf.c:405
4 libdrm_nouveau.so.2 nouveau_pushbuf_kick /build/libdrm-JmVZ1P/libdrm-2.4.67/build/nouveau/../../nouveau/pushbuf.c:779
5 nouveau_dri.so nv30_context_flush /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/gallium/drivers/nouveau/../../../../../../src/gallium/drivers/nouveau/nv30/nv30_context.c:81
6 nouveau_dri.so st_flush /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/mesa/../../../../src/mesa/state_tracker/st_cb_flush.c:87
7 nouveau_dri.so st_glFlush /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/mesa/../../../../src/mesa/state_tracker/st_cb_flush.c:121
8 nouveau_dri.so _mesa_flush /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/mesa/../../../../src/mesa/main/context.c:1691
9 nouveau_dri.so _mesa_make_current /build/mesa-iwkJTx/mesa-10.1.3/build/dri/src/mesa/../../../../src/mesa/main/context.c:1503
Severity: -- → S2

Looks like the reports are mostly from Linux Mint 17.x (based on ubuntu 14.04 and EOL in 2019), and mesa versions 10.1.0 and 10.1.3, also from 2014.

Group: core-security → gfx-core-security
Blocks: gfx-triage
No longer blocks: gfx-triage
Flags: needinfo?(aosmond)
Attached file Bug 1714391.
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Attached file Bug 1714391.

Attached two patches as ESR has diverged so we can't uplift directly. Blocks everything on Mesa < 11 instead of < 10.

Flags: needinfo?(aosmond)

Comment on attachment 9227764 [details]
Bug 1714391.

Security Approval Request

  • How easily could an exploit be constructed based on the patch?: Not easily. We are just blocking Mesa version 10, so that would be their starting point.
  • 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?: Yes
  • If not, how different, hard to create, and risky will they be?:
  • How likely is this patch to cause regressions; how much testing does it need?: Unlikely to cause regressions. We just block WebGL (well all gfx features) with really old Mesa which very few users are likely still using.
Attachment #9227764 - Flags: sec-approval?
Attachment #9227765 - Flags: sec-approval?

Woah, hold up. Block nouveau in this case, not all mesa <11.

Attachment #9227764 - Flags: sec-approval? → sec-approval+

Any landing guidance?

Flags: needinfo?(tom)
Attachment #9227765 - Flags: sec-approval? → sec-approval+

r=jrmuizel,jgilbert
https://hg.mozilla.org/integration/autoland/rev/d99fe7dbb8f8a7f090df19d9c80b05fa386b2811

Please request uplift when you get a chance.

Flags: needinfo?(tom) → needinfo?(aosmond)

Comment on attachment 9227764 [details]
Bug 1714391.

Beta/Release Uplift Approval Request

  • User impact if declined: Crashes on old nouveau drivers with WebGL
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just a block list entry
  • String changes made/needed:
Attachment #9227764 - Flags: approval-mozilla-beta?
Attachment #9227765 - Flags: approval-mozilla-beta?

Comment on attachment 9227764 [details]
Bug 1714391.

Approved for 90.0b12 and 78.12esr.

Flags: needinfo?(aosmond)
Attachment #9227764 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9227765 - Flags: approval-mozilla-beta? → approval-mozilla-esr78+
Group: gfx-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

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.

Flags: needinfo?(aosmond)
Whiteboard: [sec-survey]
QA Whiteboard: [post-critsmash-triage]
Flags: qe-verify-
Whiteboard: [sec-survey] → [sec-survey][adv-main90+r]
Whiteboard: [sec-survey][adv-main90+r] → [sec-survey][adv-main90+r][adv-esr78.12+r]
Group: core-security-release
Flags: needinfo?(aosmond)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: