3 ms·
tl;dr: a certain GIF would crash a Chrome tab, but only when the desktop version of Grammarly was installed. (Not a Chrome extension.) That's insane! Can anyo
by crazygringo 3y ago
tl;dr: a certain GIF would crash a Chrome tab, but only when the desktop version of Grammarly was installed. (Not a Chrome extension.)
That's insane!
Can anyone think by what possible mechanism the installation of Grammarly could affect whether a .gif file would crash Chrome?
The company seems to be on Macs since they report that the problem doesn't surface in Safari.
Is there some kind of dynamically-linked GIF decoding library used by macOS that Chrome relies upon, and Grammarly somehow installs one that takes precedence for all applications? I didn't think this would be possible -- I thought image decoding was done natively in the browser and not outsourced to the OS, for security reasons.
- saagarjha 3y agoThis would be strange since macOS should not let Chrome load libraries that aren’t signed by Google.
- masswerk 3y agoMaybe, the GIF contains a text comment and Grammarly not only accesses this, but also alters it (for whatever reason), thus overwriting the file in a way in memory that offsets in the GIF file or its in-memory representation are violated?
- mike_hearn 3y agoIt's not an uncommon problem unfortunately. On Windows the OS lets programs inject DLLs into each other's address spaces, and this is actually a very common programming technique for various reasons. Apps don't expect it to happen of course, and so this is a fertile field of bugs. Chrome does in fact attempt to block some apps from doing this because they're known to cause crashes. You can see the blacklist here: https://source.chromium.org/chromium/chromium/src/+/main:chrome/chrome_elf/third_party_dlls/hardcoded_blocklist.cc;l=19?q=inject%20blocklist&ss=chromium%2Fchromium%2Fsrc https://source.chromium.org/chromium/chromium/src/+/main:chr... They don't like apps doing it but you can apply for an exception: https://sites.google.com/a/chromium.org/dev/Home/third-party-developers https://sites.google.com/a/chromium.org/dev/Home/third-party... So my guess is that Grammarly is injecting code into other processes, probably to try and gain access to their text controls so it can Grammarlyze stuff, and somewhere along the line corrupts the heap or stack in some way. The GIF aspect might be a red herring, as the crash was IIUC never reliably reproducible. Random crashes that happen sometimes but not others is strongly indicative of something being randomly corrupted. Or it could be something else. Chrome moved to blocking third party injects by default some time ago, so maybe that's also a red herring.