Closed
Bug 1300140
Opened 7 years ago
Closed 7 years ago
Crash in InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::DispatchCompositionChangeEvent
Categories
(Core :: Widget, defect)
Tracking
()
VERIFIED
FIXED
mozilla51
People
(Reporter: mccr8, Assigned: m_kato)
References
Details
(Keywords: crash, csectype-bounds, Whiteboard: [sg:dos])
Crash Data
Attachments
(1 file)
1.43 KB,
patch
|
masayuki
:
review+
ritu
:
approval-mozilla-release+
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is report bp-36b47258-a46f-4f20-9788-64ab02160902. ============================================================= I'm not sure what is going on here, but it could be an off-by-one-error. The reports I looked at all had ElementAt(aIndex = 1, aLength = 1).
Updated•7 years ago
|
Group: core-security → layout-core-security
Comment 1•7 years ago
|
||
Calling this sec-moderate on the assumption that these events are based on what the user types and not something a malicious page could trigger directly.
Keywords: csectype-bounds,
sec-moderate
Comment hidden (obsolete) |
Assignee | ||
Comment 3•7 years ago
|
||
Sorry for previous comment. That has invalid. When using mAttributeArray, we allocate 65 length by SetCapacity at least. So even if index = 1 on length = 1, it doesn't occur memory corruption / crash. Also, since this is into IMM code, it will be on Windows XP only. When this occurs, mClauseArray[n] has out of index value of mAttributeArray And its value isn't last of mClauseArray. At least, user need input 65 length character to crash by this issue, and ImmGetCompositionStringW(..., GCS_COMPATTR) has to return unexpected data that you doesn't want.
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
Comment on attachment 8789749 [details] [diff] [review] Return error when IME attribute array doesn't have valid. r?masayuki If the value of non last item of mClauseArray is string length, this issue may occur. Although I think that this may be IME bug, we should check this situation. Nakano-san, I think that returning error may not be good because we already add attributes for all string at this time. should I set eCaret attribute on this situation instead of returning error?
Attachment #8789749 -
Flags: review?(masayuki)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → m_kato
Comment 6•7 years ago
|
||
Comment on attachment 8789749 [details] [diff] [review] Return error when IME attribute array doesn't have valid. r?masayuki I'd like you to use NS_WARN_IF() in the condition. Otherwise, looks good to me.
Attachment #8789749 -
Flags: review?(masayuki) → review+
Assignee | ||
Comment 7•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/facf5812faffa05e6037e96c92a5835d12937966
Comment 8•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/facf5812faff
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Updated•7 years ago
|
Group: layout-core-security → core-security-release
Looks like a top 20 crash in the first day of 50 release. Since this is sec-moderate we can probably wait to fix it in our minor release, 50.1.0, in December. Can you request uplift to mozilla-release? Thanks!
status-firefox50:
--- → affected
tracking-firefox50:
--- → ?
tracking-firefox51:
--- → +
Flags: needinfo?(m_kato)
Tracked for 50. Like Liz said, we can plan to uplift this for 50.1.0
Assignee | ||
Comment 12•7 years ago
|
||
Comment on attachment 8789749 [details] [diff] [review] Return error when IME attribute array doesn't have valid. r?masayuki Approval Request Comment [Feature/regressing bug #]: Bug 1159244 [User impact if declined]: When using Windows XP + 3rd party Chinese IME, Firefox crashes by inputting IME text. [Describe test coverage new/current, TreeHerder]: Landed in m-c (Firefox 51). No report from 51. [Risks and why]: Too low. Originally, this isn't memory corruption because we already allocate enough memory by nsTArray.SetCapacity(). But we forget setting length of array, so array length is unknown. So since length is unknown (it means 0), it causes crash. [String/UUID change made/needed]: None
Flags: needinfo?(m_kato)
Attachment #8789749 -
Flags: approval-mozilla-release?
Updated•7 years ago
|
Crash Signature: [@ InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::DispatchCompositionChangeEvent] → [@ InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::DispatchCompositionChangeEvent]
[@ InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::HandleComposition]
Assignee | ||
Comment 13•7 years ago
|
||
Marco, HandleComposition cause is bug 1300143, not this.
Crash Signature: [@ InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::DispatchCompositionChangeEvent]
[@ InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::HandleComposition] → [@ InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | mozilla::widget::IMMHandler::DispatchCompositionChangeEvent]
Assignee | ||
Comment 14•7 years ago
|
||
s/cause/case/
Comment 15•7 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #13) > Marco, HandleComposition case is bug 1300143, not this. Yes, I meant to add it to that bug (the signature was in bug 1304601, which was duplicated to bug 1300143).
Comment 16•7 years ago
|
||
These intentional crashes don't look exploitable. The rating was considering the severity in the unfixed Fx49 (and maybe ESR-45!) which presumably had the bug but not the self-crash protection.
Comment 17•7 years ago
|
||
Verified with the latest Fx51.0b1 (BuildID:20161115182233) on Windows XP + Simplified Chinese IME, this bug has gone.
Status: RESOLVED → VERIFIED
Comment on attachment 8789749 [details] [diff] [review] Return error when IME attribute array doesn't have valid. r?masayuki This is a 50.0.1 dot release driver. Let's land this on m-r relbranch.
Attachment #8789749 -
Flags: approval-mozilla-release? → approval-mozilla-release+
Comment 19•7 years ago
|
||
FIREFOX_50_0_1_RELBRANCH (50.0.1): https://hg.mozilla.org/releases/mozilla-release/rev/9be70e2394de default (50.1): https://hg.mozilla.org/releases/mozilla-release/rev/4f4eabf6bdd0
Comment 20•7 years ago
|
||
Verified on Fx50.0.1, fixed!
Added to Fx50 release notes as a known issue.
relnote-firefox:
--- → 50+
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•