aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/cache.h
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-03-20 23:51:53 -0700
committerRob Mensching <rob@firegiant.com>2024-03-22 14:25:14 -0700
commit75a8c75d4e02ea219008dc5af7d03869291d61f7 (patch)
treec51a05a3cb878de83a2043e24a4641bddd181495 /src/burn/engine/cache.h
parent2e5960b575881567a8807e6b8b9c513138b19742 (diff)
downloadwix-75a8c75d4e02ea219008dc5af7d03869291d61f7.tar.gz
wix-75a8c75d4e02ea219008dc5af7d03869291d61f7.tar.bz2
wix-75a8c75d4e02ea219008dc5af7d03869291d61f7.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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/burn/engine/cache.h b/src/burn/engine/cache.h
index cc28166e..1ad5d96c 100644
--- a/src/burn/engine/cache.h
+++ b/src/burn/engine/cache.h
@@ -97,6 +97,7 @@ HRESULT CacheEnsureAcquisitionFolder(
97 __in BURN_CACHE* pCache 97 __in BURN_CACHE* pCache
98 ); 98 );
99HRESULT CacheEnsureBaseWorkingFolder( 99HRESULT CacheEnsureBaseWorkingFolder(
100 __in BOOL fElevated,
100 __in BURN_CACHE* pCache, 101 __in BURN_CACHE* pCache,
101 __deref_out_z_opt LPWSTR* psczBaseWorkingFolder 102 __deref_out_z_opt LPWSTR* psczBaseWorkingFolder
102 ); 103 );
@@ -172,11 +173,13 @@ HRESULT CachePreparePackage(
172 __in BURN_PACKAGE* pPackage 173 __in BURN_PACKAGE* pPackage
173 ); 174 );
174HRESULT CacheBundleToCleanRoom( 175HRESULT CacheBundleToCleanRoom(
176 __in BOOL fElevated,
175 __in BURN_CACHE* pCache, 177 __in BURN_CACHE* pCache,
176 __in BURN_SECTION* pSection, 178 __in BURN_SECTION* pSection,
177 __deref_out_z_opt LPWSTR* psczCleanRoomBundlePath 179 __deref_out_z_opt LPWSTR* psczCleanRoomBundlePath
178 ); 180 );
179HRESULT CacheBundleToWorkingDirectory( 181HRESULT CacheBundleToWorkingDirectory(
182 __in BOOL fElvated,
180 __in BURN_CACHE* pCache, 183 __in BURN_CACHE* pCache,
181 __in_z LPCWSTR wzExecutableName, 184 __in_z LPCWSTR wzExecutableName,
182 __in BURN_SECTION* pSection, 185 __in BURN_SECTION* pSection,