3 ms·
> PDF.js has fewer security vulnerabilities than desktop PDF readers. You can limit desktop readers with something like AppArmor (no network access, only allow
by okasaki 11y ago
> PDF.js has fewer security vulnerabilities than desktop PDF readers.
You can limit desktop readers with something like AppArmor (no network access, only allowed to read files, only allowed to open *.pdf files, etc). You can't (AFAIK) do that with PDF.js.
- TD-Linux 11y ago>only allowed to read files You just let through the vulnerability in PDF.js.
- deleted 11y ago[deleted]
- okasaki 11y agoNo, you give it read-only access to the files it needs (e.g. /usr/) and then everywhere else like /home it can only open *.pdf. Also, no networking.
- TD-Linux 11y agoAppArmor can't do a *.pdf restriction. Even if it could, you still let through access to every pdf on your system. The point here is that the sandboxing needs to be watertight, or it's simply not effective. pdf.js runs in the JS sandbox, but here the file origin checking failed. Placing an OS-level sandbox around it doesn't help unless it is just as tight.