Potential double free through [@ DocAccessibleParent::RecvMutationEvents]
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
People
(Reporter: decoder, Assigned: Jamie)
Details
(4 keywords, Whiteboard: [adv-main142+r][adv-esr140.2+r][adv-esr128.14+r][adv-esr115.27+r])
Attachments
(5 files)
|
48 bytes,
text/x-phabricator-request
|
tjr
:
sec-approval+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr140+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr128+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
The IPC function DocAccessibleParent::RecvMutationEvents when triggering a ShowEvent receives a tree of AccessibleData that's used to create/arrange a tree of RemoteAccessible objects in DocAccessibleParent::ProcessShowEvent.
The RemoteAccessible parent <-> child relationship is double-linked and this code path does not validate that each child only has one parent (there is a MOZ_ASSERT(CheckDocTree()); in place but that's not sufficient as a security check).
When the content process now sends such a broken tree where one child has multiple parents and then sends a HideEvent, eventually RemoteAccessible::Shutdown() will be called twice (once for each parent) on the same RemoteAccessible causing a double free.
| Assignee | ||
Comment 1•9 months ago
|
||
We have an assertion here. We should be able to fix this by adding a null return for an existing parent below that:
if (newProxy->RemoteParent()) {
return nullptr;
}
This will cause us to fail the operation and return an IPC failure here.
Updated•9 months ago
|
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Comment 3•9 months ago
|
||
| Assignee | ||
Comment 4•9 months ago
|
||
Comment on attachment 9500470 [details]
(secure)
Security Approval Request
- How easily could an exploit be constructed based on the patch?: The patch does hint that there is something amiss when reusing a RemoteAccessible that still has a parent. I'm hoping this looks more like something that could result in broken behaviour, though, rather than a potential security concern.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
- Which branches (beta, release, and/or ESR) are affected by this flaw, and do the release status flags reflect this affected/unaffected state correctly?: all, yes
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: No
- If not, how different, hard to create, and risky will they be?: This patch should apply as is to all branches, but I haven't verified that.
- How likely is this patch to cause regressions; how much testing does it need?: Unlikely; minimal.
- Is the patch ready to land after security approval is given?: Yes
- Is Android affected?: Yes
| Assignee | ||
Updated•9 months ago
|
Updated•9 months ago
|
Comment 5•9 months ago
|
||
Comment on attachment 9500470 [details]
(secure)
Approved to land
Comment 7•9 months ago
|
||
Updated•9 months ago
|
Comment 8•9 months ago
|
||
The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox142towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 9•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D257206
Updated•9 months ago
|
Comment 10•9 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Potential security exploit.
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: not applicable
- Risk associated with taking this patch: low
- Explanation of risk level: Straightforward early return in a place where we already had an assertion.
- String changes made/needed: none
- Is Android affected?: yes
Updated•9 months ago
|
Updated•9 months ago
|
Comment 11•9 months ago
|
||
| uplift | ||
Updated•9 months ago
|
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Comment 12•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D257206
Updated•9 months ago
|
Comment 13•9 months ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined: Potential security exploit.
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: not applicable
- Risk associated with taking this patch: low
- Explanation of risk level: Straightforward early return in a place where we already had an assertion.
- String changes made/needed: none
- Is Android affected?: yes
| Assignee | ||
Comment 14•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D257206
Updated•9 months ago
|
Comment 15•9 months ago
|
||
firefox-esr128 Uplift Approval Request
- User impact if declined: Potential security exploit.
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: not applicable
- Risk associated with taking this patch: low
- Explanation of risk level: Straightforward early return in a place where we already had an assertion.
- String changes made/needed: none
- Is Android affected?: yes
| Assignee | ||
Comment 16•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D257206
Updated•9 months ago
|
Comment 17•9 months ago
|
||
firefox-esr115 Uplift Approval Request
- User impact if declined: Potential security exploit.
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: not applicable
- Risk associated with taking this patch: low
- Explanation of risk level: Straightforward early return in a place where we already had an assertion.
- String changes made/needed: none
- Is Android affected?: yes
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Comment 18•9 months ago
|
||
| uplift | ||
Updated•9 months ago
|
Comment 19•9 months ago
|
||
| uplift | ||
Updated•9 months ago
|
Comment 20•9 months ago
|
||
| uplift | ||
Updated•9 months ago
|
Updated•19 days ago
|
Description
•