Commit 8a90ca3
committed
docs(ses): document Compartment availability and OOM limits (#2742)
Adds a Limitations section to docs/lockdown.md describing three classes
of threat that a Compartment cannot mitigate, all intrinsic to running
multiple compartments inside a single JavaScript agent.
Availability: every compartment shares the agent's single thread, so a
guest that enters a non-terminating synchronous computation (an infinite
loop, runaway recursion, or any other unresponsive synchronous call,
including via a property accessor, proxy trap, or synchronously-resolved
`then` callback) denies progress to every sibling and to the start
compartment until the engine intervenes. Host code that wants to remain
available must interact with guest objects across an asynchronous
boundary, or run the guest in a separate worker or process where it can
be terminated.
Memory exhaustion: the ECMAScript specification does not require an
engine to abort the agent on OOM (see the TC39 OOM-fails-fast proposal),
so a malicious compartment can intentionally exhaust memory and surface
a `RangeError` or other allocation failure inside an unrelated
synchronous call, including one into an object exported from another
compartment. The victim is then left in a partially updated state,
turning the availability concern into an integrity concern on otherwise
trusted exports.
Timing side-channels: the default Compartment deliberately excludes
`Date`, `performance.now`, `setTimeout`, `setImmediate`, and every other
host scheduling primitive, but any asynchronous boundary the guest can
drive (another worker, another process, a network peer, a host-supplied
promise resolved on a host-driven schedule) recovers wall-clock duration
from the round-trip. Defeating timing side-channels therefore requires
auditing every reachable async boundary, not just enumerating timer-like
APIs; the host's mitigation menu includes running the suspect guest in a
separate worker or process, throttling outbound message rate, and
padding guest-visible message delivery so the round-trip distribution
conveys less about host-internal events. For the broader threat
catalog, the section cites Agoric's Taxonomy of Security Issues paper.
The new section is cross-linked from packages/ses/README.md's
Compartment section so readers reach it from the place Compartment is
introduced.
Fixes #27421 parent 814dfa1 commit 8a90ca3
2 files changed
Lines changed: 93 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
0 commit comments