VirtualBox

Changeset 53022 in vbox for trunk


Ignore:
Timestamp:
Oct 10, 2014 10:19:26 AM (10 years ago)
Author:
vboxsync
Message:

SUP: XP + ATI kludge.

Location:
trunk/src/VBox/HostDrivers/Support/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h

    r53021 r53022  
    221221extern uint32_t         g_uNtVerCombined;
    222222
     223/** @name NT version constants for less-than checks.
     224 * @{ */
    223225/** Combined NT version number for XP. */
    224226#define SUP_NT_VER_XP       SUP_MAKE_NT_VER_SIMPLE(5,1)
     
    227229/** Combined NT version number for Vista. */
    228230#define SUP_NT_VER_VISTA    SUP_MAKE_NT_VER_SIMPLE(6,0)
     231/** Combined NT version number for Vista with SP1. */
     232#define SUP_NT_VER_VISTA_SP1 SUP_MAKE_NT_VER_COMBINED(6,0,6001,1,0)
    229233/** Combined NT version number for Windows 7. */
    230234#define SUP_NT_VER_W70      SUP_MAKE_NT_VER_SIMPLE(6,1)
     
    233237/** Combined NT version number for Windows 8.1. */
    234238#define SUP_NT_VER_W81      SUP_MAKE_NT_VER_SIMPLE(6,3)
     239/** @} */
    235240
    236241# endif
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp

    r53011 r53022  
    23102310     * On Windows 8.0 and later there are more than one digest choice.
    23112311     */
     2312    int fNoSignedCatalogFound = -1;
    23122313    rc = VERR_LDRVI_NOT_SIGNED;
    23132314    static struct
     
    24022403                                    goto l_fresh_context;
    24032404                                }
     2405                                ULONG ulErr = RtlGetLastWin32Error();
     2406                                fNoSignedCatalogFound = ulErr == ERROR_NOT_FOUND && fNoSignedCatalogFound != 0;
    24042407                                if (iCat == 0)
    2405                                     SUP_DPRINTF(("supR3HardNtViCallWinVerifyTrustCatFile: CryptCATAdminEnumCatalogFromHash failed %u\n", RtlGetLastWin32Error()));
     2408                                    SUP_DPRINTF(("supR3HardNtViCallWinVerifyTrustCatFile: CryptCATAdminEnumCatalogFromHash failed ERRROR_NOT_FOUND (%u)\n", ulErr));
     2409                                else if (iCat == 0)
     2410                                    SUP_DPRINTF(("supR3HardNtViCallWinVerifyTrustCatFile: CryptCATAdminEnumCatalogFromHash failed %u\n", ulErr));
    24062411                                break;
    24072412                            }
     2413                            fNoSignedCatalogFound = 0;
    24082414                            Assert(hCatInfoPrev == NULL);
    24092415                            hCatInfoPrev = hCatInfo;
     
    25142520    if (rc == VERR_LDRVI_NOT_SIGNED)
    25152521    {
    2516         PCRTUTF16 pwsz;
    2517         uint32_t cwcName = (uint32_t)RTUtf16Len(pwszName);
    2518         uint32_t cwcOther = g_System32NtPath.UniStr.Length / sizeof(WCHAR);
     2522        bool        fCoreSystemDll = false;
     2523        PCRTUTF16   pwsz;
     2524        uint32_t    cwcName  = (uint32_t)RTUtf16Len(pwszName);
     2525        uint32_t    cwcOther = g_System32NtPath.UniStr.Length / sizeof(WCHAR);
    25192526        if (supHardViUtf16PathStartsWithEx(pwszName, cwcName, g_System32NtPath.UniStr.Buffer, cwcOther, true /*fCheckSlash*/))
    25202527        {
     
    25232530                || supHardViUtf16PathIsEqual(pwsz, "user32.dll")
    25242531                || supHardViUtf16PathIsEqual(pwsz, "gdi32.dll")
    2525                 || supHardViUtf16PathIsEqual(pwsz, "kernel32.dll")
    2526                 || supHardViUtf16PathIsEqual(pwsz, "KernelBase.dll")
    2527                 || supHardViUtf16PathIsEqual(pwsz, "ntdll.dll")
    25282532                || supHardViUtf16PathIsEqual(pwsz, "opengl32.dll")
     2533                || (fCoreSystemDll = supHardViUtf16PathIsEqual(pwsz, "KernelBase.dll"))
     2534                || (fCoreSystemDll = supHardViUtf16PathIsEqual(pwsz, "kernel32.dll"))
     2535                || (fCoreSystemDll = supHardViUtf16PathIsEqual(pwsz, "ntdll.dll"))
    25292536                )
    25302537            {
     
    25332540                RTErrInfoAddF(pErrInfo, rc, "'%ls' is most likely modified.", pwszName);
    25342541            }
     2542        }
     2543
     2544        /* Kludge for ancient windows versions we don't want to support but
     2545           users still wants to use.  Keep things as safe as possible without
     2546           unnecessary effort.  Problem is that 3rd party catalog files cannot
     2547           easily be found.  Showstopper for ATI users. */
     2548        if (   fNoSignedCatalogFound == 1
     2549            && g_uNtVerCombined < SUP_NT_VER_VISTA
     2550            && !fCoreSystemDll)
     2551        {
     2552            rc = VINF_LDRVI_NOT_SIGNED;
    25352553        }
    25362554    }
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