Closed
Bug 436741
(CVE-2008-5014)
Opened 17 years ago
Closed 17 years ago
"Assertion failure: OBJ_IS_NATIVE(obj)" with __proto__ mangling
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: mrbkap)
Details
(5 keywords, Whiteboard: [sg:critical?])
Attachments
(4 files, 1 obsolete file)
146 bytes,
text/html
|
Details | |
6.15 KB,
text/plain
|
Details | |
1.62 KB,
patch
|
brendan
:
review+
dveditz
:
approval1.8.1.18+
samuel.sidler+old
:
approval1.9.0.2+
asac
:
approval1.8.0.next+
|
Details | Diff | Splinter Review |
2.50 KB,
text/plain
|
Details |
Loading the testcase kills Firefox.
Debug:
Assertion failure: OBJ_IS_NATIVE(obj), at /Users/jruderman/central/mozilla/js/src/jslock.cpp:1187
Opt:
Hang.
Security-sensitive for now because I don't know whether this is a memory safety bug in opt builds.
Reporter | ||
Comment 1•17 years ago
|
||
Updated•17 years ago
|
Assignee: general → nobody
Component: JavaScript Engine → XPConnect
OS: Mac OS X → All
QA Contact: general → xpconnect
Hardware: PC → All
Comment 2•17 years ago
|
||
Blake, can you take this one?
/be
Comment 3•17 years ago
|
||
mrbkap's out for a couple, few more weeks still, isn't he?
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → general
Component: XPConnect → JavaScript Engine
QA Contact: xpconnect → general
Assignee | ||
Comment 4•17 years ago
|
||
This seems like an ancient bug dating back to bug 72354 (2001!). The code currently always locks obj2 when it is returned from a newresolve hook. Furthermore, when it finds out that obj2 is not native, it unlocks it. But both js_LockObj and js_UnlockObj (called directly via JS_{UN,}LOCK_OBJ) assert that the given object is native!
The fix proposed here is to not try to lock (or unlock) a non-native object. Note that in this case, the non-native object is a shavarray, but could just as easily be a liveconnect object.
Comment 5•17 years ago
|
||
Comment on attachment 326322 [details] [diff] [review]
Guess
Yeah, this makes sense. Although for liveconnect do we have thread safety issues? For shavarrays my hope is to convert 'em to sparse upon crossing a thread boundary.
/be
Attachment #326322 -
Flags: review?(brendan)
Attachment #326322 -
Flags: review+
Attachment #326322 -
Flags: approval1.9.0.1?
Assignee | ||
Comment 6•17 years ago
|
||
Looking further down the loop shows that if the non-native object fails to resolve the id, we'll try to unlock the non-native obj2.
Attachment #326322 -
Attachment is obsolete: true
Attachment #326444 -
Flags: review?(brendan)
Attachment #326322 -
Flags: approval1.9.0.1?
Comment 7•17 years ago
|
||
Comment on attachment 326444 [details] [diff] [review]
Better
Glad someone's looking!
/be
Attachment #326444 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 8•17 years ago
|
||
Fix pushed as changeset 8eac0738eaab.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•17 years ago
|
||
Comment on attachment 326444 [details] [diff] [review]
Better
Yeah. I think this is necessary for the array prototype functions getting "this" wrong bug.
Attachment #326444 -
Flags: approval1.9.0.1?
Updated•17 years ago
|
Attachment #326444 -
Flags: approval1.9.0.1? → approval1.9.0.2?
Comment 11•17 years ago
|
||
Comment on attachment 326444 [details] [diff] [review]
Better
Approved for 1.9.0.2. Please land in CVS. a=ss
Attachment #326444 -
Flags: approval1.9.0.2? → approval1.9.0.2+
Comment 12•17 years ago
|
||
Updated•17 years ago
|
Flags: in-testsuite+
Flags: in-litmus-
Comment 14•17 years ago
|
||
verified fixed 1.9.0/trunk linux/mac/win.
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.0.2 → verified1.9.0.2
Updated•16 years ago
|
Flags: wanted1.8.1.x+
Flags: blocking1.8.1.18+
Whiteboard: [sg:critical?] not fixed on 1.8 yet, hold advisory.
Assignee | ||
Comment 15•16 years ago
|
||
Comment on attachment 326444 [details] [diff] [review]
Better
This applies cleanly to the 1.8 branch.
Attachment #326444 -
Flags: approval1.8.1.18?
Comment 16•16 years ago
|
||
Comment on attachment 326444 [details] [diff] [review]
Better
Approved for 1.8.1.18, a=dveditz for release-drivers
Attachment #326444 -
Flags: approval1.8.1.18? → approval1.8.1.18+
Assignee | ||
Comment 17•16 years ago
|
||
Fixed on the 1.8 branch too (although it isn't showing up in bonsai, probably because I hit ctl+c in the middle of checking in).
Keywords: fixed1.8.1.18
Updated•16 years ago
|
Attachment #326444 -
Flags: approval1.8.0.15+
Comment 19•16 years ago
|
||
Comment on attachment 326444 [details] [diff] [review]
Better
a=asac for 1.8.0
Updated•16 years ago
|
Alias: CVE-2008-5014
Updated•16 years ago
|
Group: core-security
Comment 20•16 years ago
|
||
test landed http://hg.mozilla.org/mozilla-central/rev/dcddc30c2960 and cvs
Updated•16 years ago
|
Flags: wanted1.9.0.x? → wanted1.9.0.x+
Updated•16 years ago
|
Whiteboard: [sg:critical?] not fixed on 1.8 yet, hold advisory. → [sg:critical?]
You need to log in
before you can comment on or make changes to this bug.
Description
•