Description

The critical use-after-free vulnerability has now been patched by Microsoft in the Brokering File System driver, BFS, which is tracked under CVE-2025-29970. This allows local attackers to escalate privileges on Windows systems. bfs.sys is a kernel-mode minifilter driver deeply integrated into the Windows sandboxing technologies of AppContainer and AppSilo developed to isolate Win32 applications. In other words, it's considered a high-value target because BFS mediates file, pipe, and registry access for sandboxed processes in enterprise use cases relying on strong isolation. The vulnerability is caused by a bug in the deallocation logic of the DirectoryBlockList found in BFS. Specifically, the driver frees the head of a linked list but keeps on walking the remaining entries, creating a classic use-after-free scenario. This bug is triggered when policy entries are being deleted through the BfsProcessDeletePolicyEntryRequest IOCTL. It was confirmed in bfs.sys version 26100.4061. Microsoft fixed the bug by reorganizing the cleanup logic, shifting deallocation to a separate function called BfsCloseRootDirectory so that memory is only freed after all list entries have been safely processed. The exploitation requires several preconditions, which are: impersonation of a process with an AppSilo token with capabilities, creation of policy entries, and, finally, repetitive add-remove operations. Examination showed that only processes with a Medium Integrity Level can reach the BFS device, thus reducing but not removing the attack vector. Impersonation of a LowBox token and leveraging IOCTL requests at high speeds usually characterize the attack itself. While immediate system crashes are uncommon, sustained exploitation will reliably cause a fatal system error (0x00000050) in bfs.sys. Patches were released in January 2025; Microsoft strongly recommends their deployment ASAP. Monitor for suspicious medium-integrity processes and restrict untrusted sandboxed applications until fully deployed.