Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making WeakMap security not depending on HIDDEN_NAME being neither unguessable nor undiscoverable #19

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

In this patch:
* I define LeakyWeakMaps (implemented with a key/value arrays pair)
* I replace the 2 key/values array pairs (hidden record and leaky weakmap for 
non-extensible objects) by LeakyWeakMaps

A natural consequence for hidden records is that the API they expose is the one 
of a weak map. If an attacker comes to know HIDDEN_NAME, the authority she's 
granted (with an object 'o' having HIDDEN_NAME as property) is equivalent to 
having access to a weakmap which keys are weakmaps using o as key.
Consequently, unless an attacker knows already some weakmaps that use o as key, 
she cannot do anything useful. In case she does know some of thee weakmaps, she 
cannot do anything more than what she can do with the WeakMap.protoype API, so 
no additional authority is granted.

So, knowing HIDDEN_NAME does not provide more authority than not knowing it.

Original issue reported on code.google.com by bruan...@gmail.com on 14 Jan 2012 at 11:44

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant