Closed Bug 2069269 Opened 21 days ago Closed 20 days ago

Crashes with TubeDigger

Categories

(External Software Affecting Firefox :: Other, defect)

defect

Tracking

(firefox157 fixed)

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: yannis, Assigned: yannis)

References

Details

Crash Data

Attachments

(1 file)

In bug 1930472 we have blocked TubeDigger DLLs, but only up to version 1.5.9.0 and only in content processes. But we get crashes in the parent process too, including with more recent versions. More recently, :calixte has pinged me about signature tbdghook64.dll | mozilla::SandboxBroker::LaunchApp which has some volume in Nightly, also in parent processes.

https://www.tubedigger.com/contact.html has the following info:

If you have any questions or suggestions please send email to support@tubedigger.com or tubedigger@ukr.net

So regarding the new signature, they are injecting into our processes and using very unsafe ways to get called at the ResumeThread call point during our SandboxBroker::LaunchApp calls. This allows them to alter a child process while its main thread is still suspended.

The most unsafe part is that they have heuristics in place to recover where the compiler stored the process handle and the executable name for the child process in SandboxBroker::LaunchApp. This is very unreliable and crash-prone, can change with every build, and requires maintenance over time. Applying these heuristics to Nightly 157 currently results in crashes.

I suggest we block existing versions of the DLL (latest is 1.8.2.0) and contact the developers, asking to at least remove the part that tries to recover our variables. They can already safely get the thread ID because this part is stable (it is always the first argument to ResumeThread), from there they should be able to get away with GetProcessIdOfThread, OpenProcess, QueryFullProcessImageNameW, NtQueryInformationProcess and/or ProcessCommandLineInformation without having to use the crash-prone heuristics.

That sounds like a good plan to me.

Severity: -- → S3

Regarding the LoadLibraryExW crash, I believe this could be caused by their remote thread creation code. It appears to only wait for less than two seconds before freeing critical memory that the remote thread needs. I'll contact them with the details.

Note that I'm not sure our block will work, what they're doing may be bypassing the blocklist already, but we can try and see.

Widen the existing content process block to all processes and to all
known affected versions. TubeDigger injects TbdgHook[64].dll into
Firefox and patches xul.dll code using hardcoded byte patterns and stack
frame offsets. These can break whenever Firefox is rebuilt, and now
crash the browser process within seconds of startup. A second failure
mode crashes on remote thread injection.

Assignee: nobody → yjuglaret
Status: NEW → ASSIGNED
Pushed by yjuglaret@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/463493a047c1 https://hg.mozilla.org/integration/autoland/rev/ae142363a353 Block TubeDigger DLLs up to version 1.8.2.0 in all processes. r=gstoll,win-reviewers
Status: ASSIGNED → RESOLVED
Closed: 20 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: