dll-syringe icon indicating copy to clipboard operation
dll-syringe copied to clipboard

Attempting to inject dll into firefox causes panic

Open radiantly opened this issue 6 months ago • 4 comments

assertion failed: !injected_module_handle.is_null()
# ...
3: dll_syringe::syringe::LoadLibraryWStub::call
             at dll-syringe-0.17.0\src\syringe.rs:420
4: dll_syringe::syringe::Syringe::inject<ref$<std::path::Path> >
             at dll-syringe-0.17.0\src\syringe.rs:148
5: dll_syringe::syringe::Syringe::find_or_inject<std::path::PathBuf>
             at dll-syringe-0.17.0\src\syringe.rs:180

It looks like this assertion is failing: https://github.com/OpenByteDev/dll-syringe/blob/cdea464ed87644eeead76c998c29a02e80310223/src/syringe.rs#L417-L420

radiantly avatar Aug 17 '25 09:08 radiantly

Does the error only happen with your specific dll or also with an empty one?

OpenByteDev avatar Aug 17 '25 10:08 OpenByteDev

Thanks @OpenByteDev for the quick response. Yes, I'm still getting a panic for an empty dll (compiled after removing all functions).

Some additional information:

  • Injecting the original DLL (source) works fine with other apps (chrome, spotify, notepad, etc).
  • I tried injecting a previous version of this dll (built with c++) and can also see a panic (for just firefox).

radiantly avatar Aug 17 '25 11:08 radiantly

@OpenByteDev let me know if you'd like me to create a reproducible example that you could test out on your system

radiantly avatar Aug 18 '25 17:08 radiantly

I can reproduce it, but i have no idea why it does not work. Firefox shouldn't really block it themselves according to https://hacks.mozilla.org/2023/03/letting-users-block-injected-third-party-dlls-in-firefox/.

OpenByteDev avatar Nov 28 '25 17:11 OpenByteDev