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-97904 Overview
CVE-2026-97904 is a race condition in the Linux kernel's cpufreq subsystem. The flaw exists in cpufreq_policy_alloc(), which initializes policy->rwsem after kobject_init_and_add() has already published the policy sysfs directory and its default attributes. A userspace sysfs access can reach a policy callback before the semaphore is initialized, leading to undefined behavior in the kernel. The upstream fix reorders initialization so policy->rwsem is ready before the policy kobject becomes visible to sysfs.
Critical Impact
Userspace sysfs reads or writes against a newly created cpufreq policy can invoke callbacks that acquire an uninitialized read-write semaphore, destabilizing the kernel.
Affected Products
- Linux kernel (upstream cpufreq subsystem)
- Distributions shipping affected stable kernel branches prior to the referenced fixes
- Systems exposing /sys/devices/system/cpu/cpufreq/ policy attributes to local users
Discovery Timeline
- 2026-09-25 - CVE-2026-97904 published to the National Vulnerability Database (NVD)
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97904
Vulnerability Analysis
The Linux kernel cpufreq subsystem manages per-CPU frequency scaling policies. Each policy exposes attributes under /sys/devices/system/cpu/cpufreq/ for userspace inspection and tuning. cpufreq_policy_alloc() is responsible for allocating the struct cpufreq_policy and preparing its synchronization primitives, including the rwsem field used to serialize policy state access.
The defect is an ordering bug. kobject_init_and_add() publishes the policy kobject to sysfs and makes its default attributes visible before init_rwsem(&policy->rwsem) runs. Once sysfs entries exist, the Virtual File System (VFS) layer can dispatch read or write operations on those attributes. These operations invoke cpufreq show/store callbacks that attempt to acquire policy->rwsem, which at that moment is still zeroed memory rather than a valid semaphore.
The race window is narrow but reachable on systems where privileged or semi-privileged processes probe cpufreq attributes during CPU hotplug or boot. The outcome ranges from lock debugging warnings on kernels built with CONFIG_DEBUG_LOCK_ALLOC to deadlocks or kernel memory corruption as the semaphore internal state is manipulated before being initialized.
Root Cause
The root cause is a Time-of-Check Time-of-Use (TOCTOU) style initialization ordering flaw. The policy kobject is published to sysfs before all of its backing synchronization state is constructed, violating the invariant that any object reachable from userspace must be fully initialized.
Attack Vector
Exploitation requires local access to a system during the window in which a new cpufreq policy is being allocated, typically at boot, driver load, or CPU online events. A process reading or writing policy sysfs attributes during that window can trigger the race. The vulnerability is not remotely reachable and is primarily a local stability and reliability issue.
No public proof-of-concept is referenced in the advisory. See the upstream commits for the patch logic: commit 27c9b491, commit 2cee937f, commit 3e5d1bf4, and commit dc11263c.
Detection Methods for CVE-2026-97904
Indicators of Compromise
- Kernel log entries referencing cpufreq policy callbacks that produce lockdep warnings or BUG: traces during boot or CPU hotplug
- Unexpected kernel oops or panic messages originating in cpufreq_policy_alloc or sysfs show/store handlers
- Processes repeatedly probing /sys/devices/system/cpu/cpu*/cpufreq/ attributes immediately after CPU online events
Detection Strategies
- Audit installed kernel package versions against the fixed stable branches referenced in the kernel.org commits
- Enable CONFIG_DEBUG_LOCK_ALLOC and CONFIG_PROVE_LOCKING in test builds to surface uninitialized semaphore use
- Monitor dmesg and /var/log/kern.log for cpufreq-related stack traces following CPU hotplug operations
Monitoring Recommendations
- Centralize kernel log collection and alert on kernel oops or lockdep splats involving cpufreq
- Track CPU hotplug events alongside sysfs access patterns on multi-tenant hosts
- Baseline normal cpufreq attribute access and flag unusual process activity against those paths
How to Mitigate CVE-2026-97904
Immediate Actions Required
- Identify Linux hosts running affected stable kernel branches and prioritize patching
- Apply distribution kernel updates that incorporate the upstream fix reordering init_rwsem before kobject_init_and_add
- Reboot patched systems to load the corrected kernel image
Patch Information
The fix initializes policy->rwsem before the policy kobject is published to sysfs, ensuring sysfs callbacks always observe a valid semaphore. The change is distributed across the following stable commits: commit 27c9b491, commit 2cee937f, commit 3e5d1bf4, and commit dc11263c. Consult your distribution's security tracker for the exact package versions containing the backport.
Workarounds
- Restrict unprivileged access to /sys/devices/system/cpu/cpufreq/ attributes using mount options or Mandatory Access Control (MAC) policies where feasible
- Avoid automated tooling that aggressively polls cpufreq policy attributes during CPU hotplug or boot
- Disable dynamic CPU hotplug on production systems that do not require it until patched kernels are deployed
# Verify installed kernel version against distribution advisories
uname -r
# Check for cpufreq-related kernel messages
dmesg | grep -i cpufreq
# Restrict read access to cpufreq sysfs attributes (example)
find /sys/devices/system/cpu/cpufreq -type f -name '*' -exec chmod o-rwx {} \;
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

