Changeset 52446 in vbox for trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
- Timestamp:
- Aug 21, 2014 5:23:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
r52403 r52446 1110 1110 * 1111 1111 * @returns VBox status code. 1112 * @retval VINF_OBJECT_DESTROYED if we've unmapped the image (child 1113 * purification only). 1112 1114 * @param pThis The process scanning state structure. 1113 1115 * @param pImage The new image structure. Only the unicode name … … 1190 1192 if (!pImage->pszName) 1191 1193 { 1194 /* 1195 * Unknown image. 1196 * 1197 * If we're cleaning up a child process, we can unmap the offending 1198 * DLL... Might have interesting side effects, or at least interesting 1199 * as in "may you live in interesting times". 1200 */ 1201 #ifdef IN_RING3 1202 if ( pMemInfo->AllocationBase == pMemInfo->BaseAddress 1203 && pThis->enmKind == SUPHARDNTVPKIND_CHILD_PURIFICATION) 1204 { 1205 SUP_DPRINTF(("supHardNtVpScanVirtualMemory: Unmapping image mem at %p (%p LB %#zx) - '%ls'\n", 1206 pMemInfo->AllocationBase, pMemInfo->BaseAddress, pMemInfo->RegionSize)); 1207 NTSTATUS rcNt = NtUnmapViewOfSection(pThis->hProcess, pMemInfo->AllocationBase); 1208 if (NT_SUCCESS(rcNt)) 1209 return VINF_OBJECT_DESTROYED; 1210 SUP_DPRINTF(("supHardNtVpScanVirtualMemory: NtUnmapViewOfSection(,%p) failed: %#x\n", pMemInfo->AllocationBase, rcNt)); 1211 } 1212 #endif 1213 /* 1214 * Special error message if we can. 1215 */ 1192 1216 if ( pMemInfo->AllocationBase == pMemInfo->BaseAddress 1193 1217 && ( supHardNtVpAreNamesEqual("sysfer.dll", pwszFilename) 1194 1218 || supHardNtVpAreNamesEqual("sysfer32.dll", pwszFilename) 1195 || supHardNtVpAreNamesEqual("sysfer64.dll", pwszFilename)) ) 1219 || supHardNtVpAreNamesEqual("sysfer64.dll", pwszFilename) 1220 || supHardNtVpAreNamesEqual("sysfrethunk.dll", pwszFilename)) ) 1196 1221 { 1197 1222 supHardNtVpSetInfo2(pThis, VERR_SUP_VP_SYSFER_DLL, … … 1388 1413 if (RT_SUCCESS(rc)) 1389 1414 { 1390 pThis->cImages++; 1391 if (pThis->cImages >= RT_ELEMENTS(pThis->aImages)) 1392 return supHardNtVpSetInfo2(pThis, VERR_SUP_VP_TOO_MANY_DLLS_LOADED, 1393 "Internal error: aImages is full.\n"); 1415 if (rc != VINF_OBJECT_DESTROYED) 1416 { 1417 pThis->cImages++; 1418 if (pThis->cImages >= RT_ELEMENTS(pThis->aImages)) 1419 return supHardNtVpSetInfo2(pThis, VERR_SUP_VP_TOO_MANY_DLLS_LOADED, 1420 "Internal error: aImages is full.\n"); 1421 } 1394 1422 } 1395 1423 #ifdef IN_RING3 /* Continue and add more information if unknown DLLs are found. */
Note:
See TracChangeset
for help on using the changeset viewer.