Crash in CallHookWithSEH
Categories
(External Software Affecting Firefox :: Other, defect, P3)
Tracking
(firefox-esr52 wontfix, firefox-esr102 wontfix, firefox55 wontfix, firefox56- wontfix, firefox57 wontfix, firefox58 wontfix, firefox113 wontfix, firefox114 wontfix, firefox115 wontfix, firefox149 fixed)
People
(Reporter: philipp, Assigned: gstoll)
References
(Blocks 1 open bug)
Details
(Keywords: crash, regression, topcrash, Whiteboard: [main process crash][inj+])
Crash Data
Attachments
(2 files)
Comment 1•8 years ago
|
||
| Reporter | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Updated•8 years ago
|
Comment 4•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 6•8 years ago
|
||
Updated•8 years ago
|
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
Updated•8 years ago
|
Comment 10•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 13•8 months ago
|
||
This is pretty low volume now, downgrading to S4.
Comment 14•3 months ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 20 desktop browser crashes on beta
:gstoll, could you consider increasing the severity of this top-crash bug?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 15•2 months ago
|
||
This newer batch of crashes seem to be associated with third-party modules published by either Idera, Inc. (which seems to be a database product) or Intuit (seemingly associated with Quickbooks). They are x86-only parent process crashes, and they seem to be stack overflows. Thunderbird has been seeing these for a while I think (see bug 1771815).
I'm not opposed to blocking some things here, but in both of these cases there are a bunch of modules loaded, so we should try to figure out which one is a good one to block.
| Assignee | ||
Comment 16•2 months ago
|
||
OK, new theory: these recent round of crashes seem to have started in 147b6, which is what bug 1998650 got uplifted to. :yannis, is it possible that change is allowing some modules to load that were previously not able to?
Comment 17•2 months ago
•
|
||
These are not stack overflows but rather Control Flow Guard fast-fail failures, which use the same error code. The call stack is:
ntdll!RtlFailFast2
ntdll!RtlpHandleInvalidUserCallTarget+0x93
ntdll!RtlDispatchException+0x56c41
ntdll!KiUserExceptionDispatcher+0xf
ntdll!LdrpValidateUserCallTargetBitMapCheck
user32!DispatchHookW+0xcd
user32!CallHookWithSEH+0x59
user32!__fnHkINDWORD+0x26
ntdll!KiUserCallbackDispatcher+0x36
win32u!NtUserPeekMessage+0xc
user32!_PeekMessage+0xeb
user32!PeekMessageW+0x1b1
xul!mozilla::widget::WinUtils::WaitForMessage+0x99
I am very confident that this crash occurs when a DLL sets up a hook with SetWindowsHookEx and that hook propagates to our threads, if that DLL hasn't been compiled with /cf:guard. Notably, if a program calls it with dwThreadId to 0, that will install the hook on all existing threads running in the same desktop as the calling thread per the documentation. The developers might be doing that without realizing the impact -- in any case, we would need to figure out which DLLs are doing these calls, and block them. So far I have found that pattern being used in evpComponentsXE.bpl and I would thus recommend blocking it (more details about that investigation below).
As for the link to bug 1998650, probably? Perhaps if Firefox 32-bit was previously loading an outdated-enough version of the runtime DLLs from the SysWOW64 directory, that might have resulted in Control Flow Guard getting somehow unenforced for our processes, and now that we load up-to-date DLLs the mitigation would be active again? This would deserve further investigation, but the crash volume does have the pattern of a new issue affecting old software, so likely linked to a change on our side, and that change is indeed a good candidate.
Below are the details for the evpComponentsXE.bpl investigation. I've downloaded the crash dumps and looked for the unusual DLLs being the most present: they are the BPL files signed by Idera, Inc., which are loaded from C:\Program Files (x86)\Sage Evolution and are present in 26 crashes (out of 31) from 8 unique users (based on install_time). But, there are a lot of different BPL files.
Luckily I've found a zip file that contains those BPL files by following this download procedure. The BPL files there are not signed with the same vendor name (maybe due to localization), but they are in the same version, so close enough for investigating. These are Delphi packages, and as suspected they don't have the CF Guard tables like our binaries do, this can be confirmed by comparing the output of dumpbin /loadconfig for mozglue.dll and e.g. evpComponentsXE.bpl.
Then I created the dependency graph between these DLLs and realized that the ones that start with evp are among the most top-level DLLs in that regard. I compared that to the files that import SetWindowsHookExW and confirmed the use of a zero dwThreadId by evpComponentsXE.bpl -- the other .bpl are just its (long list of) dependencies.
Comment 18•2 months ago
•
|
||
(In reply to Yannis Juglaret [:yannis] from comment #17)
I've downloaded the crash dumps and looked for the unusual DLLs being the most present: they are the BPL files signed by
Idera, Inc., which are loaded fromC:\Program Files (x86)\Sage Evolutionand are present in 26 crashes (out of 31) from 8 unique users (based oninstall_time).
The 5 remaining crashes from 2 unique users are all with Intuit DLLs, so I concurr with comment 15 that Sage Evolution and Intuit are the only impacted software we know of for the moment. We would need to do a similar analysis for Intuit.
Comment 19•2 months ago
•
|
||
I haven't found the 2020 and 2021 versions of the Intuit software (that we have in the crashes), but after looking at the current trial edition, I would say a 90% chance that ui.DLL is the cause (has a call to SetWindowsHookExA with dwThreadId set to 0) and a 10% chance that it is FtuEngine.dll (has calls to SetWindowsHookExA that pass in the result of GetWindowThreadProcessId -- most likely called on their own windows which would be fine). We might want to block both to be sure.
| Assignee | ||
Comment 20•2 months ago
|
||
Updated•2 months ago
|
Comment 21•2 months ago
|
||
Comment 22•2 months ago
|
||
| bugherder | ||
Description
•