Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97585 Overview
CVE-2026-97585 is a double-unmap vulnerability in the Linux kernel's Andrew File System (AFS) client. The flaw resides in afs_edit_dir_remove(), which manually calls kunmap on directory blocks without clearing afs_dir_iter::block. When afs_dir_find_block() is invoked twice in sequence, such as when the modified block is not first in the hash chain, the kernel unmaps the same page twice. The issue has been resolved upstream by introducing a cleanup function that correctly unmaps the block referenced by the iterator.
Critical Impact
A double-kunmap on an AFS directory block can corrupt kernel page mapping state, leading to memory management inconsistencies and potential denial of service on systems using AFS.
Affected Products
- Linux kernel (AFS filesystem client)
- Distributions shipping affected mainline/stable kernels with AFS support enabled
- Systems mounting AFS volumes that invoke directory edit operations
Discovery Timeline
- 2026-09-25 - CVE CVE-2026-97585 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97585
Vulnerability Analysis
The vulnerability lives in the Linux kernel AFS client code path responsible for in-place directory edits. The afs_edit_dir_remove() function removes directory entries while walking through directory blocks via an afs_dir_iter iterator. Each block retrieved from the page cache requires a corresponding kunmap() to release the kernel virtual address mapping. The buggy implementation issued the kunmap() call manually without resetting the iter.block field. Subsequent calls into afs_dir_find_block() therefore observed a stale pointer and triggered a second unmap on an already-unmapped page.
Root Cause
The root cause is improper cleanup of iterator state after a resource release, a pattern typically categorized as a double-free style defect on mapped pages. Because the iterator block pointer continued to reference a page that had already been unmapped, control flow that re-entered afs_dir_find_block() repeated the unmap operation. The upstream fix replaces the manual kunmap calls with a cleanup helper that both unmaps the page and clears the iterator reference atomically.
Attack Vector
Triggering the condition requires AFS directory modification activity where the targeted block is not the first in the hash chain, which causes afs_dir_find_block() to execute twice in succession. Exploitation requires local filesystem interaction with mounted AFS volumes rather than remote network access. The vulnerability manifests as kernel memory management corruption rather than a direct code execution primitive. See the upstream commits for implementation details: Kernel Patch Update 9d6c703, Kernel Commit b60f51e4 Changes, and Kernel Commit e3cfd3eb Updates.
Detection Methods for CVE-2026-97585
Indicators of Compromise
- Kernel oops or warning traces originating from afs_edit_dir_remove or afs_dir_find_block in dmesg output.
- BUG: messages referencing kunmap, page mapping counters, or AFS directory block operations.
- Unexpected crashes or hangs on hosts actively mounting and modifying AFS volumes.
Detection Strategies
- Inventory running kernel versions across the fleet and compare against the fixed stable branches referenced in the upstream commits.
- Audit which hosts have the kafs module loaded and which mount AFS volumes with write access.
- Correlate kernel panic telemetry with workloads that perform frequent AFS directory edits to isolate exposure.
Monitoring Recommendations
- Forward kernel ring buffer logs to a centralized logging platform and alert on AFS or page-mapping stack traces.
- Monitor host availability metrics for repeated unexpected reboots on AFS-dependent systems.
- Track package and kernel update compliance to confirm patched builds are deployed where AFS is in use.
How to Mitigate CVE-2026-97585
Immediate Actions Required
- Upgrade to a Linux kernel release that incorporates the fixes in commits 9d6c703e24da, b60f51e4ad0f, and e3cfd3eb7d5b.
- Prioritize patching on hosts where the kafs kernel module is loaded and AFS volumes are mounted read-write.
- Reboot patched systems to ensure the new kernel is active and the vulnerable code path is removed.
Patch Information
The fix refactors afs_edit_dir_remove() to use a cleanup helper that unmaps the directory block referenced by afs_dir_iter::block and clears the pointer, eliminating the double-unmap window. Apply the stable kernel updates referenced by Kernel Patch Update 9d6c703, Kernel Commit b60f51e4 Changes, and Kernel Commit e3cfd3eb Updates. Consume these through your distribution's security updates whenever possible.
Workarounds
- Unmount AFS volumes on affected systems until a patched kernel is installed if the workload permits.
- Blacklist or avoid loading the kafs module on hosts that do not require AFS connectivity.
- Restrict write access to AFS directories so that directory edit operations are not performed by untrusted local users.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

