Skip to content
Memory corruption Write-up Advanced

SSD Advisory – VhdmpiValidateVirtualDiskSurface LPE

A use-after-free vulnerability in the Windows VhdmpiValidateVirtualDiskSurface function allows local attackers to trigger a double free and potentially execute arbitrary code with SYSTEM privileges. The exploit requires patching a flag check in virtdisk.dll and racing file operations via a malicious SMB server.

Sana Oshika Follow

Published on ssd-disclosure.com

A use after free vulnerability has been found in Windows VhdmpiValidateVirtualDiskSurface function. This vulnerability can be used to overwrite critical memory sections which in turn can be used to execute arbitrary code and gain SYSTEM privileges.

SSD Secure Disclosure technical team, on ssd-disclosure.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

This write-up covers a local privilege escalation in the Windows virtual hard disk driver vhdmp.sys, specifically in the function VhdmpiValidateVirtualDiskSurface. The driver sits behind the Virtual Disk API exposed by virtdisk.dll, whose OpenVirtualDisk function applications call to open a virtual disk. The vulnerable code path is reached through a request handled by the driver. and the bug is a use after free that can be turned into memory corruption and, from there, code execution with SYSTEM privileges.

The issue was reported to the SSD Secure Disclosure program during the TyphoonPWN 2022 event, and it is tracked as CVE-2022-35751. Microsoft published an advisory and a fix. The affected versions listed are Windows 10 and Windows 11.

Setup

The attack is local: the attacker needs the ability to run code on the machine and to open a virtual disk through the Virtual Disk API. The researcher's tooling for the exploitation stage was an SMB server, built by modifying impacket's smbserver, plus the SMBLibrary project as a reference for creating an SMB server. The reason for using a custom SMB server is explained in the exploitation section: the driver performs file write operations against a prefetch file, and controlling the server side lets the attacker control the client's file read and write operations.

One precondition is unusual and worth stating up front: to reach VhdmpiValidateVirtualDiskSurface through OpenVirtualDisk, a flag with the value 0x80000008 must be set, and the shipped virtdisk.dll rejects that value. The researcher therefore patches the check in the library before launching the proof of concept, and notes that the patch stays in memory when the PoC is launched.

Finding it

The starting point is the VhdmpiValidateVirtualDiskSurface function inside vhdmp.sys:

Text
__int64 __fastcall VhdmpiValidateVirtualDiskSurface(_VHD_HANDLE_CONTEXT *HandleContext, PIRP Irp)
{
  void *SystemBuffer; // r14
  unsigned int v4; // ebx
  struct _VHD_SURFACE *Surface; // rdi
  _VHD_VIRTUAL_DISK *VirtualDisk; // rsi
  __int64 p_PassiveLock1; // r15
  struct _VHD_BACKING_STORE_HEADER *i; // rsi
  __int64 (__fastcall *v10)(struct _VHD_BACKING_STORE_HEADER *); // rax
  int v11; // eax
  __int64 v12; // [rsp+28h] [rbp-40h]
  if ( Irp->Tail.Overlay.CurrentStackLocation->Parameters.DeviceIoControl.InputBufferLength < 4 )
  {
    v4 = 0xC000000D;
  }
  else
  {
    SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
    if...
    v4 = 0;
    Surface = VhdmpiAddRundownRefSurfaceByHandleContext(HandleContext);
    if ( Surface )
    {
      ....
      ....
      if ( !*(_DWORD *)SystemBuffer )
      {
LABEL_36:
        if ( HandleContext->VirtualDisk->field_5C && Surface->PrefetchState ) //[1]
        {
          VhdmpiReleasePrefetchState(Surface);
          VhdmpiInitializePrefetchState(Surface);
        }
      }
      if...
      VhdmpiReleaseRundownRefVirtualDiskSurface(Surface, 0);
      return v4;
    }
    v4 = 0xC0000184;
  }
  if...
  return v4;
}

The if block marked [1] only checks whether Surface->PrefetchState and HandleContext->VirtualDisk->field_5C are set, and then calls the release and init routines on the surface. Nothing in that check takes a lock on Surface->PrefetchState itself.

Following the call into VhdmpiReleasePrefetchState shows why that matters:

Text
void __fastcall VhdmpiReleasePrefetchState(struct _VHD_SURFACE *Surface)
{
  _VHD_PREFETCH_STATE *Buffer; // rbx
  void *PrefetchFileHandle; // rcx
  struct _IO_STATUS_BLOCK IoStatusBlock; // [rsp+50h] [rbp-18h] BYREF
  union _LARGE_INTEGER ByteOffset; // [rsp+70h] [rbp+8h] BYREF
  Buffer = Surface->PrefetchState;
  if ( Buffer )
  {
    if ( Buffer->PrefetchFileHandle )
    {
      if ( Buffer->field_AC )
        VhdmpiWritePrefetchLog(Surface->PrefetchState);
      if ( Buffer->field_AE )
      {
        ByteOffset.QuadPart = 0i64;
        PrefetchFileHandle = (void *)Buffer->PrefetchFileHandle;
        IoStatusBlock = 0i64;
        ZwWriteFile(PrefetchFileHandle, 0i64, 0i64, 0i64, &IoStatusBlock, Buffer, 0x50u, &ByteOffset, 0i64);
      }
    }
    VhdmpiFreePrefetchState(Buffer);
    Surface->PrefetchState = 0i64;
  }
}

The function calls VhdmpiFreePrefetchState to free Surface->PrefetchState without first locking that variable against being freed by another thread. That is the flaw: the pointer is read, used and freed with no synchronisation, so two threads can race on it.

Exploitation

Step 1: race two threads into a double free

Because the release path is unsynchronised, the researcher's plan is to create two threads that call VhdmpiValidateVirtualDiskSurface continuously until a double free occurs at the Surface->PrefetchState check. The double free is the primitive; the resulting use after free can be used to overwrite critical memory sections, which in turn can be used to execute arbitrary code and gain SYSTEM privileges.

Step 2: get past the flag check in virtdisk.dll

There is a problem before the race can even start. To call VhdmpiValidateVirtualDiskSurface with an open virtual disk, a flag with the value 0x80000008 must be set. The OpenVirtualDisk function in virtdisk.dll validates the flags and exits when the check fails:

Text
DWORD __stdcall OpenVirtualDisk(
        PVIRTUAL_STORAGE_TYPE VirtualStorageType,
        PCWSTR Path,
        VIRTUAL_DISK_ACCESS_MASK VirtualDiskAccessMask,
        OPEN_VIRTUAL_DISK_FLAG Flags,
        POPEN_VIRTUAL_DISK_PARAMETERS Parameters,
        PHANDLE Handle)
{
  P[0] = 0i64;
  v20 = 0;
  if ( (Microsoft_Windows_VIRTDISKEnableBits & 1) != 0 )
  {
    if ( VirtualStorageType )
      DeviceId = VirtualStorageType->DeviceId;
    else
      DeviceId = 0i64;
    [redacted](VirtualStorageType, Path, Path, DeviceId);
  }
  v11 = (PVOID *)WPP_GLOBAL_Control;
  if...
  if ( !VirtualStorageType || !Path || (Flags & 0xFFFFF104) != 0 ) // patch
    goto LABEL_11;
  v13 = Parameters;
  if ( !Parameters || Parameters->Version == OPEN_VIRTUAL_DISK_VERSION_1 )
  {
    v14 = (VirtualDiskAccessMask & 0xFFC0FFFF) == 0;
  }
  else
  {
    if ( (unsigned int)(Parameters->Version - 2) > 1 )
    {
LABEL_11:
      FinalFilePath = 87;
      goto LABEL_25;
    }
    v14 = VirtualDiskAccessMask == VIRTUAL_DISK_ACCESS_NONE;
  }
  ....
  ....
}

The relevant line is the one the researcher marks as the patch target: if ( !VirtualStorageType || !Path || (Flags & 0xFFFFF104) != 0 ). The library checks the flag value and bails out when the masked bits are non-zero. The researcher patches that if statement so the call proceeds, and the patch stays in memory when the PoC is launched.

Step 3: control the file operations with a modified SMB server

The release path performs write operations to the prefetch file. To race this case, the researcher refers to Google Project Zero's Trapping Virtual Memory Access technique. In this case the SMB server is modified so that when the victim accesses files shared from the server, the attacker can completely control file read and write operations from the client. That control is what makes it possible to trigger the use after free from the double free.

SMBLibrary was considered for building the SMB server, but its source only offers two basic permissions, Read and Write File, while the functions in virtdisk.dll need some special permissions for the file. The researcher therefore chose impacket's smbserver and modified it instead.

A note from the disclosure: due to issues with the exploit code, specifically its file size, and the use of third party proprietary libraries, SSD Secure Disclosure could not at that time release the full exploit.

Root cause

The mistake is in VhdmpiReleasePrefetchState: it frees Surface->PrefetchState through VhdmpiFreePrefetchState without previously locking the variable against another thread freeing it. The caller in VhdmpiValidateVirtualDiskSurface only tests that the pointer is non-null before entering the release and init sequence, so two concurrent callers can both pass the check and both free the same object. The result is a double free, and the use after free can be used to overwrite critical memory sections. The report does not describe any specific mitigation in the driver that would have prevented the race.

Impact

A local attacker on Windows 10 or Windows 11 can trigger the use after free and use it to overwrite critical memory sections, which in turn can be used to execute arbitrary code and gain SYSTEM privileges. The attack requires local code execution and the ability to open a virtual disk.

Fix

Microsoft released an advisory and a fix for CVE-2022-35751, referenced at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-35751. The report does not describe the contents of the patch.

Variants to test

  1. Look for other driver routines that free a pointer stored in a long-lived structure, such as a surface or handle context, after only a null check and without holding a lock. A positive result is a code path where two threads can both observe the pointer as non-null and both reach the free.
  2. Audit other virtdisk.dll entry points for flag validation that can be bypassed by patching the check in memory, then check whether the corresponding driver IOCTL reaches privileged code that the library was meant to gate. A positive result is a driver path reachable with a flag value the library rejects.
  3. Reuse the Project Zero Trapping Virtual Memory Access technique against other drivers that perform file writes from a kernel callback, with an attacker-controlled SMB server on the other side. A positive result is a controlled read or write from the client during the race window.
  4. Test whether the same double free can be reached by racing the release and init pair from more than two threads, or by mixing the IOCTL with handle close operations. A positive result is a crash or memory corruption that reproduces without the two-thread loop.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

Windows has a feature for virtual hard disks: files that behave like a whole disk drive, which you can attach to the system and use as if it were a real disk. Applications do not talk to the disk driver directly. They call a library, virtdisk.dll, which passes the request down to a kernel driver called vhdmp.sys. That driver runs inside the operating system kernel.

A security researcher found a mistake in one function of that driver, VhdmpiValidateVirtualDiskSurface. The mistake is a use after free. In everyday terms: imagine a shared locker key. One person takes the key, opens the locker, empties it and throws the key away. A second person, who grabbed the same key a moment earlier, still thinks the locker is theirs and puts their own things inside. In a computer, the "locker" is a chunk of memory, and the second person is another thread of the program. If the freed memory is reused to overwrite critical memory sections, that can be used to execute arbitrary code and gain SYSTEM privileges, the highest account level on Windows.

The bug is tracked as CVE-2022-35751. It was reported to the SSD Secure Disclosure program during the TyphoonPWN 2022 event, and Microsoft published an advisory and a fix. The affected versions listed are Windows 10 and Windows 11.

The pieces you need to know

Before the details, a few words that come up constantly:

  • Driver: a piece of software that runs inside the operating system kernel and talks to hardware or provides low-level services. It has far more power than a normal app.
  • API: a published set of functions that one program offers to another. virtdisk.dll is an API: apps call its functions instead of writing driver requests by hand.
  • IOCTL: a request that a program sends to a driver, a bit like a form with numbered fields. The driver reads the form and acts on it.
  • Thread: one line of execution inside a program. A program can run several threads at the same time, and they can step on each other's toes if the code does not coordinate them.
  • Race condition: a bug that only appears when two threads act in a certain order at the same moment. It is like two people reaching for the same door handle at once.
  • Use after free: using memory after it has been given back to the system. The system may hand that memory to someone else, so the old pointer now points at data the attacker may control.
  • Double free: freeing the same memory twice. It corrupts the bookkeeping the system uses to track memory, and it is a common way to turn a small bug into a serious one.
  • SYSTEM: the built-in Windows account with the highest privileges. Code running as SYSTEM can do anything on the machine.
  • SMB: the file-sharing protocol Windows uses to access files on another machine. An SMB server is the machine offering the files.

Setup

The attack is local. The attacker already needs to be able to run code on the machine, and needs to be able to open a virtual disk through the Virtual Disk API. This is not a break-in from the internet; it is a way for someone who is already on the machine to climb to SYSTEM.

For the exploitation stage the researcher used an SMB server, built by modifying impacket's smbserver, with the SMBLibrary project as a reference for creating an SMB server. The reason for a custom SMB server appears later: the driver writes to a prefetch file, and controlling the server side lets the attacker control the client's file read and write operations.

