Closed
Bug 568886
Opened 15 years ago
Closed 15 years ago
Instead of severing the stack in SJOW, function.caller should refuse to return an object from a different compartment
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file)
1.11 KB,
patch
|
gal
:
review+
mrbkap
:
review+
|
Details | Diff | Splinter Review |
Currently we have a hack in SJOW to sever the stack. This is specifically to prevent an attack where arguments.callee.caller.caller eventually reaches a more-privileged object.
In the case of content reaching up to Greasemonkey scripts, .caller.caller eventually reaches an object which has the same principals, but from which too-powerful Greasemonkey APIs are reachable. So a principals check in function.caller would be insufficient.
Instead, we should put Greasemonkey in a separate compartment (bug 568885) and make .caller return null rather than return a function object from another compartment.
Comment 1•15 years ago
|
||
Abso-freaking-lutely -- how did we live with this for so long? f.caller was censored in the old days of Netscape 4 signed scripts/applets.
Great to see this getting fixed.
/be
Assignee | ||
Comment 2•15 years ago
|
||
Like so. But since Gecko does not actually put objects with different principals in different compartments yet, this patch is not yet safe to land.
Assignee: general → jorendorff
Updated•15 years ago
|
Attachment #453889 -
Flags: review+
Assignee | ||
Updated•15 years ago
|
Attachment #453889 -
Flags: review?(mrbkap)
Assignee | ||
Comment 3•15 years ago
|
||
Comment on attachment 453889 [details] [diff] [review]
v1
Actually, um -- can we land this now? I think the security check has been redundant for some time. The stack-severing code in SJOW is sufficient for now, and the new check added here will be sufficient when Gecko is properly compartmentalized.
Comment 4•15 years ago
|
||
Comment on attachment 453889 [details] [diff] [review]
v1
Yeah, we should be able to land this now.
Attachment #453889 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Whiteboard: [fixed-in-tracemonkey]
Comment 6•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•