VirtualBox

Changeset 52453 in vbox


Ignore:
Timestamp:
Aug 22, 2014 6:42:01 AM (10 years ago)
Author:
vboxsync
Message:

supHardNtViCheckIsOwnedByTrustedInstaller: Workaround for someones user32.dll not owned by TrustedInstaller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp

    r52414 r52453  
    703703        pwsz = pwszName + cwcOther + 1;
    704704
    705         /* Must be owned by trusted installer. */
     705        /* Must be owned by trusted installer. (This test is superfuous, thus no relaxation here.) */
    706706        if (   !(fFlags & SUPHNTVI_F_TRUSTED_INSTALLER_OWNER)
    707707            && !supHardNtViCheckIsOwnedByTrustedInstaller(hFile, pwszName))
     
    10101010    /*
    10111011     * Check the trusted installer bit first, if requested as it's somewhat
    1012      * cheaper than the rest.
     1012     * cheaper than the rest.  We relax this for system32, like we used to,
     1013     * as there are apparently some systems out there where the user, admin,
     1014     * or someone has changed the ownership of core windows DLLs like
     1015     * user32.dll.  Since we need user32.dll and will be checking it's digital
     1016     * signature, it's reasonably safe to let this thru.
    10131017     */
    10141018    if (   (pNtViRdr->fFlags & SUPHNTVI_F_TRUSTED_INSTALLER_OWNER)
    10151019        && !supHardNtViCheckIsOwnedByTrustedInstaller(pNtViRdr->hFile, pwszName))
    1016         return RTErrInfoSetF(pErrInfo, VERR_SUP_VP_NOT_OWNED_BY_TRUSTED_INSTALLER,
    1017                              "supHardenedWinVerifyImageByHandle: TrustedInstaller is not the owner of '%ls'.", pwszName);
     1020    {
     1021        if (!supHardViUtf16PathStartsWithEx(pwszName, (uint32_t)RTUtf16Len(pwszName),
     1022                                            g_System32NtPath.UniStr.Buffer, g_System32NtPath.UniStr.Length / sizeof(WCHAR),
     1023                                            true /*fCheckSlash*/))
     1024            return RTErrInfoSetF(pErrInfo, VERR_SUP_VP_NOT_OWNED_BY_TRUSTED_INSTALLER,
     1025                                 "supHardenedWinVerifyImageByHandle: TrustedInstaller is not the owner of '%ls'.", pwszName);
     1026        SUP_DPRINTF(("%ls: Relaxing the TrustedInstaller requirement for this DLL (it's in system32).\n", pwszName));
     1027    }
    10181028
    10191029    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette