VirtualBox

Changeset 52092 in vbox for trunk/src


Ignore:
Timestamp:
Jul 18, 2014 7:14:33 AM (11 years ago)
Author:
vboxsync
Message:

SUP: Disable hard error popups from NtCreateSection failures.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

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

    r52089 r52092  
    947947DECLHIDDEN(void) supR3HardenedWinInstallHooks(void)
    948948{
     949    NTSTATUS rcNt;
     950
    949951#ifndef VBOX_WITHOUT_DEBUGGER_CHECKS
    950952    /*
     
    952954     * notifications from ending up in the debugger.
    953955     */
    954     NTSTATUS rcNt = NtSetInformationThread(GetCurrentThread(), ThreadHideFromDebugger, NULL, 0);
     956    rcNt = NtSetInformationThread(GetCurrentThread(), ThreadHideFromDebugger, NULL, 0);
    955957    if (!NT_SUCCESS(rcNt))
    956         supR3HardenedFatalMsg("supR3HardenedWinInstallHooks", kSupInitOp_Misc, VERR_NO_MEMORY,
     958        supR3HardenedFatalMsg("supR3HardenedWinInstallHooks", kSupInitOp_Misc, VERR_GENERAL_FAILURE,
    957959                              "NtSetInformationThread/ThreadHideFromDebugger failed: %#x\n", rcNt);
    958960#endif
     961
     962    /*
     963     * Disable hard error popups so we can quietly refuse images to be loaded.
     964     */
     965    ULONG fHardErr = 0;
     966    rcNt = NtQueryInformationProcess(NtCurrentProcess(), ProcessDefaultHardErrorMode, &fHardErr, sizeof(fHardErr), NULL);
     967    if (!NT_SUCCESS(rcNt))
     968        supR3HardenedFatalMsg("supR3HardenedWinInstallHooks", kSupInitOp_Misc, VERR_GENERAL_FAILURE,
     969                              "NtQueryInformationProcess/ProcessDefaultHardErrorMode failed: %#x\n", rcNt);
     970    if (fHardErr & PROCESS_HARDERR_CRITICAL_ERROR)
     971    {
     972        fHardErr &= ~PROCESS_HARDERR_CRITICAL_ERROR;
     973        rcNt = NtSetInformationProcess(NtCurrentProcess(), ProcessDefaultHardErrorMode, &fHardErr, sizeof(fHardErr));
     974        if (!NT_SUCCESS(rcNt))
     975            supR3HardenedFatalMsg("supR3HardenedWinInstallHooks", kSupInitOp_Misc, VERR_GENERAL_FAILURE,
     976                                  "NtSetInformationProcess/ProcessDefaultHardErrorMode failed: %#x\n", rcNt);
     977    }
    959978
    960979    /*
  • trunk/src/VBox/Runtime/r3/win/ntdll-mini-implib.def

    r51770 r52092  
    5151    NtReadFile                            ;;= _NtReadFile@36
    5252    NtReadVirtualMemory                   ;;= _NtReadVirtualMemory@20
     53    NtResumeProcess                       ;;= _NtResumeProcess@4
     54    NtResumeThread                        ;;= _NtResumeThread@8
    5355    NtSetInformationFile                  ;;= _NtSetInformationFile@20
    5456    NtSetInformationObject                ;;= _NtSetInformationObject@16
     57    NtSetInformationProcess               ;;= _NtSetInformationProcess@16
    5558    NtSetInformationThread                ;;= _NtSetInformationThread@16
    5659    NtSetTimerResolution                  ;;= _NtSetTimerResolution@12
     60    NtSuspendProcess                      ;;= _NtSuspendProcess@4
     61    NtSuspendThread                       ;;= _NtSuspendThread@8
    5762    NtWriteFile                           ;;= _NtWriteFile@36
    5863    NtWriteVirtualMemory                  ;;= _NtWriteVirtualMemory@20
     
    6368    RtlCopySid                            ;;= _RtlCopySid@12
    6469    RtlCreateAcl                          ;;= _RtlCreateAcl@12
     70    RtlCreateProcessParameters            ;;= _RtlCreateProcessParameters@40
    6571    RtlCreateSecurityDescriptor           ;;= _RtlCreateSecurityDescriptor@8
     72    RtlCreateUserProcess                  ;;= _RtlCreateUserProcess@40
     73    RtlDestroyProcessParameters           ;;= _RtlDestroyProcessParameters@4
    6674    RtlGetVersion                         ;;= _RtlGetVersion@4
    6775    RtlInitializeSid                      ;;= _RtlInitializeSid@12
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