Skip to content

Commit b465512

Browse files
committed
improve ImageBitmap checks to allow certain non-problematic cases to continue to work
1 parent 286d9fc commit b465512

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

source

+17-12
Original file line numberDiff line numberDiff line change
@@ -8275,9 +8275,8 @@ interface <dfn>DOMStringList</dfn> {
82758275
<p>If ! <span>IsSharedArrayBuffer</span>(<var>value</var>) is true, then:
82768276

82778277
<ol>
8278-
<li><p>Let <var>agentCluster</var> be the <span>current Realm Record</span>'s corresponding
8278+
<li><p>Let <var>agentCluster</var> be <span>surrounding agent</span>'s
82798279
<span>agent cluster</span>.</p></li>
8280-
<!-- Should this use the surrounding agent's agent cluster instead? -->
82818280

82828281
<li>
82838282
<p>If <var>agentCluster</var>'s <span>allow sidechannel attacks</span> is false, then throw
@@ -95255,6 +95254,9 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9525595254
are:</p>
9525695255

9525795256
<ol>
95257+
<li><p>Set <var>serialized</var>.[[AllowSideChannelAttacks]] to <span>surrounding agent</span>'s
95258+
<span>agent cluster</span>'s <span>allow sidechannel attacks</span>.</p></li>
95259+
9525895260
<li><p>Set <var>serialized</var>.[[BitmapData]] to a copy of <var>value</var>'s <span
9525995261
data-x="concept-ImageBitmap-bitmap-data">bitmap data</span>.</p></li>
9526095262

@@ -95268,14 +95270,14 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9526895270

9526995271
<ol>
9527095272
<li>
95271-
<p>If <var>serialized</var>.[[OriginClean]] is false and <span>surrounding agent</span>'s
95273+
<p>If <var>serialized</var>.[[OriginClean]] is false,
95274+
<var>serialized</var>.[[AllowSideChannelAttacks]] is false, and <span>surrounding agent</span>'s
9527295275
<span>agent cluster</span>'s <span>allow sidechannel attacks</span> is true, then throw a
9527395276
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p>
9527495277

95275-
<p class="warning">To protect against sidechannel attacks implementations should avoid
95276-
transmitting <var>serialized</var>.[[BitmapData]], when <var>serialized</var>.[[OriginClean]] is
95277-
false, to <span data-x="agent cluster">agent clusters</span> whose <span>allow sidechannel
95278-
attacks</span> is true.</p>
95278+
<p class="warning">To truly protect against sidechannel attacks implementations should avoid
95279+
transmitting <var>serialized</var>.[[BitmapData]] to the <span>surrounding agent</span>'s
95280+
<span>agent cluster</span> under the above conditions.</p>
9527995281
</li>
9528095282

9528195283
<li><p>Set <var>value</var>'s <span data-x="concept-ImageBitmap-bitmap-data">bitmap data</span>
@@ -95288,6 +95290,9 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9528895290
<p>Their <span>transfer steps</span>, given <var>value</var> and <var>dataHolder</var>, are:</p>
9528995291

9529095292
<ol>
95293+
<li><p>Set <var>dataHolder</var>.[[AllowSideChannelAttacks]] to <span>surrounding agent</span>'s
95294+
<span>agent cluster</span>'s <span>allow sidechannel attacks</span>.</p></li>
95295+
9529195296
<li><p>Set <var>dataHolder</var>.[[BitmapData]] to <var>value</var>'s <span
9529295297
data-x="concept-ImageBitmap-bitmap-data">bitmap data</span>.</p></li>
9529395298

@@ -95304,14 +95309,14 @@ dictionary <dfn>ImageBitmapOptions</dfn> {
9530495309

9530595310
<ol>
9530695311
<li>
95307-
<p>If <var>dataHolder</var>.[[OriginClean]] is false and <span>surrounding agent</span>'s
95312+
<p>If <var>dataHolder</var>.[[OriginClean]] is false,
95313+
<var>dataHolder</var>.[[AllowSideChannelAttacks]] is false, and <span>surrounding agent</span>'s
9530895314
<span>agent cluster</span>'s <span>allow sidechannel attacks</span> is true, then throw a
9530995315
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p>
9531095316

95311-
<p class="warning">To protect against sidechannel attacks implementations should avoid sharing
95312-
<var>dataHolder</var>.[[BitmapData]], when <var>dataHolder</var>.[[OriginClean]] is false, with
95313-
<span data-x="agent cluster">agent clusters</span> whose <span>allow sidechannel attacks</span>
95314-
is true.</p>
95317+
<p class="warning">To truly protect against sidechannel attacks implementations should avoid
95318+
sharing <var>dataHolder</var>.[[BitmapData]] with <span>surrounding agent</span>'s
95319+
<span>agent cluster</span> under the above conditions.</p>
9531595320
</li>
9531695321

9531795322
<li><p>Set <var>value</var>'s <span data-x="concept-ImageBitmap-bitmap-data">bitmap data</span>

0 commit comments

Comments
 (0)