Closed Bug 643450 Opened 14 years ago Closed 14 years ago

Problem with nsJSContext::CallEventHandler

Categories

(Core :: Security, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5
Tracking Status
blocking2.0 --- .x+
status2.0 --- ?
blocking1.9.2 --- .20+
status1.9.2 --- .20-fixed
status1.9.1 --- wanted

People

(Reporter: moz_bug_r_a4, Assigned: mrbkap)

References

Details

(Keywords: regression, Whiteboard: [sg:critical][qa-examined-192][qa-needs-STR])

Attachments

(2 files)

In nsJSContext::CallEventHandler, after popping a principal, when converting rval to variant, we access properties of rval if rval is an array. Thus, it's possible to call a native function without a frame or a pushed principal, in which case a result of nsScriptSecurityManager::IsCapabilityEnabled() is true.
Probably needs .x+ blocking. I can't seem to get the problem to happen with 3.6. Is this trunk-only?
blocking2.0: --- → ?
The Pop is there even in 1.9.0.x
(In reply to comment #2) > I can't seem to get the problem to happen with 3.6. Is this trunk-only? On 1.9.2/1.9.1, only fast native functions can be called without a frame. I think that if there is a fast native function that can be used for doing evil things, 1.9.2/1.9.1 could be affected.
blocking1.9.1: --- → ?
blocking1.9.2: --- → ?
Basically, this bug's intention is to circumvent the fix for bug 614151 (though I can't see that bug). Is bug 614151 trunk-only?
Ah, that looks like trunk only.
blocking2.0: ? → .x+
I CC'd you to bug 614151.
Assignee: nobody → mrbkap
Blocks: 614151
blocking1.9.1: ? → ---
blocking1.9.2: ? → ---
Keywords: regression
Whiteboard: [sg:critical]
Attached patch Proposed fixSplinter Review
I'm not adding a testcase for this bug since it uses the Array.prototype.shift trick.
Attachment #523429 - Flags: review?(peterv)
Attachment #523429 - Flags: review?(peterv) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Per security group discussion, requesting landing on mozilla-2.0.
status2.0: --- → ?
Attachment #523429 - Flags: approval2.0?
Attached patch 1.9.2 patchSplinter Review
Attachment #537630 - Flags: review?(jst)
Attachment #537630 - Flags: approval1.9.2.18?
Attachment #537630 - Flags: review?(jst) → review+
blocking1.9.2: --- → ?
blocking1.9.2: ? → .18+
Comment on attachment 537630 [details] [diff] [review] 1.9.2 patch Approved for 1.9.2.18, a=dveditz for release-drivers
Attachment #537630 - Flags: approval1.9.2.18? → approval1.9.2.18+
blocking1.9.2: .18+ → .19+
Comment on attachment 537630 [details] [diff] [review] 1.9.2 patch Guess this didn't make 3.6.18 -- next time.
Attachment #537630 - Flags: approval1.9.2.19+
Attachment #537630 - Flags: approval1.9.2.18-
Attachment #537630 - Flags: approval1.9.2.18+
Comment on attachment 523429 [details] [diff] [review] Proposed fix Approved for the mozilla2.0 repository, a=dveditz for release-drivers
Attachment #523429 - Flags: approval2.0? → approval2.0+
Blake, can you land this on 1.9.2, please?
(In reply to moz_bug_r_a4 from comment #1) > Created attachment 520663 [details] > testcase - arbitrary code execution On 1.9.2.18 on XP, loading this testcase over the net or locally does not cause any issues (or any real behavior at all). We just get a blank iframe. Was the bad behavior ever actually seen on 1.9.2?
Whiteboard: [sg:critical] → [sg:critical][qa-examined-192][qa-needs-STR]
https://bugzilla.mozilla.org/show_bug.cgi?id=650252#c6 references this bug. Are the exploits related as that one is definitely fixed and can be verified.
(In reply to Al Billings [:abillings] from comment #17) > Was the bad behavior ever actually seen on 1.9.2? No, the testcase did not work on 1.9.2.
Group: core-security
Target Milestone: --- → mozilla5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: