File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -2304,6 +2304,35 @@ KdSystemDebugControl(
23042304
23052305 case SysDbgReadVirtual :
23062306 case SysDbgWriteVirtual :
2307+ if (InputBufferLength != sizeof (SYSDBG_VIRTUAL ))
2308+ {
2309+ Status = STATUS_INFO_LENGTH_MISMATCH ;
2310+ }
2311+ else
2312+ {
2313+ SYSDBG_VIRTUAL Request = * (PSYSDBG_VIRTUAL )InputBuffer ;
2314+ PVOID LockedBuffer ;
2315+ PMDL LockVariable ;
2316+
2317+ Status = ExLockUserBuffer (Request .Buffer ,
2318+ Request .Request ,
2319+ PreviousMode ,
2320+ Command == SysDbgReadVirtual ? IoWriteAccess : IoReadAccess ,
2321+ & LockedBuffer ,
2322+ & LockVariable );
2323+ if (NT_SUCCESS (Status ))
2324+ {
2325+ Status = KdpCopyMemoryChunks ((ULONG64 )(ULONG_PTR )Request .Address ,
2326+ Request .Buffer ,
2327+ Request .Request ,
2328+ 0 ,
2329+ Command == SysDbgReadVirtual ? 0 : MMDBG_COPY_WRITE ,
2330+ & Length );
2331+ ExUnlockUserBuffer (LockVariable );
2332+ }
2333+ }
2334+ break ;
2335+
23072336 case SysDbgReadPhysical :
23082337 case SysDbgWritePhysical :
23092338 case SysDbgReadControlSpace :
You can’t perform that action at this time.
0 commit comments