Skip to content

Commit 0a23970

Browse files
authored
yield: Update security section (WICG#91)
1 parent e6c47f5 commit 0a23970

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

spec/security.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ is further reduced.
2323
## Monitoring Another Origin's Tasks ## {#sec-security-monitoring-tasks}
2424

2525
<div class="non-normative">
26-
The second consideration is whether {{Scheduler/postTask()}} leaks any
27-
information about other origins' tasks. We consider an attacker running on one
28-
origin trying to obtain information about code executing in another origin (and
29-
hence in a separate event loop) that is scheduled in the same thread in a
30-
browser.
26+
The second consideration is whether {{Scheduler/postTask()}} or
27+
{{Scheduler/yield()}} leak any information about other origins' tasks. We
28+
consider an attacker running on one origin trying to obtain information about
29+
code executing in another origin (and hence in a separate event loop) that is
30+
scheduled in the same thread in a browser.
3131

3232
Because a thread within a UA can only run tasks from one event loop at a time,
3333
an attacker might be able to gain information about tasks running in another
@@ -65,15 +65,18 @@ the UA occasionally chooses to run tasks from other task sources depending on
6565
how long they've been starved. Using a dynamic scheme increases the set of potential
6666
task which in turn decreases the fidelity of the information.
6767

68-
{{Scheduler/postTask()}} supports prioritization for tasks scheduled with it.
69-
How these tasks are interleaved with other task sources is also
70-
implementation-dependent, however it might be possible for an attacker to
71-
further reduce the set of potential tasks that can run instead of its own by
72-
leveraging this priority. For example, if a UA uses a simple static
73-
prioritization scheme spanning all event loops in a thread, then using
74-
{{TaskPriority/user-blocking}} {{Scheduler/postTask()}} tasks instead of
75-
{{Window/postMessage(message, options)|postMessage()}} tasks might decrease
76-
this set, depending on their relative prioritization and what is between.
68+
{{Scheduler/postTask()}} and {{Scheduler/yield()}} support prioritization for
69+
the tasks and continuations they schedule. How these tasks are interleaved with
70+
other task sources is also implementation-dependent, however it might be
71+
possible for an attacker to further reduce the set of potential tasks that can
72+
run instead of its own by leveraging this priority. For example, if a UA uses a
73+
simple static prioritization scheme spanning all event loops in a thread, then
74+
using "{{TaskPriority/user-blocking}}" {{Scheduler/postTask()}} tasks or
75+
"{{ContinuationPriority/user-visible}}" and higher priority
76+
{{Scheduler/yield()}} continuations &mdash; which are meant to have a higher
77+
event loop priority &mdash; instead of {{Window/postMessage(message,
78+
options)|postMessage()}} tasks might decrease this set, depending on their
79+
relative prioritization and what runs between.
7780

7881
**What Mitigations are Possible?** <br/>
7982
There are mitigations that implementers can consider to minimize the risk:

0 commit comments

Comments
 (0)