Firefox WebGL glvmInterpretFPTransformFour Memory Corruption Vulnerability
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
People
(Reporter: d4ni31, Assigned: jgilbert, NeedInfo)
References
(Depends on 1 open bug)
Details
(4 keywords, Whiteboard: [post-critsmash-triage][adv-main112+][adv-esr102.10+])
Attachments
(10 files, 4 obsolete files)
2.47 KB,
text/html
|
Details | |
52.27 KB,
text/plain
|
Details | |
8.64 KB,
text/plain
|
Details | |
6.50 KB,
text/plain
|
Details | |
31.82 KB,
text/plain
|
Details | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
290 bytes,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Steps to reproduce:
Title
- Firefox WebGL glvmInterpretFPTransformFour OOB Access Vulnerability
Summary
- A OOB Access vulnerability exists in the WebGL glvmInterpretFPTransformFour
- The browser process crashes when triggering this bug.
Test environment
- Product : Mozilla Firefox 105.0.3
- OS : macOS Monterey 12.6 (M1 Pro ARM)
Root Cause Analysis
* thread #25, name = 'CanvasRenderer', queue = 'OpenGLMT', stop reason = EXC_BAD_ACCESS (code=2, address=0x1715efff8)
frame #0: 0x00000001ade070cc libsystem_pthread.dylib`___chkstk_darwin + 60
libsystem_pthread.dylib`:
-> 0x1ade070cc <+60>: ldur x11, [x11, #-0x8]
0x1ade070d0 <+64>: mov x10, sp
0x1ade070d4 <+68>: cmp x9, #0x1, lsl #12 ; =0x1000
0x1ade070d8 <+72>: b.lo 0x1ade070f0 ; <+96>
Target 0: (firefox) stopped.
(lldb) bt
* thread #25, name = 'CanvasRenderer', queue = 'OpenGLMT', stop reason = EXC_BAD_ACCESS (code=2, address=0x1715efff8)
* frame #0: 0x00000001ade070cc libsystem_pthread.dylib`___chkstk_darwin + 60
frame #1: 0x000000020f692db4 libGLProgrammability.dylib`glvmInterpretFPTransformFour + 424
frame #2: 0x000000020f913b88 GLRendererFloat`gldLLVMFPTransformFallback + 444
frame #3: 0x000000020f915cb8 GLRendererFloat`gldLLVMVecPointRender + 6940
frame #4: 0x000000020f90e5c0 GLRendererFloat`gldRenderPoints + 76
frame #5: 0x000000020f8e0524 GLEngine`gleLLVMVecPrimPointRender + 1684
frame #6: 0x000000020f83b88c GLEngine`glDrawArraysInstanced_STD_GL3Exec + 1296
frame #7: 0x000000020f83acd8 GLEngine`glDrawArrays_UnpackThread + 48
frame #8: 0x000000020f87689c GLEngine`gleCmdProcessor + 116
frame #9: 0x00000001adc481b4 libdispatch.dylib`_dispatch_client_callout + 20
frame #10: 0x00000001adc57414 libdispatch.dylib`_dispatch_lane_barrier_sync_invoke_and_complete + 56
frame #11: 0x000000020f7e2ac8 GLEngine`glFlush_ExecThread + 32
frame #12: 0x000000011106ac50 XUL`___lldb_unnamed_symbol52768 + 40
frame #13: 0x00000001114e90c8 XUL`___lldb_unnamed_symbol63264 + 2252
frame #14: 0x00000001146fd0a4 XUL`___lldb_unnamed_symbol207810 + 980
frame #15: 0x0000000113c48764 XUL`___lldb_unnamed_symbol166963 + 312
frame #16: 0x0000000110e907e8 XUL`___lldb_unnamed_symbol49031 + 756
frame #17: 0x0000000110e91a24 XUL`___lldb_unnamed_symbol49039 + 168
frame #18: 0x0000000110c15b4c XUL`___lldb_unnamed_symbol41826 + 4308
frame #19: 0x0000000110e945d0 XUL`___lldb_unnamed_symbol49067 + 476
frame #20: 0x0000000110e5ceb8 XUL`___lldb_unnamed_symbol48460 + 80
frame #21: 0x0000000110c0ea24 XUL`___lldb_unnamed_symbol41796 + 288
frame #22: 0x0000000100f46fa8 libnss3.dylib`___lldb_unnamed_symbol2250 + 260
frame #23: 0x00000001ade0c26c libsystem_pthread.dylib`_pthread_start + 148
(lldb) mem read 0x1715efff8
error: memory read failed for 0x1715efe00
-
If you debug at the point where the crash occurred, you can see that the crash occurred in OpenGLMT.
-
This bug is an Out-Of-Bounds Access vulnerability that occurs in WebGL's handling of the drawElements command.
Proof-of-Concept
- Please check the attached file!
Reproduce
- open a poc.html in Firefox
- Wait a few seconds.
CREDIT Information
- Dohyun Lee (@l33d0hyun) of SSD Labs
Actual results:
.
Expected results:
.
Reporter | ||
Comment 1•2 years ago
|
||
Reporter | ||
Comment 2•2 years ago
|
||
Comment hidden (obsolete) |
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
I had a similar problem with Google Chrome. This is a Security Issue and needs a fix. I'll link the case ID of a similar case
https://bugs.chromium.org/p/chromium/issues/detail?id=1314383
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 5•2 years ago
|
||
ASAN was tested on Linux running on VMware. Some crashes occurred in vmwgfx_dri.so, but some crashes occur in Mozilla Firefox. Check out 5 ASAN results on #C3
Reporter | ||
Comment 6•2 years ago
|
||
Windows does not appear to be affected by this vulnerability. Only macOS and Linux seem to be affected
Reporter | ||
Comment 7•2 years ago
|
||
This may be related to Use-After-Free or Double Free.
Reporter | ||
Comment 8•2 years ago
|
||
Summary modify:
Firefox WebGL glvmInterpretFPTransformFour OOB Access Vulnerability → Firefox WebGL glvmInterpretFPTransformFour Bad-Free (Heap Corruption) Vulnerability
Updated•2 years ago
|
Updated•2 years ago
|
Comment 10•2 years ago
|
||
I marked comment 3 as "obsolete" so it would be hidden. The contents are in the attachment, and it was taking up a lot of room in this bug.
Reporter | ||
Comment 11•2 years ago
|
||
Thanks Andrew!
Comment 12•2 years ago
|
||
Here's the crash stack I get in a debug build. It is hitting a DOM thread safety assertion, but it looks like that's just some weird fallout from AppleIntelKBLGraphicsGLDriver hitting a fatal error and bailing out in a weird way.
Comment 13•2 years ago
|
||
There's also this in the log, which is not a sort of error I've seen before:
LLVM ERROR: OCL IGC-Internal-ERRORERROR!!!: Non-OCL is not supposed to reach here!
Reporter | ||
Comment 14•2 years ago
|
||
Hi Andrew,
Could you please check comment #4? A case similar to this bug has also occurred in Google Chrome. It would be good to refer to
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 15•2 years ago
|
||
This is an ASAN log that occurs in Linux running in VirtualBox.
I think it's the same case as the problem with Google Chrome.
Reporter | ||
Comment 16•2 years ago
|
||
Root Cause Analysis (Update)
This vulnerability has the following flow:
Call the erase function in [1] and delete objects[i]
in [2]. In [3], you can see that the texture's destructor calls the cleanup
function. Finally, in [4], a crash occurs in the process of free(buf);
.
This crash is caused by an attempt to free an invalid pointer named Buf.
void DeleteTexture(GLuint n) {
if (n && ctx->textures.erase(n)) { // [1]
for (size_t i = 0; i < MAX_TEXTURE_UNITS; i++) {
ctx->texture_units[i].unlink(n);
}
}
}
[1] https://searchfox.org/mozilla-central/source/gfx/wr/swgl/src/gl.cc#1862
bool erase(size_t i) {
if (i < size && objects[i]) {
on_erase(objects[i], nullptr);
delete objects[i]; // [2]
objects[i] = nullptr;
if (i < first_free) first_free = i;
return true;
}
return false;
}
O** begin() const { return objects; }
O** end() const { return &objects[size]; }
};
[2] https://searchfox.org/mozilla-central/source/gfx/wr/swgl/src/gl.cc#731
~Texture() { cleanup(); } // [3]
[3] https://searchfox.org/mozilla-central/source/gfx/wr/swgl/src/gl.cc#544
void cleanup() {
assert(!locked); // Locked textures shouldn't be destroyed
if (buf) {
// If we need to toggle SHOULD_FREE state, ensure that buf is nulled out,
// regardless of whether we internally allocated it. This will prevent us
// from wrongly treating buf as having been internally allocated for when
// we go to realloc if it actually was externally allocted.
if (should_free()) {
free(buf); // [4]
}
buf = nullptr;
buf_size = 0;
buf_bpp = 0;
buf_stride = 0;
}
disable_delayed_clear();
}
[4] https://searchfox.org/mozilla-central/source/gfx/wr/swgl/src/gl.cc#534
Reporter | ||
Comment 17•2 years ago
|
||
comment #15:
I think it's the same case as the problem with Google Chrome. -> The same type of vulnerability that occurred in Google Chrome, but in a different location.
Comment 18•2 years ago
|
||
Regarding comment 16, SWGL would not be implicated in this bug as the testcase uses WebGL, and WebGL never uses SWGL.
As far as the trace in comment 15, the testcase does not create textures at all, so it wouldn't lead to the aforementioned problem in any case. The testcase does an uncomplicated update of the WebGL canvas, which WebRender will display using SWGL.
As WebRender will use SWGL (which is completely software and doesn't use any hardware resources), whereas WebGL will use HW OpenGL (i.e. Mesa, macOS's GL implementation, etc.) there is no actual way these two different libraries can interact.
It seems more like, since the testcase just repeatedly creates new shaders in a setTimeout loop, that we're just causing a species of OOM here with the spamming of WebGL commands exhausting memory and this later showing up as the strange SWGL trace in comment 15.
Now, macOS doesn't actually use SWGL for WebRender at the moment, so the fact that something strange (but different) happens there without SWGL points more to the OOM theory.
Kelsey, thoughts?
Reporter | ||
Comment 19•2 years ago
|
||
Hi Lee,
Removing the setTimeout
from the testcase has the same problem.
Additionally, if you debug this crash, you can see that it is EXC_BAD_ACCESS
, not OOM caused by exhausting memory.
* thread #26, name = 'CanvasRenderer', queue = 'OpenGLMT', stop reason = EXC_BAD_ACCESS (code=2, address=0x16e8a7ff8)
frame #0: 0x00000001ade070cc libsystem_pthread.dylib___chkstk_darwin + 60
libsystem_pthread.dylib:
-> 0x1ade070cc <+60>: ldur x11, [x11, #-0x8]
0x1ade070d0 <+64>: mov x10, sp
0x1ade070d4 <+68>: cmp x9, #0x1, lsl #12 ; =0x1000
0x1ade070d8 <+72>: b.lo 0x1ade070f0 ; <+96>
(lldb) mem read 0x000000016e8a8000-0x8
error: memory read failed for 0x16e8a7e00
The point where the crash occurred in lldb is [x11-0x8]
, which is determined to refer to an invalid address.
Comment 20•2 years ago
|
||
(In reply to DoHyun Lee from comment #14)
Could you please check comment #4? A case similar to this bug has also occurred in Google Chrome. It would be good to refer to
That is a different bug entirely. We do use ANGLE, but we don't use any of the GPU parts of it nor the vk::
(vulcan) code specifically.
Reporter | ||
Comment 21•2 years ago
|
||
Hi dveditz,
So I mentioned that it could be a similar bug! The bad-free type is the first bug I've ever seen. However, the call stack is similar, so I put a reference.
Updated•2 years ago
|
Comment 22•2 years ago
|
||
rating based on the evidence it might be heap corruption, but there's also a chance this is OOM whackage that has corrupted our tracing tools. Needs a closer look from the GFX folks
Comment 23•2 years ago
|
||
Recently changed to a sec-high, asking for re-triage and a closer look to determine if it's truly a sec-high and actionable.
Comment 24•2 years ago
|
||
The Chrome/ANGLE change to fix this is the vulkan backend which we don't use. So it seems like there may be issues in multiple places
Comment 25•2 years ago
•
|
||
I'm not able to repro this with the poc in comment #0 on Ubuntu 22.04 LTS with a pure AMD machine (Ryzen 9 5950X, Radeon RX 6700 XT) using mozregression from ff95 to current nightly, is there a more specific config setting needed to repro?
Updated•2 years ago
|
Comment 26•2 years ago
|
||
Just reproduced on macOS with this crash report.
Assignee | ||
Comment 27•2 years ago
|
||
I agree that it looks like likely multiple issues here. I'm going to focus on the Mac issue posted in the original post.
The stacks from Mac remind me of bug 1773874, where we have crashes during codegen, due to large array allocations in webgl shaders.
In this case, the testcase has:
void main( void )
{
const int numColors = 9000;
vec3 colors[numColors];
That's 349000=108,000B, though generally vec3 is padded to vec4, so 144,000B likely.
In 1773874 I found that there's a threshold around 32KiB below which the crashes went away.
This doesn't have exactly the same symptoms, but that does jump out at me.
There is this line too:
LLVM ERROR: OCL IGC-Internal-ERRORERROR!!!: Non-OCL is not supposed to reach here!
LLVM seems like it sometimes calls OpenCL "OCL", so yeah I think the system shader compiler is exploding.
Assignee | ||
Comment 28•2 years ago
|
||
(In reply to Brad Werth [:bradwerth] from comment #26)
Just reproduced on macOS with this crash report.
0 libsystem_pthread.dylib ___chkstk_darwin context
1 libGLProgrammability.dylib glvmInterpretFPTransformFour cfi
2 GLRendererFloat gldLLVMFPTransformFallback cfi
3 GLRendererFloat gldLLVMVecPointRender cfi
4 GLRendererFloat gldRenderPoints cfi
5 GLEngine gleLLVMVecPrimPointRender cfi
6 GLEngine glDrawElementsInstancedBaseVertex_STD_GL3Exec cfi
7 GLEngine glDrawElements_UnpackThread cfi
8 GLEngine gleCmdProcessor cfi
9 libdispatch.dylib _dispatch_client_callout cfi
10 libdispatch.dylib _dispatch_lane_barrier_sync_invoke_and_complete cfi
11 GLEngine glGenTextures_ExecThread cfi
12 XUL mozilla::gl::GLContext::raw_fGenTextures(int, unsigned int*) gfx/gl/GLContext.h:3851 cfi
13 XUL mozilla::gl::Texture::Create(mozilla::gl::GLContext&) gfx/gl/GLContext.h:3844 inlined
___chkstk_darwin
is the stack overflow protection kicking in.
The stack here is super interesting, and leads me to believe that the driver might be running an (llvm) interpreter fallback for point rendering here.
Also, the testcase is hitting our fake-vertex-0-array pass, or maybe it should be and it's not working.
The DrawElements is asking to draw two points from the index buffer [167, 213, ...], but the vertex shader has no attribs, no writes to gl_PointSize [1], so there's a couple things up there too.
I want to see if I can repro.
[1]: The WebGL WG decided that shaders that don't write to gl_PointSize are not supposed to render GL_POINTS anymore, but we haven't merged that change to the spec yet: https://github.com/KhronosGroup/WebGL/pull/3370
Assignee | ||
Comment 29•2 years ago
|
||
We should try to enact the PointSize-must-be-written requirement, and see if that fixes it.
Or I guess trying the testcase with writing to PointSize, and see if it repros the same.
Comment 30•2 years ago
|
||
Symbolized crash report from Ubuntu 22.04.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 32•2 years ago
|
||
I believe I can conveniently fix this by pushing on a change to the webgl spec that's been languishing for a year, and just land it in Firefox.
I will try a patched version of nightly on a mac tomorrow.
Reporter | ||
Comment 33•2 years ago
|
||
Are there any patch plans for this issue?
Assignee | ||
Comment 34•2 years ago
|
||
Yes, I'm working on the spec side right this moment.
Assignee | ||
Comment 35•2 years ago
|
||
(+Ken from Chrome WebGL)
Reporter | ||
Comment 37•2 years ago
|
||
ping ^jgilbert
When will there be an update on this case?
Reporter | ||
Comment 38•2 years ago
|
||
Hello?
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 39•2 years ago
|
||
Can anyone please reply.
There seems to be a patch from "Depends on: 1803715".
ref : https://phabricator.services.mozilla.com/D163667
But still no response here. The patch didn't even apply.
When can I expect a reply on this? It's already been 4 months.
I'd like to add a disclosure deadline to prevent this from happening.
This bug is subject to a 90-day disclosure deadline. If a fix for this
issue is made available to users before the end of the 90-day deadline,
this bug report will become public 30 days after the fix was made
available. Otherwise, this bug report will become public at the deadline.
The scheduled deadline is 2023-05-06.
Assignee | ||
Comment 40•2 years ago
|
||
Hi, sorry about these delays.
I believe this is an issue in the macOS opengl driver implementation in this case, and we are running into their issue here.
We hoped we could figure out a spec workaround for this, such that we could just forbid this case. However, the WebGL WG isn't sure that the spec change we feel comfortable making in this area would prevent this issue.
Unfortunately, the fix required is pretty intricate:
In the case of draws that don't write gl_PointSize, when asked to draw POINTS, recompile the program with gl_PointSize set to some value, and from there, mirror all uniform settings to both internal programs.
We can't simply no-op all such calls, because this breaks transform feedback cases, including CTS tests, which makes it likely that it will affect content in the wild. Therefore we have to do this harder, riskier thing.
Reporter | ||
Comment 41•2 years ago
|
||
Okay, thank you for the comments.
Comment 42•2 years ago
|
||
Update - Kelsey will be looking at potential ways to address this next week.
Assignee | ||
Comment 43•2 years ago
|
||
@DoHyun Can you try this build?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/bDO6YnD_QBGElxGBJvGPhQ/runs/0/artifacts/public/build/target.dmg
Reporter | ||
Comment 44•2 years ago
|
||
Hi Kelsey,
When I tested with Firefox Nightly 112.0a1 you sent, I was able to confirm that this vulnerability was patched.
No crash with Firefox!
Reporter | ||
Comment 45•2 years ago
|
||
Now the next thing is to do a stable release of this?
Please change the status for this!
Status: RESOLVED FIXED
Thank you for your hard work fixing this bug!
Additionally, can I get a CVE ID when this vulnerability becomes a stable release?
Reporter | ||
Comment 46•2 years ago
|
||
Issue 1773874 seems to have been patched along with this as well.
Thanks!
Assignee | ||
Comment 47•2 years ago
|
||
Assignee | ||
Comment 48•2 years ago
|
||
The theory is:
- The driver is running an (llvm?) interpreter fallback/work-sharer for point rendering here.
- That implementation is not robust when asked to render points when gl_PointSize was not set.
- Always injecting gl_PointSize initialization will prevent hitting this issue in the driver for POINTS draws.
- The driver is likely tolerant of gl_PointSize being written even if we later draw with e.g. TRIANGLES instead of POINTS.
Assignee | ||
Comment 49•2 years ago
|
||
Comment on attachment 9319782 [details]
Bug 1794292 - Unconditionally init gl_PointSize on Mac.
Security Approval Request
- How easily could an exploit be constructed based on the patch?: Hard, though it's suspect, but really hard to tell why this is being done from the patch.
There is mention in the patch that this is for working around driver issues with gl_PointSize unwritten then POINTS drawn, but not why this might cause a sec issue. - 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?: Easy to make.
- How likely is this patch to cause regressions; how much testing does it need?: Unlikely, if it passes CI.
I have triggered CI tests for my build here: https://treeherder.mozilla.org/jobs?repo=try&revision=325049c13598ab892a07512fa119bf6b135b46fd - Is Android affected?: No
Assignee | ||
Updated•2 years ago
|
Comment 50•2 years ago
|
||
Comment on attachment 9319782 [details]
Bug 1794292 - Unconditionally init gl_PointSize on Mac.
Approved to request uplift and land
Updated•2 years ago
|
Updated•2 years ago
|
Comment 51•2 years ago
|
||
:jgilbert the final 111 beta builds on 2023-03-02. Next week is RC week.
This needs to land if it's going to make it for the 111 cycle.
Assignee | ||
Comment 52•2 years ago
|
||
Sorry, uplift got kinda complicated with the ANGLE backout, so we're slipping 111 then.
Updated•2 years ago
|
Reporter | ||
Comment 53•2 years ago
|
||
Hi,
Will a patch for this arrive in firefox 112?
Comment 54•2 years ago
|
||
(In reply to DoHyun Lee from comment #53)
Will a patch for this arrive in firefox 112?
That's the intention, yes.
Updated•2 years ago
|
Reporter | ||
Comment 55•2 years ago
|
||
Hi !
How long does it take to reach Stable?
Comment 56•2 years ago
|
||
DoHyun, we are currently working on getting this patch ready for uplift to Fx112, which is in Beta right now. IF we can achieve that, this fix will reach Release (which I think is what you mean by "Stable") sometime around April 11th.
Assignee | ||
Comment 57•2 years ago
|
||
Assignee | ||
Comment 58•2 years ago
|
||
Assignee | ||
Comment 59•2 years ago
|
||
Assignee | ||
Comment 60•2 years ago
|
||
Assignee | ||
Comment 61•2 years ago
|
||
mozilla/angle branches are up:
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 62•2 years ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D174179
Assignee | ||
Comment 63•2 years ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D174180
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 64•2 years ago
|
||
[ANGLE] cherry-pick init-gl-point-size. r=gfx-reviewers,bradwerth
https://hg.mozilla.org/mozilla-central/rev/de9c5e6187cf
Use init-gl-point-size on mac. r=gfx-reviewers,bradwerth
https://hg.mozilla.org/mozilla-central/rev/06133fd6e358
apply code formatting via Lando
https://hg.mozilla.org/mozilla-central/rev/f4f1d9ae75f9
Reporter | ||
Comment 65•2 years ago
|
||
Thanks!
Please use the credits below once this vulnerability is patched in stable and assigned a CVE ID.
CREDIT: Dohyun Lee (@l33d0hyun) of SSD Secure Disclosure Labs
Reporter | ||
Updated•2 years ago
|
Comment 66•2 years ago
|
||
The patch landed in nightly and beta is affected.
:jgilbert, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox112
towontfix
.
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 67•2 years ago
|
||
Comment on attachment 9326121 [details]
Bug 1794292 - Use init-gl-point-size on mac.
Beta/Release Uplift Approval Request
- User impact if declined: sec-high due to gpu driver bug on mac
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Load the POC testcase on Mac+Intel
- List of other uplifts needed: None
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): Medium-low. We are adding an extra injected line into every webgl shader we compile with this change. I believe the spec doesn't guarantee that what we're doing here is safe, but we're on Mac, which has fairly homogeneous drivers, and it Seems Fine (tm). Also passes CI still.
Alternatives would be very tricky tracking and handling on our side to carefully detect when this case might occur, and compile a second version of the shader to use in this bad case, and then needing to coordinate this shadow-shader with the real shader as its settings get updated. This would be a much riskier change.
- String changes made/needed: none
- Is Android affected?: No
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: sec-high
- User impact if declined: sec-high due to gpu driver bug on mac
- Fix Landed on Version: 113
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): Medium-low. We are adding an extra injected line into every webgl shader we compile with this change. I believe the spec doesn't guarantee that what we're doing here is safe, but we're on Mac, which has fairly homogeneous drivers, and it Seems Fine (tm). Also passes CI still.
Alternatives would be very tricky tracking and handling on our side to carefully detect when this case might occur, and compile a second version of the shader to use in this bad case, and then needing to coordinate this shadow-shader with the real shader as its settings get updated. This would be a much riskier change.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 68•2 years ago
|
||
Comment on attachment 9326120 [details]
Bug 1794292 - [ANGLE] cherry-pick init-gl-point-size.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration:
- User impact if declined:
- Fix Landed on Version:
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky):
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 69•2 years ago
|
||
Comment on attachment 9326116 [details]
Bug 1794292 - [esr102] [ANGLE] cherry-pick init-gl-point-size.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration:
- User impact if declined:
- Fix Landed on Version:
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky):
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 70•2 years ago
|
||
Comment on attachment 9326121 [details]
Bug 1794292 - Use init-gl-point-size on mac.
Beta/Release Uplift Approval Request
- User impact if declined:
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- 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):
- String changes made/needed:
- Is Android affected?: Yes
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 71•2 years ago
|
||
I have a question for you. When this vulnerability occurred, the firefox browser process crashed. I think this is a part that can affect the sandbox. What do you think?
Assignee | ||
Comment 72•2 years ago
|
||
No, the sandbox is fine. Crashes aren't all vulns.
Honestly I'm not totally sure this is worse than a sec-dos, because I think ___chkstk_darwin might generally be a safe crash (like always-null derefs), but I don't want to stress about it either way.
I'm not sure you could build a vuln with this issue.
Comment 73•2 years ago
|
||
Comment on attachment 9326120 [details]
Bug 1794292 - [ANGLE] cherry-pick init-gl-point-size.
Approved for 112.0rc1
Updated•2 years ago
|
Comment 74•2 years ago
|
||
uplift |
Comment 75•2 years ago
|
||
Comment on attachment 9326116 [details]
Bug 1794292 - [esr102] [ANGLE] cherry-pick init-gl-point-size.
Approved for 102.10esr.
Updated•2 years ago
|
Comment 76•2 years ago
|
||
uplift |
Updated•2 years ago
|
Comment 77•2 years ago
|
||
Seems like the browser keeps crashing instantly for me while loading the poc.html file into Firefox 112.0b9 and Firefox 113.0a1 (2023-04-02) on macOS 13.3 (Intel system). One thing that I noticed is that if I keep the macbook connected to the external display (forces the AMD gpu to work) it will not crash with the poc even on the affected build (107.0a1). If the display is disconnected and the Intel gpu is used, the crash occurs instantly when loading the poc file.
This is the report that I get after the crash: https://crash-stats.mozilla.org/report/index/ad6aad01-1378-407e-9c45-073210230403#tab-details. Any idea why is this happening ?
Comment 79•2 years ago
|
||
We tried reproducing/verifying the initial issue but had no luck in doing so on two different systems:
- Macbook Pro 16" 2019 Intel - macOS 13.3
- loading the test case on an affected build Firefox 107.0a1 (2022-10-09)/ latest builds and dedicated AMD gpu will result in no crash, the poc page keeps refreshing indefinitely
- loading the test case on an affected build Firefox 107.0a1 (2022-10-09)/ latest builds and integrated Intel gpu will result in crashing to https://crash-stats.mozilla.org/report/index/ad6aad01-1378-407e-9c45-073210230403#tab-details.
- Apple M1 mac Mini - macOS 13.2
- loading the test case on an affected build Firefox 107.0a1 (2022-10-09) will lead to this crash after ~10sec: https://crash-stats.mozilla.org/report/index/abb6deda-275a-492b-ae09-6b4c60230404
- Firefox 112.0 and 113.0a1 (2023-04-03) will not crash at all, however: a blank page is displayed for ~10/15 seconds until the test case is loaded, and quitting Firefox will also last ~10/15 seconds until the icon from the dock is closed
*Firefox 102.10.0esr crashes when loading this test case (https://crash-stats.mozilla.org/report/index/bp-d9f684c6-ecde-4682-be25-008af0230404). Kelsey, should we file an issue for this? Thanks!
Dohyun, could you please verify the fix on Nightly, RC and ESR builds? Thank you!
Updated•2 years ago
|
Comment 80•2 years ago
|
||
Are the angle changes going to be upstreamed?
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 81•2 years ago
|
||
Comment 82•2 years ago
|
||
(In reply to Kelsey Gilbert [:jgilbert] from comment #27)
I agree that it looks like likely multiple issues here. I'm going to focus on the Mac issue posted in the original post.
Also, I wanted to follow up and see if the other issues references got their own bug reports.
Reporter | ||
Comment 83•2 years ago
|
||
Hi tom,
Can you use the credit below?
CREDIT : Dohyun Lee (@l33d0hyun) of SecuriTeam Secure Disclosure Labs
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•8 months ago
|
Description
•