Crash in [@ mozilla::dom::indexedDB::KeyPath::ExtractKey]
Categories
(Core :: Storage: IndexedDB, defect)
Tracking
()
People
(Reporter: mccr8, Assigned: jari)
References
Details
(4 keywords, Whiteboard: [adv-main152+r][adv-esr115.37+r][adv-esr140.12+r])
Crash Data
Attachments
(4 external files)
Crash report: https://crash-stats.mozilla.org/report/index/d5f57c1f-d0ea-4d72-854e-3fd0d0260525
This crash signature has shown up recently on Nightly, first in the 20260523100109 build (though the volume is low enough we can't be sure that's anything was introduced there). About half of these crashes are on poison values, indicating a use-after-free, but around half of the use-after-free crashes are on family 6 model 183 stepping 1 CPUs so maybe the poison crash part is just hardware failures?
I'm not sure how actionable this is. The ones I looked at all had DeserializeIndexValueHelper::Run() in the stack. The thing to check would be if something in here is following a weak pointer.
Reason:
EXCEPTION_ACCESS_VIOLATION_READ
Top 10 frames:
0 xul.dll nsTArray_base<nsTArray_RelocateUsingMemutils>::Length() const xpcom/ds/nsTArray.h:365
0 xul.dll mozilla::dom::indexedDB::KeyPath::ExtractKey(JSContext*, JS::Value const&, mo... dom/indexedDB/KeyPath.cpp:332
1 xul.dll mozilla::dom::IDBObjectStore::AppendIndexUpdateInfo(long long, mozilla::dom::... dom/indexedDB/IDBObjectStore.cpp:623
2 xul.dll mozilla::dom::indexedDB::(anonymous namespace)::DeserializeIndexValueHelper::... dom/indexedDB/ActorsParent.cpp:6646
3 xul.dll mozilla::RunnableTask::Run() xpcom/threads/TaskController.cpp:719
3 xul.dll mozilla::TaskController::RunTask(mozilla::Task*) xpcom/threads/TaskController.cpp:210
3 xul.dll mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::det... xpcom/threads/TaskController.cpp:1358
4 xul.dll mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detai... xpcom/threads/TaskController.cpp:1181
4 xul.dll mozilla::TaskController::ProcessPendingMTTask(bool) xpcom/threads/TaskController.cpp:655
4 xul.dll mozilla::TaskController::TaskController::<lambda_5>::operator()() const xpcom/threads/TaskController.cpp:347
| Reporter | ||
Comment 1•6 months ago
|
||
It could be some bogus bad CPU thing like I said, but I'll mark it as a regression for now.
Comment 2•6 months ago
|
||
There's a handful of Raptor Lakes in there, but there are also other CPUs so this look like a legit crash.
Comment 3•6 months ago
|
||
The earliest affected build is buildid 20260527085321 but there doesn't seem to be changes to IndexedDB around that date.
| Assignee | ||
Comment 4•6 months ago
|
||
The cause might be the spurious wake ups of condition variables at https://searchfox.org/firefox-main/rev/e28b34ab33dbf49364999070168cbb7e11e8e5bd/xpcom/threads/Monitor.h#35 which is used to wait that the deserialization of the index values on the main thread is done at https://searchfox.org/firefox-main/rev/e28b34ab33dbf49364999070168cbb7e11e8e5bd/dom/indexedDB/ActorsParent.cpp#6708 before returning to connection thread. So when the condVar spuriously wakes up, the code running in the condition thread assumes we're done, the CreateIndexOp and its members go out of scope, releasing keyPath while the main thread is still busy with the deserialization.
| Assignee | ||
Comment 5•6 months ago
|
||
Updated•6 months ago
|
| Reporter | ||
Updated•6 months ago
|
| Reporter | ||
Comment 6•6 months ago
|
||
[Tracking Requested - why for this release]: sec-high regression. Also showing up in Nightly and tree herder (see bug 2041909).
| Assignee | ||
Comment 7•6 months ago
•
|
||
Comment on attachment 9591406 [details]
(secure)
Security Approval Request
- How easily could an exploit be constructed based on the patch?: Trying enough times it will create a UAF, especially on particular hardware.
- 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
- 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?: It will be easy and low risk
- How likely is this patch to cause regressions; how much testing does it need?: The issue is handled via a common idiom, it's not likely to lead to further issues
- Is the patch ready to land after security approval is given?: Yes
- Is Android affected?: Yes
| Reporter | ||
Comment 8•6 months ago
|
||
From some discussion in Slack, it sounds like this is a pre-existing issue and we recently started seeing it much more often due to bug 2015967 affecting timing.
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 10•6 months ago
|
||
Comment 11•6 months ago
|
||
The patch landed in nightly and beta is affected.
:jari, 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-firefox152towontfix.
For more information, please visit BugBot documentation.
Comment 12•6 months ago
|
||
Along with Beta, we'll need ESR140 and ESR115 nominations also.
Updated•6 months ago
|
Updated•6 months ago
|
Comment 13•6 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Security issue
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: Not easy to test manually
- Risk associated with taking this patch: low
- Explanation of risk level: Small change using a standard idiom
- String changes made/needed?: -
- Is Android affected?: yes
| Assignee | ||
Comment 14•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D303306
Comment 15•6 months ago
|
||
firefox-esr115 Uplift Approval Request
- User impact if declined/Reason for urgency: Security issue
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: Not easy to test manually
- Risk associated with taking this patch: low
- Explanation of risk level: Small change using a standard idiom
- String changes made/needed?: -
- Is Android affected?: yes
| Assignee | ||
Comment 16•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D303306
Comment 17•6 months ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined/Reason for urgency: Security issue
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: Not easy to test manually
- Risk associated with taking this patch: low
- Explanation of risk level: Small change using a standard idiom
- String changes made/needed?: -
- Is Android affected?: yes
| Assignee | ||
Comment 18•6 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D303306
Updated•6 months ago
|
Updated•6 months ago
|
Comment 19•6 months ago
|
||
| uplift | ||
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 20•6 months ago
|
||
| uplift | ||
Updated•6 months ago
|
Comment 21•6 months ago
|
||
| uplift | ||
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•2 months ago
|
Description
•