Friday, November 7, 2008

Sandbox woes with injected dlls

One of the interesting things about the Chromium sandbox is that on Windows, there are a lot of random dlls that can load into the sandboxed process. They fall into 4 categories:

  • Malware : Yeah that funny powerpoint that you aunt send you had extra fun inside.
  • Anti-Malware : You pay a private outfit for protection, just like Chicago 1920's
  • Power tool: Yeah so you can burn a CD from *any* app. How convenient. Sigh.
  • Games: You cannot be that good; the game need to spy on all your processes to see if you are getting help.

The outcome of these injected dlls  trying to run in the Chromium sandbox invariably is one of the following:
a) Can't do anything so it exits, leaking memory of some some shared resource.
b) Can't do anything and it was not expecting that so it crashes the process.
c) Can't do anything so it lingers, bidding time to do a) or b) at a later time.

So how ofter these injected dlls cause crashes? Well, it turns out a lot. A whole lot. Apparently most people have one or more of these applications.

There are solutions, but is hard to do one that scales. I might go into that at some point.

A better questions is why are these application injecting dlls in all the user's processes? I don't think there is a definitive answer but I'll try to tackle that in the next post.