Where exactly does developer responsibility end? Is Every Escape via Endowed Objects a Developer's Fault? #2745
Replies: 2 comments
-
|
Pardon for the delay.
Summarily, yes. For a longer summary, For arrangements where there is a host, the host makes a Compartment, endows the Compartment with some hardened API surface including host modules, then executes arbitrary code in the guest compartment, the host is responsible for ensuring that the endowed objects do not provide an avenue for the guest to escape.
Pardon the hasty response. This is an imprecise first draft of documentation that should be more prominently displayed. |
Beta Was this translation helpful? Give feedback.
-
|
Also, the multiple-guests-in-a-shared-process scenario also creates responsibilities for each guest when handling each other’s hardened APIs. A surprising number of interactions enable the other party to execute on your stack, given that they can use proxies. The one-guest-per-process model is a lot easier to manage, falling back to async message passing between object capabilities over CapTP. The ergonomics are mostly the same as same-process at that point. There are corss-process-GC concerns instead. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While using SES, I’ve found it unclear which responsibilities fall on the developer.
Since SES operates on a Trusted Compute Base (TCB),
issues like out-of-memory (OOM) attacks, which arise from the lack of resource management,
are clearly understandable as being the developer’s responsibility.
However, in browser environments, there are cases that feel more ambiguous.
For example, when using harden() on objects like location, it freezes without error, which may lead the developer to believe it is safe to endow location in its hardened state. (assuming that functions like replace() or assign() have been properly handled)
But due to setters, such as href values can still be mutated.
This allows for sandbox escape via schemes like javascript: or data:.
When I asked about this, I was advised to use an "attenuating membrane" as a solution.
This seems to imply that developers are expected to already understand how harden() interacts with host objects like location,
and to proactively handle such cases themselves.
This leads me to a broader concern: In, Node.js if seemingly harmless objects like console are passed to a compartment,
and sandbox escape becomes possible — not through their directly exposed capabilities, like "private" _ prefixed properties,
but through more subtle mechanisms like error object creation or returned objects. Is this still considered entirely the developer’s fault?
Where exactly does developer responsibility end? I would appreciate any clarification or guidance on this boundary.
Beta Was this translation helpful? Give feedback.
All reactions