One precondition is unusual and worth stating up front. To reach VhdmpiValidateVirtualDiskSurface through OpenVirtualDisk, a flag with the value 0x80000008 must be set, and the shipped virtdisk.dll rejects that value. A flag here is just a number passed to a function to switch options on or off, like ticking boxes on a form. The researcher therefore patches the check in the library before launching the proof of concept, and notes that the patch stays in memory when the PoC is launched. Patching in memory means editing the instructions of the running program, not the file on disk.

Finding it

The starting point is the VhdmpiValidateVirtualDiskSurface function inside vhdmp.sys:

Text
__int64 __fastcall VhdmpiValidateVirtualDiskSurface(_VHD_HANDLE_CONTEXT *HandleContext, PIRP Irp)
{
  void *SystemBuffer; // r14
  unsigned int v4; // ebx
  struct _VHD_SURFACE *Surface; // rdi
  _VHD_VIRTUAL_DISK *VirtualDisk; // rsi
  __int64 p_PassiveLock1; // r15
  struct _VHD_BACKING_STORE_HEADER *i; // rsi
  __int64 (__fastcall *v10)(struct _VHD_BACKING_STORE_HEADER *); // rax
  int v11; // eax
  __int64 v12; // [rsp+28h] [rbp-40h]
  if ( Irp->Tail.Overlay.CurrentStackLocation->Parameters.DeviceIoControl.InputBufferLength < 4 )
  {
    v4 = 0xC000000D;
  }
  else
  {
    SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
    if...
    v4 = 0;
    Surface = VhdmpiAddRundownRefSurfaceByHandleContext(HandleContext);
    if ( Surface )
    {
      ....
      ....
      if ( !*(_DWORD *)SystemBuffer )
      {
LABEL_36:
        if ( HandleContext->VirtualDisk->field_5C && Surface->PrefetchState ) //[1]
        {
          VhdmpiReleasePrefetchState(Surface);
          VhdmpiInitializePrefetchState(Surface);
        }
      }
      if...
      VhdmpiReleaseRundownRefVirtualDiskSurface(Surface, 0);
      return v4;
    }
    v4 = 0xC0000184;
  }
  if...
  return v4;
}

Line by line, in plain words:

  • The function takes two things: a HandleContext, which is the driver's record for an open virtual disk, and an Irp, which is the request packet the driver received.
  • The first if checks whether the request's input buffer is shorter than 4 bytes. If it is, it sets v4 to 0xC000000D, an error code meaning the request is malformed, and skips the rest.
  • Otherwise it takes the request's data buffer (SystemBuffer) and looks up the surface for this handle with VhdmpiAddRundownRefSurfaceByHandleContext. A surface is the driver's internal object representing the disk's data area.
  • If no surface is found, it sets v4 to 0xC0000184, another error code.
  • If a surface is found, and the first four bytes of the request buffer are zero, execution reaches the label LABEL_36.
  • The block marked [1] checks two things: that HandleContext->VirtualDisk->field_5C is set, and that Surface->PrefetchState is not null. PrefetchState is a pointer to a structure holding the state of prefetching, a read-ahead feature that loads data before it is asked for.
  • If both are true, it calls VhdmpiReleasePrefetchState(Surface) and then VhdmpiInitializePrefetchState(Surface).
  • At the end it releases the reference it took on the surface and returns.

The important point is that the [1] check only tests whether the pointer is non-null. Nothing in that check takes a lock on Surface->PrefetchState itself. A lock is the programming equivalent of a "busy" sign on a door: while one thread is inside, others wait.

Following the call into VhdmpiReleasePrefetchState shows why that matters:

Text
void __fastcall VhdmpiReleasePrefetchState(struct _VHD_SURFACE *Surface)
{
  _VHD_PREFETCH_STATE *Buffer; // rbx
  void *PrefetchFileHandle; // rcx
  struct _IO_STATUS_BLOCK IoStatusBlock; // [rsp+50h] [rbp-18h] BYREF
  union _LARGE_INTEGER ByteOffset; // [rsp+70h] [rbp+8h] BYREF
  Buffer = Surface->PrefetchState;
  if ( Buffer )
  {
    if ( Buffer->PrefetchFileHandle )
    {
      if ( Buffer->field_AC )
        VhdmpiWritePrefetchLog(Surface->PrefetchState);
      if ( Buffer->field_AE )
      {
        ByteOffset.QuadPart = 0i64;
        PrefetchFileHandle = (void *)Buffer->PrefetchFileHandle;
        IoStatusBlock = 0i64;
        ZwWriteFile(PrefetchFileHandle, 0i64, 0i64, 0i64, &IoStatusBlock, Buffer, 0x50u, &ByteOffset, 0i64);
      }
    }
    VhdmpiFreePrefetchState(Buffer);
    Surface->PrefetchState = 0i64;
  }
}

