Fix for CVE-2025-53788 (#13392)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Ben Hillis committed
Aug 15, 2025 at 07:13 UTC
dc34ebfd8ca704fd3c2543bb6998b84ffc2d3416
1 file changed
+2
src/windows/service/exe/WslCoreVm.cpp
+2
@@ -231,6 +231,8 @@ void WslCoreVm::Initialize(const GUID& VmId, const wil::shared_handle& UserToken
231
// copies of the initrd file and private kernel.
232
if constexpr (wsl::shared::Arm64)
233
{
234
+ auto impersonate = wil::impersonate_token(m_userToken.get());
235
+
236
m_rootFsPath = m_tempPath / LXSS_ROOTFS_DIRECTORY;
237
wil::CreateDirectoryDeep(m_rootFsPath.c_str());
238
auto initRdPath = m_installPath / LXSS_TOOLS_DIRECTORY / LXSS_VM_MODE_INITRD_NAME;