Closed Bug 1722566 Opened 3 years ago Closed 3 years ago

Crash in [@ mozilla::FunctionRef<T>::FunctionRef<T>::<T>::__invoke] (Crash Address == 0xe)

Categories

(Core :: mozglue, defect)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox-esr91 --- fixed
firefox90 --- wontfix
firefox91 --- wontfix
firefox92 --- fixed

People

(Reporter: toshi, Assigned: toshi)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/2f280fe3-3eff-4197-97b1-af5c60210726

Reason: EXCEPTION_ACCESS_VIOLATION_READ

Top 10 frames of crashing thread:

0 xul.dll static mozilla::FunctionRef<void  mfbt/FunctionRef.h:180
1 xul.dll static SharedLibraryInfo::GetInfoForSelf tools/profiler/core/shared-libraries-win32.cc:126
2 xul.dll mozilla::Telemetry::BatchProcessedStackGenerator::BatchProcessedStackGenerator toolkit/components/telemetry/other/ProcessedStack.cpp:72
3 xul.dll mozilla::UntrustedModulesProcessor::ProcessModuleLoadQueue toolkit/xre/UntrustedModulesProcessor.cpp:569
4 xul.dll mozilla::UntrustedModulesProcessor::BackgroundProcessModuleLoadQueue toolkit/xre/UntrustedModulesProcessor.cpp:451
5 xul.dll mozilla::detail::RunnableMethodImpl<D3DVsyncSource::D3DVsyncDisplay*, void  xpcom/threads/nsThreadUtils.h:1203
6 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1149
7 xul.dll mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:330
8 xul.dll MessageLoop::RunHandler ipc/chromium/src/base/message_loop.cc:328
9 xul.dll MessageLoop::Run ipc/chromium/src/base/message_loop.cc:310

Seems like we're missing a null check.

Severity: -- → S2

According to https://www.mathies.com/mozilla/crashes/rddrelease.html, this is the top crasher (32%) in RDD.

We had crashes in PEHeaders::FindResourceLeaf where idDir was nullptr. This can
happen when the resource table is modified by a third-party application and an entry
in the table points to somewhere outside the executable.

Pushed by tkikuchi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9e3f7369ddc2
Add null checks in PEHeaders::FindResourceLeaf. r=mhowell
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

I found crashes with the same signature involving SharedLibraryInfo::GetInfoForSelf, but the crashing address is not near-null:

Those need to be fixed, too.

(In reply to Toshihito Kikuchi [:toshi] from comment #5)

Those need to be fixed, too.

Was the plan to reopen this bug or handle them in a follow-up?

I'll open a new bug. Let's keep this bug resolved.

Summary: Crash in [@ mozilla::FunctionRef<T>::FunctionRef<T>::<T>::__invoke] → Crash in [@ mozilla::FunctionRef<T>::FunctionRef<T>::<T>::__invoke] (Crash Address == 0xe)
See Also: → 1723868

Please nominate this for ESR91 approval when you get a chance.

Flags: needinfo?(tkikuchi)

Comment on attachment 9233517 [details]
Bug 1722566 - Add null checks in PEHeaders::FindResourceLeaf. r=mhowell

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This signature was a top crasher of RDD process.
  • User impact if declined: If a third-party application modified the resource table of a loaded module, the process may suddenly crash when we failed to parse the module.
  • Fix Landed on Version: 92
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The fix adds just a couple of null checks and we skip parsing a module if we detect a loaded image was modified.
  • String or UUID changes made by this patch: None
Flags: needinfo?(tkikuchi)
Attachment #9233517 - Flags: approval-mozilla-esr91?

Comment on attachment 9233517 [details]
Bug 1722566 - Add null checks in PEHeaders::FindResourceLeaf. r=mhowell

Approved for 91.1esr.

Attachment #9233517 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: