aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/engine.cpp
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/engine.cpp
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/engine.cpp')
-rw-r--r--src/burn/engine/engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp
index b093ec9b..79e6aab4 100644
--- a/src/burn/engine/engine.cpp
+++ b/src/burn/engine/engine.cpp
@@ -525,7 +525,7 @@ static HRESULT RunUntrusted(
525 } 525 }
526 else 526 else
527 { 527 {
528 hr = CacheBundleToCleanRoom(&pEngineState->cache, &pEngineState->section, &sczCachedCleanRoomBundlePath); 528 hr = CacheBundleToCleanRoom(pEngineState->internalCommand.fInitiallyElevated, &pEngineState->cache, &pEngineState->section, &sczCachedCleanRoomBundlePath);
529 ExitOnFailure(hr, "Failed to cache to clean room."); 529 ExitOnFailure(hr, "Failed to cache to clean room.");
530 530
531 wzCleanRoomBundlePath = sczCachedCleanRoomBundlePath; 531 wzCleanRoomBundlePath = sczCachedCleanRoomBundlePath;