Skip to content
Memory corruption Write-up Advanced

CVE-2022-34715: More Microsoft Windows NFS V4 Remote Code Execution

A buffer overflow in Windows NFS v4 ACL processing allows an unauthenticated attacker to send a crafted RPC request with a large ACE_Count, causing a heap overflow that can lead to arbitrary code execution as SYSTEM. The vulnerability is due to a 64-bit size calculation being truncated to 32 bits when allocating a buffer.

Quintin Crist Follow

Published on zerodayinitiative.com

A remote code execution vulnerability exists in Windows Network File System. The vulnerability is due to incorrect validation of fields within an NFS request.

Quintin Crist, Dusan Stevanovic, Arimura, on zerodayinitiative.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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the buffer size is calculated as a 64-bit value but passed to an allocation function that only accepts a 32-bit size, so the upper bits are truncated, leading to an undersized buffer.

Impact

Successful exploitation may result in arbitrary code execution in the context of SYSTEM; unsuccessful exploitation will result in a crash of the target system. The advisory lists the vulnerability as not requiring authentication, but all known exploitation paths require file creation or modification privileges.

What the attacker needed

Windows Server 2022 with NFS v4.1 enabled; File creation or modification privileges (per text)

The fix

The bug was patched by Microsoft in August 2022; applying the NFS-related updates is the best method to fully address the multiple NFS bugs patched in recent months.

How it was found

  1. Send an RPC request with Program field set to 100003 (NFS), Procedure field set to 1 (Compound), and Program Version field set to 4 (NFS4).
  2. Include an operation with opcode 6, 18, or 34 that contains ACL attribute data.
  3. Set the ACE_Count field to a value greater than 0x8000000 to trigger the buffer overflow.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a bug in a Windows file-sharing service called NFS. When the service receives a request to set permissions (ACLs), it calculates how much memory to reserve but makes a mistake with large numbers, so it reserves too little. An attacker can then send more data than fits, overwriting memory and potentially running their own code with the highest system privileges.

What is Memory corruption?

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

More from Microsoft

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.