Line by line again:

  • It copies Surface->PrefetchState into a local variable called Buffer.
  • If Buffer is not null, it checks whether the prefetch state has a file handle (PrefetchFileHandle). A file handle is the operating system's reference to an open file.
  • If field_AC is set, it writes a prefetch log.
  • If field_AE is set, it prepares a byte offset of zero and an I/O status block, then calls ZwWriteFile to write 0x50 bytes from Buffer to the prefetch file.
  • Then it calls VhdmpiFreePrefetchState(Buffer) to free the memory, and sets Surface->PrefetchState to zero.

The function frees Surface->PrefetchState without first locking that variable against being freed by another thread. That is the flaw: the pointer is read, used and freed with no synchronisation, so two threads can race on it.

Exploitation

Step 1: race two threads into a double free

Because the release path is unsynchronised, the plan is to create two threads that call VhdmpiValidateVirtualDiskSurface continuously until a double free occurs at the Surface->PrefetchState check. Think of two people both reading the "locker is occupied" sign at the same instant, both deciding to empty it, and both throwing the key away. The double free is the primitive, meaning the basic building block the rest of the attack is built on. The resulting use after free can then be used to overwrite critical memory sections, which in turn can be used to execute arbitrary code and gain SYSTEM privileges.

Step 2: get past the flag check in virtdisk.dll

There is a problem before the race can even start. To call VhdmpiValidateVirtualDiskSurface with an open virtual disk, a flag with the value 0x80000008 must be set. The OpenVirtualDisk function in virtdisk.dll validates the flags and exits when the check fails:

Text
DWORD __stdcall OpenVirtualDisk(
        PVIRTUAL_STORAGE_TYPE VirtualStorageType,
        PCWSTR Path,
        VIRTUAL_DISK_ACCESS_MASK VirtualDiskAccessMask,
        OPEN_VIRTUAL_DISK_FLAG Flags,
        POPEN_VIRTUAL_DISK_PARAMETERS Parameters,
        PHANDLE Handle)
{
  P[0] = 0i64;
  v20 = 0;
  if ( (Microsoft_Windows_VIRTDISKEnableBits & 1) != 0 )
  {
    if ( VirtualStorageType )
      DeviceId = VirtualStorageType->DeviceId;
    else
      DeviceId = 0i64;
    [redacted](VirtualStorageType, Path, Path, DeviceId);
  }
  v11 = (PVOID *)WPP_GLOBAL_Control;
  if...
  if ( !VirtualStorageType || !Path || (Flags & 0xFFFFF104) != 0 ) // patch
    goto LABEL_11;
  v13 = Parameters;
  if ( !Parameters || Parameters->Version == OPEN_VIRTUAL_DISK_VERSION_1 )
  {
    v14 = (VirtualDiskAccessMask & 0xFFC0FFFF) == 0;
  }
  else
  {
    if ( (unsigned int)(Parameters->Version - 2) > 1 )
    {
LABEL_11:
      FinalFilePath = 87;
      goto LABEL_25;
    }
    v14 = VirtualDiskAccessMask == VIRTUAL_DISK_ACCESS_NONE;
  }
  ....
  ....
}

Line by line:

  • OpenVirtualDisk is the public function apps call. It takes the type of virtual storage, the path to the disk file, an access mask (what the caller wants to do with the disk), a set of flags, a parameters structure and a place to return the handle.
  • It first clears some locals and, if a tracing bit is enabled, writes an event with the storage type, path and device id. This is diagnostic logging, not security logic.
  • The line the researcher marks as the patch target is if ( !VirtualStorageType || !Path || (Flags & 0xFFFFF104) != 0 ). It rejects the call if the storage type or path is missing, or if any bit in the mask 0xFFFFF104 is set in the flags. The & here is a bitwise AND: it keeps only the bits that are set in both numbers. If the result is not zero, at least one forbidden bit was set.
  • On rejection it jumps to LABEL_11, sets an error value of 87 (which is the Windows error for an invalid parameter) and leaves.
  • Otherwise it checks the parameters version and the access mask, and continues.

The library checks the flag value and bails out when the masked bits are non-zero. The researcher patches that if statement so the call proceeds, and the patch stays in memory when the PoC is launched. In other words, the guard in the library is removed at runtime, so the driver receives the flag value it was not supposed to receive.

