wcifs.sys Memory Leak Persists in Windows 11 26H2 When Scanning Sandbox-Related Files
The article's text, from Joho no Todai's page.
At 20:56 UTC on December 5, a Windows 11 Enterprise 26H2 user reported a memory leak. After six days of uptime, Windows was using about 21.7 GB across its paged and nonpaged pools. The System process retained about 4.29 million file handles, identifiers used to work with open files.
The PC ran generally available build 26300.9974, delivered in the November 10 cumulative security update KB5132061 (U.S. time). The version of wcifs.sys, the Windows container filesystem isolation driver, was 10.0.26100.9818.
Kernel pool tags identify allocations by purpose. The tag WCsc logged 4,282,034 allocations and zero frees. The user also recorded 1,881,886 for WCfc.
Windows Sandbox was enabled on the affected PC, which had 22 container base layers. When the user used the file-copy utility robocopy to list files without copying them, allocations for WCsc, WCfc, and WCri each increased by 160,458. The System process also gained 160,467 handles, which the user said remained open after the operation.
The leak occurred when a scan reached the base layers, even though the user had not directly interacted with a container.
One Windows 11 26H2 PC (26300.9974): Memory leak and workaround tests
| Operation | WCsc Increase in allocations |
|---|---|
| Windows Sandbox enabled | |
| Windows: 22 base layers File listing only (no copy) | 160,458 0 frees |
| WSL: After restarting Examined 34 placeholder files | 33 0 frees |
| After disabling Sandbox and restarting (wcifs.sys still loaded) | |
| WSL: Scanned container folders | 0 |
| WSL: Checked disk usage on C: About 40 minutes with Docker Desktop running | 0 |
What happens when WSL accesses Windows files?
At 22:16 UTC on December 5, the user posted more test results to an issue for Windows Subsystem for Linux (WSL). After restarting Windows, examining 34 placeholder files in a base layer from WSL added 33 WCsc allocations and 13 WCfc allocations, according to the report. None were freed.
A Windows Performance Recorder (WPR) trace associated the allocations with dllhost.exe, which was running the Plan 9 server for WSL file sharing. WSL can access the Windows C drive through /mnt/c. The user said that a search of the entire drive had reached the Windows Sandbox base layers.
The user then disabled Windows Sandbox and restarted. The 22 layers were removed, while wcifs.sys remained loaded for other features. Scanning the container directory no longer increased WCsc allocations.
There were also no new WCsc allocations during a roughly 40-minute scan of C-drive disk usage from WSL with Docker Desktop running.
Because the increase stopped while the driver remained loaded, accessing the base layers appears to have been one of the conditions for the leak on that PC.
Why the memory stays allocated
The Windows Containers issue report includes a detailed analysis posted in August. The investigator concluded that when wcifs.sys resolves file references, it retains references to contexts that store information about files and data streams.
Separate PC in August: wcifs.sys allocations and frees over about 65 hours
| Tag and purpose | Allocations | Frees |
|---|---|---|
| WCsc Data stream management | 237,475 | 0 |
| WCfn File name management | 237,477 | 237,477 |
In about 65 hours of measurements, WCsc had 237,475 new allocations and no frees. By comparison, all 237,477 allocations tagged WCfn, which tracks file-name information, were freed. The report says both tags occur along a common code path in one driver.
Windows Filter Manager tracks context references and automatically frees the memory when the count reaches zero. A context stays allocated while a reference remains. The reporter said they found references that were left outstanding. Determining whether the release call is missing entirely or fails under particular conditions would require examining the code.
Nonpaged pool allocations stay in physical memory while they exist. Paged pool memory can be moved to storage when needed. Combined pool usage alone cannot show how much physical memory the pools occupy.
Some memory stays allocated after applications close. Tracking memory use by application alone can miss what is keeping that memory in use.
Memory exhaustion also occurred in 25H2
On August 9, a user reported the issue on a PC running Windows 11 Enterprise 25H2 build 26200.8973 and WSL 2.7.11.0. On a system with 48 GB of RAM, paged pool usage reached about 28.3 GB and nonpaged pool usage about 18.4 GB. The user said the memory remained allocated after closing applications and shutting down WSL.
An August container investigation found about 34 GB of paged pool use and 14 GB of nonpaged pool use on a PC with 128 GB of RAM. System-wide committed memory approached its limit, and new processes failed to start. The reporter’s logs linked most retained handles to Claude Code, an AI coding agent that recursively searched an entire drive. The operation contained no commands targeting containers.
The reporter said backups, file searches, and disk usage scans could also encounter the problem. The AI coding agent’s access to many files appears to have exposed a bug that can arise during ordinary searches.
On October 2, another report on Windows 11 Pro 25H2 build 26200.9278 recorded a rise of 480 WCsc allocations on the first Sandbox launch during testing. Reading Windows DLLs in System32 from the Sandbox added 3,781 allocations, while reading them again added none. The allocations were still present 30 seconds after closing the Sandbox.
In November, another user reported a large number of retained allocations on 26H2 build 26300.9818. The WCsc count did not rise over 60 seconds. Other container-related operations were running alongside WSL, and the reporter could not isolate WSL as the sole source. A short period without new allocations does not show that previously allocated memory has been freed.
On August 11, a WSL team member said a fix existed in a development build of Windows. On August 19, they said it appeared the fix had yet to reach Insider builds. When the new results were posted on December 5 (UTC), the issue was still open with the fixinbound label.
Months after the August update about a fix in development, the leak still occurred on some systems running the generally available 26H2 release. Microsoft also released preview update KB5132057, build 26300.10075, on November 19 (U.S. time). The December 5 report (UTC) used build 26300.9974. Developing a fix and eliminating the problem on users’ PCs are separate milestones.
Restarting and narrowing the scope of searches
In the December 5 report (UTC), a normal shutdown with Fast Startup enabled did not free the memory, but restarting did. Fast Startup saves a kernel memory image, including drivers, and restores it on startup, so a shutdown and a restart can behave differently in cases like this.
When memory usage keeps climbing on a PC that stays on for long periods, check the kernel paged and nonpaged pools. PoolMon, part of Microsoft’s Windows Driver Kit, shows allocations, frees, and usage by pool tag. Microsoft documents how to investigate memory leaks with PoolMon. Comparing records taken before a restart with subsequent measurements can help track the increase.
Disabling Windows Sandbox worked on the PC in this report. Microsoft lists Windows 11 Pro, Enterprise, Pro Education/SE, and Education as supported editions and excludes Home. Disabling it removes a way to handle unknown files and applications in an isolated environment. People who need Sandbox can try avoiding whole-drive searches from WSL across Windows drives mounted under /mnt. Another option is to limit a search to the directories needed for the task.
Another report investigated retained file handles in container-related operations other than Windows Sandbox. Disabling Sandbox may leave the issue unresolved on some systems.
Disabling a feature built to open unknown files safely can make a PC more stable. It is up to the OS provider to make safety and day-to-day work compatible without forcing users to make that choice.
