Fix for CVE-2025-53788 (#13392)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
This commit is contained in:
Ben Hillis 2025-08-15 07:13:22 -07:00 committed by GitHub
parent fd3b858064
commit dc34ebfd8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -231,6 +231,8 @@ void WslCoreVm::Initialize(const GUID& VmId, const wil::shared_handle& UserToken
// copies of the initrd file and private kernel.
if constexpr (wsl::shared::Arm64)
{
auto impersonate = wil::impersonate_token(m_userToken.get());
m_rootFsPath = m_tempPath / LXSS_ROOTFS_DIRECTORY;
wil::CreateDirectoryDeep(m_rootFsPath.c_str());
auto initRdPath = m_installPath / LXSS_TOOLS_DIRECTORY / LXSS_VM_MODE_INITRD_NAME;