Step 3: control the file operations with a modified SMB server

The release path performs write operations to the prefetch file. To race this case, the researcher refers to Google Project Zero's Trapping Virtual Memory Access technique. The report refers to that technique without describing how it works. In this case the SMB server is modified so that when the victim accesses files shared from the server, the attacker can completely control file read and write operations from the client. That control is what makes it possible to trigger the use after free from the double free.

SMBLibrary was considered for building the SMB server, but its source only offers two basic permissions, Read and Write File, while the functions in virtdisk.dll need some special permissions for the file. The researcher therefore chose impacket's smbserver and modified it instead.

A note from the disclosure: due to issues with the exploit code, specifically its file size, and the use of third party proprietary libraries, SSD Secure Disclosure could not at that time release the full exploit.

Root cause

The mistake is in VhdmpiReleasePrefetchState: it frees Surface->PrefetchState through VhdmpiFreePrefetchState without previously locking the variable against another thread freeing it. The caller in VhdmpiValidateVirtualDiskSurface only tests that the pointer is non-null before entering the release and init sequence, so two concurrent callers can both pass the check and both free the same object. The result is a double free, and the use after free can be used to overwrite critical memory sections. The report does not describe any specific mitigation in the driver that would have prevented the race.

Impact

A local attacker on Windows 10 or Windows 11 can trigger the use after free and use it to overwrite critical memory sections, which in turn can be used to execute arbitrary code and gain SYSTEM privileges. The attack requires local code execution and the ability to open a virtual disk.

Fix

Microsoft released an advisory and a fix for CVE-2022-35751, referenced at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-35751. The report does not describe the contents of the patch.

Variants to test

  1. Look for other driver routines that free a pointer stored in a long-lived structure, such as a surface or handle context, after only a null check and without holding a lock. A positive result is a code path where two threads can both observe the pointer as non-null and both reach the free.
  2. Audit other virtdisk.dll entry points for flag validation that can be bypassed by patching the check in memory, then check whether the corresponding driver IOCTL reaches privileged code that the library was meant to gate. A positive result is a driver path reachable with a flag value the library rejects.
  3. Reuse the Project Zero Trapping Virtual Memory Access technique against other drivers that perform file writes from a kernel callback, with an attacker-controlled SMB server on the other side. A positive result is a controlled read or write from the client during the race window.
  4. Test whether the same double free can be reached by racing the release and init pair from more than two threads, or by mixing the IOCTL with handle close operations. A positive result is a crash or memory corruption that reproduces without the two-thread loop.

Glossary

  • API: a published set of functions one program offers to another, so callers do not have to reimplement low-level work.
  • Bitwise AND: an operation that compares two numbers bit by bit and keeps only the bits set in both, used here to test which flag bits are present.
  • CVE: a public identifier for a known vulnerability, here CVE-2022-35751.
  • Double free: freeing the same block of memory twice, which corrupts the system's memory bookkeeping.
  • Driver: software that runs in the operating system kernel and provides low-level services with high privilege.
  • Flag: a number passed to a function to switch options on or off.
  • Handle: the operating system's reference to an open object such as a file or a virtual disk.
  • IOCTL: a request sent from a program to a driver, carrying numbered fields and a data buffer.
  • IRP: the request packet the kernel passes to a driver for each operation.
  • Kernel: the core of the operating system, where drivers run with full trust.
  • Local privilege escalation: turning a limited account on a machine into a more powerful one, here SYSTEM.
  • Lock: a coordination mechanism that lets only one thread use a resource at a time.
  • Patch (in memory): editing the instructions of a running program so a check behaves differently, without changing the file on disk.
  • Prefetch: a read-ahead feature that loads data before it is requested.
  • Proof of concept (PoC): a program that demonstrates a vulnerability without being a full weaponised exploit.
  • Race condition: a bug that appears only when two threads act in a particular order at the same moment.
  • Surface: the driver's internal object representing a virtual disk's data area.
  • Thread: one line of execution inside a program; several can run at the same time.
  • Use after free: using memory after it has been returned to the system, so the old pointer may now refer to data someone else controls.
  • Virtual hard disk: a file that behaves like a whole disk drive and can be attached to the system.
  • virtdisk.dll: the Windows library that applications call to open and manage virtual disks.
  • vhdmp.sys: the Windows kernel driver that implements virtual hard disk support.

More by Sana Oshika

View all

2 more disclosed reports, best first.

More from Microsoft (Windows)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.