WebKit Bugzilla
Attachment 369419 Details for
Bug 197682
: [WebGPU] Validate GPUComputePassEncoder.dispatch to prevent DOS on macOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197682-20190508134803.patch (text/plain), 1.94 KB, created by
Justin Fan
on 2019-05-08 13:48:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Fan
Created:
2019-05-08 13:48:03 PDT
Size:
1.94 KB
patch
obsolete
>Subversion Revision: 244966 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c6c1f7679f545d94a40166b2a4b7d364ff85b7b1..6e5fe3d3918b568632f0e64795214536c3554c04 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-07 Justin Fan <justin_fan@apple.com> >+ >+ [WebGPU] Limit threadsPerThreadGroup for GPUComputePassEncoder.dispatch to prevent DOS on macOS >+ https://bugs.webkit.org/show_bug.cgi?id=197682 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add temporary validation to prevent macOS systems from lock-up via extremely large GPU compute dispatches. >+ Will be adjusted after WebGPU WG decides on the specification for GPUComputePassEncoder.dispatch. >+ >+ No new tests as error handling is not hooked up yet. >+ >+ * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: >+ (WebCore::GPUComputePassEncoder::dispatch): >+ > 2019-05-06 Zan Dobersek <zdobersek@igalia.com> > > [GLib] WebCore::MainThreadSharedTimer should use the appropriate GSource priority, name >diff --git a/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm b/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm >index 713c1b791075a086b90b31309914a405d6afe682..9f92901b538a53d07034485c6351c9f8cbed877a 100644 >--- a/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm >+++ b/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm >@@ -92,6 +92,12 @@ void GPUComputePassEncoder::dispatch(unsigned x, unsigned y, unsigned z) > return; > } > >+ // FIXME: Restrict the maximum number of threadgroups to this volume for now, to prevent extended DOS on macOS. >+ if (x * y * z > 64000000) { >+ LOG(WebGPU, "GPUComputePassEncoder::dispatch(): Threadgroup dispatch size too large!"); >+ return; >+ } >+ > auto pipelineState = m_pipeline->platformComputePipeline(); > ASSERT(pipelineState); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mmaxfield
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197682
: 369419