Module statics are like unhardened primordials
See original GitHub issuecommons.js mostly exports primordials that will get hardened at lockdown
. However, it also defines and exports some of its own functions such as
which are potentially as global as shared primordials, and which it does not itself harden, or effectively harden by manual freezing. In theory this is not a security problem because these are not actually shared primordials, and should not be implicitly accessible from non-start compartments. This may be correct, but is an unnecessary hazard. Since commons.js must initialize before lockdown
, it cannot actually use harden
to fix this hazard. However, it should manually freeze enough to get the same effect. In particular, uncurryThis
should freeze the function it returns.
I noticed this during https://github.com/endojs/endo/pull/888 which does not itself do anything to fix this hazard, but does propagate this hazard to one additional function.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
See https://github.com/endojs/endo/pull/892
Doesn’t stop
because we could still harden the values of those properties, addressing the immediate point.
What is the status of this?