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-97905 Overview
CVE-2026-97905 is a Linux kernel vulnerability in the cpufreq subsystem. The flaw stems from cpufreq_policy_alloc() allocating policy->cpus through alloc_cpumask_var() without zero-initialization. When CONFIG_CPUMASK_OFFSTACK=y is set, the bitmap retains leftover slab allocator contents. The sysfs policy directory becomes reachable before cpufreq_policy_online() writes the first valid cpumask value. During this window, show() and store() handlers gate on policy_is_inactive(), which only checks for an empty cpumask. A non-zero garbage bitmap causes the handlers to execute attribute callbacks against an uninitialized policy.
Critical Impact
Attribute callbacks can run on a cpufreq policy whose cpumask contains uninitialized kernel memory, creating undefined behavior in the frequency scaling path.
Affected Products
- Linux kernel builds with CONFIG_CPUMASK_OFFSTACK=y
- Linux kernel branches containing the pre-patch cpufreq_policy_alloc() implementation
- Downstream distributions shipping affected stable kernel versions
Discovery Timeline
- 2026-09-25 - CVE CVE-2026-97905 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97905
Vulnerability Analysis
The cpufreq subsystem manages CPU frequency scaling policies and exposes them to userspace through sysfs. Each policy tracks three cpumasks: cpus, related_cpus, and real_cpus. The sibling masks are allocated with zeroing semantics, but policy->cpus uses alloc_cpumask_var() without the __GFP_ZERO flag.
On kernels configured with CONFIG_CPUMASK_OFFSTACK=y, cpumasks live in separate kmalloc_node() allocations. The returned bitmap contains whatever bytes the slab allocator previously held. The ordering in cpufreq_online() compounds the issue: kobject_init_and_add() publishes the policy%u/ directory to sysfs before cpufreq_policy_online() calls cpumask_copy(policy->cpus, cpumask_of(cpu)).
During this window, userspace readers of sysfs attributes can trigger show() and store() callbacks. These gate access through policy_is_inactive(), which checks cpumask_empty(policy->cpus). A non-empty garbage bitmap defeats this check and the handlers operate on an incompletely initialized policy structure.
Root Cause
The root cause is uninitialized memory use arising from a missing zero-initialization flag during cpumask allocation. The subsystem's sysfs publication precedes the first write to policy->cpus, violating the invariant that policy_is_inactive() depends upon.
Attack Vector
Triggering the condition requires local access during the narrow window between sysfs object registration and the first cpumask_copy() call. The exploitability window opens during cpufreq policy initialization, typically early in boot or during CPU hotplug events. Impact centers on undefined behavior in the cpufreq attribute path rather than direct privilege escalation.
For technical details, consult the upstream patches: Kernel Git Commit 0de2f39, Kernel Git Commit 54d37bc, Kernel Git Commit 6e166b9, and Kernel Git Commit bbc0472.
Detection Methods for CVE-2026-97905
Indicators of Compromise
- Unexpected kernel warnings or oops messages originating from cpufreq attribute handlers during boot or CPU hotplug operations.
- KASAN or KMSAN reports flagging uninitialized memory reads inside cpufreq_policy_alloc() or downstream sysfs show/store callbacks.
- Anomalous frequency scaling behavior correlated with sysfs reads of /sys/devices/system/cpu/cpufreq/policy*/ during initialization.
Detection Strategies
- Enable CONFIG_KASAN and CONFIG_KMSAN in test kernels to surface uninitialized reads against policy->cpus.
- Audit running kernel versions and configuration (CONFIG_CPUMASK_OFFSTACK) against the fixed commit hashes in the stable tree.
- Monitor kernel logs for warnings referencing cpufreq, policy_is_inactive, or cpumask-related errors.
Monitoring Recommendations
- Collect and centralize kernel ring buffer output across Linux fleets to detect cpufreq anomalies at scale.
- Track package versions for linux-image and vendor kernel builds against patched stable releases.
- Flag systems performing frequent CPU hotplug operations where the race window is more likely to be exercised.
How to Mitigate CVE-2026-97905
Immediate Actions Required
- Apply the upstream kernel patches referenced in the stable git tree as soon as vendor builds are available.
- Inventory kernels built with CONFIG_CPUMASK_OFFSTACK=y and prioritize them for patching.
- Validate patched kernels in staging before rolling out to production, especially on systems with aggressive CPU hotplug workloads.
Patch Information
The fix replaces alloc_cpumask_var(&policy->cpus) with zalloc_cpumask_var(&policy->cpus), ensuring the bitmap is zeroed before sysfs publication. This restores the invariant required by policy_is_inactive(). Patches are available at Kernel Git Commit 0de2f39, Kernel Git Commit 54d37bc, Kernel Git Commit 6e166b9, and Kernel Git Commit bbc0472.
Workarounds
- Rebuild the kernel with CONFIG_CPUMASK_OFFSTACK=n where supported to avoid the offstack bitmap allocation path.
- Restrict unprivileged access to /sys/devices/system/cpu/cpufreq/ attributes while awaiting patched kernels.
- Minimize CPU hotplug activity on unpatched systems to reduce the frequency of policy allocation events.
# Verify running kernel version and cpumask offstack configuration
uname -r
grep CONFIG_CPUMASK_OFFSTACK /boot/config-$(uname -r)
# Restrict sysfs cpufreq attribute access to root
chmod -R go-rwx /sys/devices/system/cpu/cpufreq/
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

