Bug 41017: Tell Nvidia drivers not to create the shader cache.
Merge Info
Related Issues
- tor-browser#xxxxx
- mullvad-browser#xxxxx
- #41017 (closed)
Backporting
Timeline
-
Immediate: patchset needed as soon as possible -
Next Minor Stable Release: patchset that needs to be verified in nightly before backport -
Eventually: patchset that needs to be verified in alpha before backport -
No Backport (preferred): patchset for the next major stable
(Optional) Justification
-
Emergency security update: patchset fixes CVEs, 0-days, etc -
Censorship event: patchset enables censorship circumvention -
Critical bug-fix: patchset fixes a bug in core-functionality -
Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc -
Sponsor required: patchset required for sponsor -
Other: please explain - Not a critical bug fix, but still a disk leak (more or less, see the description) that could be easily avoided.
Issue Tracking
-
Link resolved issues with appropriate Release Prep issue for changelog generation
Review
Request Reviewer
-
Request review from an applications developer depending on modified system: -
NOTE: if the MR modifies multiple areas, please
/cc
all the relevant reviewers (since gitlab only allows 1 reviewer) - accessibility : henry
- android : clairehurst, dan
- build system : boklm
- extensions : ma1
- firefox internals (XUL/JS/XPCOM) : ma1
- fonts : pierov
- frontend (implementation) : henry
- frontend (review) : donuts, richard
- localization : henry, pierov
- macos : clairehurst, dan
- nightly builds : boklm
- rebases/release-prep : dan, ma1, pierov, richard
- security : ma1
- signing : boklm, richard
- updater : pierov
- misc/other : pierov, richard
-
NOTE: if the MR modifies multiple areas, please
See also testing requirements.
Change Description
While checking ma1's fix for .local/share
, I've noticed I have a .cache
directory, with two children: fontconfig
and nvidia
.
I think fontconfig
is innocuous (but I haven't checked), whereas the nvidia
directory has shader caches, that are created by the driver, which doesn't care of PBM.
I don't think all the cache is bad (e.g., it shouldn't be a problem for shaders used by the browser). However, I fear it might leak some sites that use WebGL and have peculiar shaders.
The cache itself is a mixed of binary and a sort of assembly in ASCII. I think comments and other possible precise references to origins of these shaders are removed. So, I think this cache would be very difficult to exploit, but it's also very easy to disable, so we could just do it.
How Tested
Hardware requirement: an Nvidia GPU.
- deleted the
Browser/.cache/nvidia
directory - launched Tor Browser with an unpatched script
- noticed that even just launching Tor Browser creates shader cache (no WebGL needed, which makes sense, since acceleration is used for rendering if available in any case, AFAIK)
- closed Tor Browser
- defined the variable I'm adding in my local shell
- started Tor Browser again
- noticed that the
.cache/nvidia
directory is not created