diff options
author | Rob Mensching <rob@firegiant.com> | 2024-03-20 23:51:53 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-03-22 11:57:27 -0700 |
commit | fed3d69eb4da7fa2bafdd8f555ce5869c36925f7 (patch) | |
tree | cb9bd56e7a36f118da7ad44107018b86a30fbdae /src/burn/engine/cache.h | |
parent | e84b6768772c01e44dd55fb583cf78388ec7e48a (diff) | |
download | wix-fed3d69eb4da7fa2bafdd8f555ce5869c36925f7.tar.gz wix-fed3d69eb4da7fa2bafdd8f555ce5869c36925f7.tar.bz2 wix-fed3d69eb4da7fa2bafdd8f555ce5869c36925f7.zip |
Protect elevated working folder from malicious data
When running elevated, Burn uses the Windows Temp folder as its working folder
to prevent normal processes from tampering with the files. Windows Temp does
allow non-elevated processes to write to the folder but they cannot see the
files there. Unfortunately, contrary to our belief, non-elevated processes
can read the files in Windows Temp by watching for directory changes. This
allows a malicious process to lie in wait, watching the Windows Temp folder
until a Burn process is launched elevated, then attack the working folder.
Mitigate that attack by protecting the working folder to only elevated users.
Managed custom actions also fall back to using the Windows Temp folder in
some cases and thus can be exposed in a similar fashion as an elevated Burn
process. Remove that possibility.
Diffstat (limited to 'src/burn/engine/cache.h')
-rw-r--r-- | src/burn/engine/cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/burn/engine/cache.h b/src/burn/engine/cache.h index 3f0ba749..7c4dfaa1 100644 --- a/src/burn/engine/cache.h +++ b/src/burn/engine/cache.h | |||
@@ -96,6 +96,7 @@ HRESULT CacheEnsureAcquisitionFolder( | |||
96 | __in BURN_CACHE* pCache | 96 | __in BURN_CACHE* pCache |
97 | ); | 97 | ); |
98 | HRESULT CacheEnsureBaseWorkingFolder( | 98 | HRESULT CacheEnsureBaseWorkingFolder( |
99 | __in BOOL fElevated, | ||
99 | __in BURN_CACHE* pCache, | 100 | __in BURN_CACHE* pCache, |
100 | __deref_out_z_opt LPWSTR* psczBaseWorkingFolder | 101 | __deref_out_z_opt LPWSTR* psczBaseWorkingFolder |
101 | ); | 102 | ); |
@@ -171,6 +172,7 @@ HRESULT CachePreparePackage( | |||
171 | __in BURN_PACKAGE* pPackage | 172 | __in BURN_PACKAGE* pPackage |
172 | ); | 173 | ); |
173 | HRESULT CacheBundleToWorkingDirectory( | 174 | HRESULT CacheBundleToWorkingDirectory( |
175 | __in BOOL fElvated, | ||
174 | __in BURN_CACHE* pCache, | 176 | __in BURN_CACHE* pCache, |
175 | __in_z LPCWSTR wzExecutableName, | 177 | __in_z LPCWSTR wzExecutableName, |
176 | __in BURN_SECTION* pSection, | 178 | __in BURN_SECTION* pSection, |