Closed
Bug 547814
Opened 15 years ago
Closed 15 years ago
Workers: Need to call JS_MakeStringImmutable before passing strings across threads?
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | .2-fixed |
status1.9.1 | --- | unaffected |
People
(Reporter: bent.mozilla, Assigned: bent.mozilla)
Details
(Whiteboard: [sg:critical?])
Attachments
(1 file, 1 obsolete file)
737 bytes,
patch
|
jorendorff
:
review+
peterv
:
superreview+
beltzner
:
approval1.9.2.2+
|
Details | Diff | Splinter Review |
Jason pointed this out, need to read https://developer.mozilla.org/En/SpiderMonkey/JSAPI_Reference/JS_THREADSAFE#Sharing_strings_among_threads and do something about it.
Assignee | ||
Updated•15 years ago
|
blocking1.9.2: --- → ?
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #428281 -
Flags: superreview?(jst)
Attachment #428281 -
Flags: review?(jorendorff)
Comment 2•15 years ago
|
||
Sorry for the false alarm. This is already safe. The patch isn't needed.
The string is never really accessible by two threads at once. It's created in one thread and stuck in an event, which is then posted to execute in another thread. Posting the event goes through a lock, so it's a clean hand-off. It's totally safe.
Group: core-security
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Updated•15 years ago
|
Attachment #428281 -
Flags: review?(jorendorff)
Assignee | ||
Updated•15 years ago
|
Attachment #428281 -
Flags: superreview?(jst)
Assignee | ||
Comment 3•15 years ago
|
||
Thanks!
Updated•15 years ago
|
Group: core-security
Comment 4•15 years ago
|
||
Ben called and said there was a security problem after all. Hiding bug and reopening until it gets figured out.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Assignee | ||
Comment 5•15 years ago
|
||
Trunk and 1.9.2 only.
Attachment #428281 -
Attachment is obsolete: true
Attachment #428462 -
Flags: superreview?(jst)
Attachment #428462 -
Flags: review?(jorendorff)
Comment 6•15 years ago
|
||
Comment on attachment 428462 [details] [diff] [review]
Patch
That's the right fix. Good catch.
Attachment #428462 -
Flags: review?(jorendorff) → review+
Updated•15 years ago
|
Attachment #428462 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 7•15 years ago
|
||
Comment on attachment 428462 [details] [diff] [review]
Patch
Super simple fix, we either need to take this or back the string sharing out before we ship the next 1.9.2 release.
Attachment #428462 -
Flags: approval1.9.2.2?
Comment 8•15 years ago
|
||
Needs to bake on mozilla-central before we can take it on 1.9.2, doesn't it?
Assignee | ||
Comment 9•15 years ago
|
||
Neither jst nor I think it's necessary in this case (it's too simple) but I am certainly ok waiting as long as we make this block 1.9.2.2. Just don't want to forget to land it before we ship!
Assignee | ||
Comment 10•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Attachment #428462 -
Flags: approval1.9.2.2? → approval1.9.2.2+
Comment 11•15 years ago
|
||
Comment on attachment 428462 [details] [diff] [review]
Patch
a1922=beltzner
Assignee | ||
Comment 12•15 years ago
|
||
blocking1.9.2: ? → ---
status1.9.2:
--- → .2-fixed
Comment 13•15 years ago
|
||
Do we need a test for this?
I don't see any way for QA to verify here.
Comment 14•15 years ago
|
||
(In reply to comment #13)
> Do we need a test for this?
>
> I don't see any way for QA to verify here.
Ben, any comments?
Assignee | ||
Comment 15•15 years ago
|
||
Hm, not sure we can really test this... This code is hit for every single message sent to a worker now, so the code in question is definitely hit. We didn't crash in the tests before and we don't now so I'm not sure what to do. I'd just not worry about it.
Comment 16•15 years ago
|
||
Doesn't this problem apply to 1.9.1 as well?
What are the potential security risks here? If it's causing crashes that sounds like memory corruptions (sg:critical) but since you weren't able to actually cause crashes maybe not?
Assignee | ||
Comment 17•15 years ago
|
||
It's not an issue on 1.9.1 because the string sharing code only landed on trunk and 1.9.2.
Assignee | ||
Comment 18•15 years ago
|
||
(We always copy on 1.9.1, which is safe).
Updated•15 years ago
|
blocking1.9.1: ? → ---
Updated•15 years ago
|
Group: core-security
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•