CVE-2026-23199 Overview
CVE-2026-23199 is a deadlock vulnerability in the Linux kernel's procfs subsystem, specifically affecting the PROCMAP_QUERY ioctl functionality. The vulnerability occurs when the kernel attempts to fetch an optional build ID while still holding the VMA (Virtual Memory Area) lock, creating a lock ordering conflict that can result in system deadlock.
The issue was identified through automated testing by syzbot, which detected an unsafe locking scenario where two CPUs could become deadlocked when acquiring mmap_lock and i_mutex_key locks in conflicting orders. This vulnerability was exacerbated by a recent commit (777a8560fd29) that modified the lib/buildid implementation to use __kernel_read() for sleepable contexts.
Critical Impact
System deadlock condition affecting Linux kernel procfs operations, potentially causing system hangs when applications query process memory maps with build ID requests.
Affected Products
- Linux kernel versions with PROCMAP_QUERY functionality
- Systems utilizing procfs for process memory introspection
- Environments running kernel debugging or profiling tools that query build IDs
Discovery Timeline
- 2026-02-14 - CVE CVE-2026-23199 published to NVD
- 2026-02-18 - Last updated in NVD database
Technical Details for CVE-2026-23199
Vulnerability Analysis
This deadlock vulnerability stems from improper lock ordering in the kernel's procfs implementation when handling PROCMAP_QUERY ioctl requests. The do_procmap_query() function attempts to parse build IDs via __build_id_parse() while still holding the mmap_lock, which can trigger a chain of operations that requires acquiring the inode mutex (i_mutex_key).
The problematic execution path involves:
- A process holding mmap_lock (via rlock(&mm->mmap_lock))
- The build ID parsing code invoking freader_fetch(), which calls __kernel_read()
- __kernel_read() then attempts to acquire i_mutex_key via blkdev_read_iter()
Simultaneously, another CPU may hold i_mutex_key and attempt to acquire mmap_lock, creating an ABBA deadlock scenario. The kernel's lock validator (lockdep) correctly identifies this as a potential deadlock.
The fix introduces a new internal API function build_id_parse_file() that accepts a file reference directly rather than a VMA. This allows the kernel to grab a file reference count while the VMA is still locked, release the VMA lock, and then safely perform the build ID parsing operation without holding conflicting locks.
Root Cause
The root cause is an unsafe lock ordering pattern introduced when the lib/buildid subsystem was modified to use __kernel_read() for sleepable contexts. The original implementation did not account for the fact that __kernel_read() may need to acquire filesystem-level locks that conflict with the memory management locks already held during PROCMAP_QUERY operations. The kernel's internal locking dependency graph shows that mmap_lock and the inode mutex can now form a circular dependency through the build ID parsing path.
Attack Vector
This vulnerability is primarily a reliability and availability issue rather than a direct security exploit. The attack vector involves triggering the deadlock condition through:
- Local access required: An attacker needs local access to invoke procfs ioctl operations
- Race condition exploitation: The deadlock requires specific timing where two CPUs enter the conflicting lock acquisition paths simultaneously
- Denial of Service potential: A successful trigger causes system hang, requiring a hard reboot to recover
The vulnerability manifests in the procfs_procmap_ioctl() handler when processing queries that request build ID information. The kernel's lock ordering between mmap_lock and filesystem inode locks becomes inverted when the build ID parsing code attempts to read from block devices while VMA locks are held.
Detection Methods for CVE-2026-23199
Indicators of Compromise
- System hangs or lockups when debugging tools query process memory maps
- Kernel lockdep warnings in system logs indicating circular lock dependencies involving mmap_lock and i_mutex_key
- Processes stuck in uninterruptible sleep state (D state) during procfs operations
- Kernel ring buffer messages showing the deadlock stack trace pattern from syzbot
Detection Strategies
- Monitor kernel logs (dmesg) for lockdep warnings mentioning circular locking scenarios with mmap_lock
- Implement automated kernel log analysis for deadlock detection patterns
- Use kernel tracing tools to identify processes making PROCMAP_QUERY ioctl calls with build ID requests
- Deploy syzbot-style fuzzing in test environments to proactively identify the issue
Monitoring Recommendations
- Enable kernel lockdep debugging in development and staging environments to catch lock ordering issues
- Configure alerting on system watchdog triggers that may indicate kernel deadlocks
- Monitor for elevated D-state process counts that could indicate VMA lock contention
- Track procfs ioctl usage patterns for anomalous build ID query frequencies
How to Mitigate CVE-2026-23199
Immediate Actions Required
- Update to a patched kernel version containing the fix commits
- Review applications that use PROCMAP_QUERY with build ID requests and consider temporary workarounds
- Monitor systems for deadlock symptoms until patches are applied
- Ensure kernel debugging and profiling tools are updated to compatible versions
Patch Information
The Linux kernel maintainers have released patches that modify the internal API to safely handle build ID parsing without holding VMA locks. The fix introduces build_id_parse_file() which accepts a file reference directly, allowing the kernel to:
- Grab the file reference count while VMA is still locked
- Release the VMA lock
- Safely perform build ID parsing without lock conflicts
The patches are available through the following kernel git commits:
- Commit b5cbacd7f86f4f62b8813688c8e73be94e8e1951
- Commit b9b97e6aeb534315f9646b2090d1a5024c6a4e82
- Commit cbc03ce3e6ce7e21214c3f02218213574c1a2d08
Workarounds
- Avoid using debugging or profiling tools that query build IDs via procfs until patched
- Limit concurrent access to procfs memory map queries in multi-threaded applications
- Consider disabling optional build ID fetching in applications where supported until kernel is patched
- Implement application-level rate limiting for procfs ioctl operations
# Check current kernel version
uname -r
# Verify if patch commits are present in your kernel
git log --oneline | grep -E "(b5cbacd7f86f|b9b97e6aeb53|cbc03ce3e6ce)"
# Monitor for lockdep warnings related to this issue
dmesg | grep -i "deadlock"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


