VirtualBox

Changeset 52633 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Sep 6, 2014 5:46:52 PM (10 years ago)
Author:
vboxsync
Message:

Fixed ACL issue, shouldn't use GENERIC_* in the deny mask when I want to control the special access bits individually. This makes the parent watcher code work and makes it possible open the VM and stub processes for waiting or querying without requiring debugging privileges.

File:
1 edited

Legend:

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

    r52632 r52633  
    20362036    ClientId.UniqueProcess = (HANDLE)BasicInfo.InheritedFromUniqueProcessId;
    20372037    ClientId.UniqueThread  = NULL;
    2038 #if 0 /** @todo fix me later. */
     2038
    20392039    HANDLE hParent;
    20402040    rcNt = NtOpenProcess(&hParent, SYNCHRONIZE | PROCESS_QUERY_INFORMATION, &ObjAttr, &ClientId);
    20412041    if (!NT_SUCCESS(rcNt))
    2042         supR3HardenedFatalMsg("supR3HardenedWinCreateParentWatcherThread", kSupInitOp_Misc, VERR_GENERAL_FAILUREps,
     2042        supR3HardenedFatalMsg("supR3HardenedWinCreateParentWatcherThread", kSupInitOp_Misc, VERR_GENERAL_FAILURE,
    20432043                              "NtOpenProcess(%p.0) failed: %#x\n", ClientId.UniqueProcess, rcNt);
    20442044
     
    20502050    if (RT_FAILURE(rc))
    20512051        supR3HardenedFatal("supR3HardenedWinCreateParentWatcherThread: RTThreadCreate failed: %Rrc\n", rc);
    2052 #endif
    20532052}
    20542053
     
    27062705    SUPR3HARDENED_ASSERT_NT_SUCCESS(RtlCreateAcl(&pCleanup->Acl.AclHdr, sizeof(pCleanup->Acl), ACL_REVISION));
    27072706
    2708     ULONG fDeny  = DELETE | WRITE_DAC | WRITE_OWNER | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL;
     2707    ULONG fDeny  = DELETE | WRITE_DAC | WRITE_OWNER;
    27092708    ULONG fAllow = SYNCHRONIZE | READ_CONTROL;
    27102709    ULONG fAllowLogin = SYNCHRONIZE | READ_CONTROL;
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