diff --git a/History.md b/History.md index 156fbb62e..931f43f91 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,13 @@ +## WixBuild: Version 3.11.2.4516 + +* HeathS: Add support for .NET Foundation signing service + +* RobMen: WIXBUG:6075 - Fix "Zip Slip" vulnerability in DTF. + +## WixBuild: Version 3.11.1.2318 + +* RobMen - WIXBUG:5724 - fix DLL hijack of clean room when bundle launched elevated. + ## WixBuild: Version 3.11.0.1701 * RobMen: WIXBUG:5536 - introduce wix.nativeca.targets to simplify CPP CA projects. diff --git a/src/DTF/Libraries/Compression.Cab/Compression.Cab.csproj b/src/DTF/Libraries/Compression.Cab/Compression.Cab.csproj index cf725598a..0a225dad4 100644 --- a/src/DTF/Libraries/Compression.Cab/Compression.Cab.csproj +++ b/src/DTF/Libraries/Compression.Cab/Compression.Cab.csproj @@ -12,6 +12,7 @@ true v2.0 false + true diff --git a/src/DTF/Libraries/Compression.Zip/Compression.Zip.csproj b/src/DTF/Libraries/Compression.Zip/Compression.Zip.csproj index e4fe7e30b..84dda1a46 100644 --- a/src/DTF/Libraries/Compression.Zip/Compression.Zip.csproj +++ b/src/DTF/Libraries/Compression.Zip/Compression.Zip.csproj @@ -11,6 +11,7 @@ Microsoft.Deployment.Compression.Zip true v2.0 + true diff --git a/src/DTF/Libraries/Compression/ArchiveFileStreamContext.cs b/src/DTF/Libraries/Compression/ArchiveFileStreamContext.cs index b082a1b9a..b17d3f2a8 100644 --- a/src/DTF/Libraries/Compression/ArchiveFileStreamContext.cs +++ b/src/DTF/Libraries/Compression/ArchiveFileStreamContext.cs @@ -633,6 +633,8 @@ private string TranslateFilePath(string path) } else { + this.ValidateArchivePath(path); + filePath = path; } @@ -647,6 +649,16 @@ private string TranslateFilePath(string path) return filePath; } + private void ValidateArchivePath(string filePath) + { + string basePath = Path.GetFullPath(String.IsNullOrEmpty(this.directory) ? Environment.CurrentDirectory : this.directory); + string path = Path.GetFullPath(Path.Combine(basePath, filePath)); + if (!path.StartsWith(basePath, StringComparison.InvariantCultureIgnoreCase)) + { + throw new InvalidDataException("Archive cannot contain files with absolute or traversal paths."); + } + } + #endregion } } diff --git a/src/DTF/Libraries/Compression/Compression.csproj b/src/DTF/Libraries/Compression/Compression.csproj index 53f8ac35f..c19a299d0 100644 --- a/src/DTF/Libraries/Compression/Compression.csproj +++ b/src/DTF/Libraries/Compression/Compression.csproj @@ -12,6 +12,7 @@ true v2.0 false + true diff --git a/src/DTF/Libraries/Resources/Resources.csproj b/src/DTF/Libraries/Resources/Resources.csproj index 5d8713293..8295e6719 100644 --- a/src/DTF/Libraries/Resources/Resources.csproj +++ b/src/DTF/Libraries/Resources/Resources.csproj @@ -10,6 +10,7 @@ Microsoft.Deployment.Resources v2.0 true + true diff --git a/src/DTF/Libraries/WindowsInstaller.Linq/WindowsInstaller.Linq.csproj b/src/DTF/Libraries/WindowsInstaller.Linq/WindowsInstaller.Linq.csproj index 8f5af668e..cc8a05e88 100644 --- a/src/DTF/Libraries/WindowsInstaller.Linq/WindowsInstaller.Linq.csproj +++ b/src/DTF/Libraries/WindowsInstaller.Linq/WindowsInstaller.Linq.csproj @@ -11,6 +11,7 @@ Microsoft.Deployment.WindowsInstaller.Linq true v3.5 + true diff --git a/src/DTF/Libraries/WindowsInstaller.Package/WindowsInstaller.Package.csproj b/src/DTF/Libraries/WindowsInstaller.Package/WindowsInstaller.Package.csproj index e96273f35..eee4c8e85 100644 --- a/src/DTF/Libraries/WindowsInstaller.Package/WindowsInstaller.Package.csproj +++ b/src/DTF/Libraries/WindowsInstaller.Package/WindowsInstaller.Package.csproj @@ -11,6 +11,7 @@ Microsoft.Deployment.WindowsInstaller.Package v2.0 true + true diff --git a/src/DTF/Libraries/WindowsInstaller/WindowsInstaller.csproj b/src/DTF/Libraries/WindowsInstaller/WindowsInstaller.csproj index 047f390fd..e1db4063f 100644 --- a/src/DTF/Libraries/WindowsInstaller/WindowsInstaller.csproj +++ b/src/DTF/Libraries/WindowsInstaller/WindowsInstaller.csproj @@ -11,6 +11,7 @@ Microsoft.Deployment.WindowsInstaller v2.0 true + true diff --git a/src/DTF/Tools/SfxCA/SfxCA.vcxproj b/src/DTF/Tools/SfxCA/SfxCA.vcxproj index 2c132bff3..b01e34df6 100644 --- a/src/DTF/Tools/SfxCA/SfxCA.vcxproj +++ b/src/DTF/Tools/SfxCA/SfxCA.vcxproj @@ -30,6 +30,7 @@ SfxCA Unicode EntryPoints.def + true diff --git a/src/burn/engine/cache.cpp b/src/burn/engine/cache.cpp index fd9a43889..46dc4146f 100644 --- a/src/burn/engine/cache.cpp +++ b/src/burn/engine/cache.cpp @@ -1104,13 +1104,29 @@ static HRESULT CalculateWorkingFolder( { HRESULT hr = S_OK; RPC_STATUS rs = RPC_S_OK; + BOOL fElevated = FALSE; WCHAR wzTempPath[MAX_PATH] = { }; UUID guid = {}; WCHAR wzGuid[39]; if (!vsczWorkingFolder) { - if (0 == ::GetTempPathW(countof(wzTempPath), wzTempPath)) + ProcElevated(::GetCurrentProcess(), &fElevated); + + if (fElevated) + { + if (!::GetWindowsDirectoryW(wzTempPath, countof(wzTempPath))) + { + ExitWithLastError(hr, "Failed to get windows path for working folder."); + } + + hr = PathFixedBackslashTerminate(wzTempPath, countof(wzTempPath)); + ExitOnFailure(hr, "Failed to ensure windows path for working folder ended in backslash."); + + hr = ::StringCchCatW(wzTempPath, countof(wzTempPath), L"Temp\\"); + ExitOnFailure(hr, "Failed to concat Temp directory on windows path for working folder."); + } + else if (0 == ::GetTempPathW(countof(wzTempPath), wzTempPath)) { ExitWithLastError(hr, "Failed to get temp path for working folder."); } diff --git a/src/ext/BalExtension/mba/core/core.csproj b/src/ext/BalExtension/mba/core/core.csproj index 7c1b7a3cb..acca4f8e6 100644 --- a/src/ext/BalExtension/mba/core/core.csproj +++ b/src/ext/BalExtension/mba/core/core.csproj @@ -14,6 +14,7 @@ true true true + true diff --git a/src/ext/DifxAppExtension/difxapp.proj b/src/ext/DifxAppExtension/difxapp.proj index 6c4e7dd19..1bf5473b3 100644 --- a/src/ext/DifxAppExtension/difxapp.proj +++ b/src/ext/DifxAppExtension/difxapp.proj @@ -4,6 +4,12 @@ + + Platform=x86 + + + Platform=x64 + diff --git a/src/ext/UIExtension/wixlib/AdvancedWelcomeEulaDlg.wxs b/src/ext/UIExtension/wixlib/AdvancedWelcomeEulaDlg.wxs index d5ba41495..28966d54b 100644 --- a/src/ext/UIExtension/wixlib/AdvancedWelcomeEulaDlg.wxs +++ b/src/ext/UIExtension/wixlib/AdvancedWelcomeEulaDlg.wxs @@ -7,7 +7,7 @@ - + diff --git a/src/ext/UIExtension/wixlib/CustomizeDlg.wxs b/src/ext/UIExtension/wixlib/CustomizeDlg.wxs index 4f6248eb4..1e668ce2d 100644 --- a/src/ext/UIExtension/wixlib/CustomizeDlg.wxs +++ b/src/ext/UIExtension/wixlib/CustomizeDlg.wxs @@ -29,8 +29,8 @@ - - + + diff --git a/src/ext/UIExtension/wixlib/DiskCostDlg.wxs b/src/ext/UIExtension/wixlib/DiskCostDlg.wxs index 9fcc23268..fe3b6656a 100644 --- a/src/ext/UIExtension/wixlib/DiskCostDlg.wxs +++ b/src/ext/UIExtension/wixlib/DiskCostDlg.wxs @@ -11,8 +11,8 @@ - - + + diff --git a/src/ext/UIExtension/wixlib/ExitDialog.wxs b/src/ext/UIExtension/wixlib/ExitDialog.wxs index 00e0a7bd3..895dbe012 100644 --- a/src/ext/UIExtension/wixlib/ExitDialog.wxs +++ b/src/ext/UIExtension/wixlib/ExitDialog.wxs @@ -10,7 +10,7 @@ - +