@@ -23,11 +23,11 @@ is further reduced.
23
23
## Monitoring Another Origin's Tasks ## {#sec-security-monitoring-tasks}
24
24
25
25
<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.
31
31
32
32
Because a thread within a UA can only run tasks from one event loop at a time,
33
33
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
65
65
how long they've been starved. Using a dynamic scheme increases the set of potential
66
66
task which in turn decreases the fidelity of the information.
67
67
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.
77
80
78
81
** What Mitigations are Possible?** <br />
79
82
There are mitigations that implementers can consider to minimize the risk:
0 commit comments