Linux Kernel DAIF Masking Vulnerability in ARM64 Stack Switching Functions

Vulnerability

A vulnerability has been identified in the Linux kernel's handling of stack switches in ARM64 architecture, specifically within the 'cpu_switch_to()' and 'call_on_irq_stack()' functions. These functions manage transitions between different stacks and the Shadow Call Stack (SCS) when enabled. However, the stack changes cannot be performed atomically and can be disrupted by SErrors or Debug Exceptions. Such interruptions may cause a mismatch in the stacks and SCS, leading to corrupted stack states. This issue is particularly problematic when 'CONFIG_ARM64_PSEUDO_NMI' is enabled, as it allows the CPU to receive pseudo-NMI interrupts during critical stack switching processes, potentially causing unpredictable kernel panics.

Impact

The vulnerability can lead to kernel panics by causing tasks to return to incorrect addresses on the Shadow Call Stack, or to the IRQ Shadow Call Stack, which can trigger panics through certain configurations.

Remediation

The vulnerability has been addressed by modifying the 'cpu_switch_to()' and 'call_on_irq_stack()' functions to properly mask and restore the DAIF register, ensuring consistent behavior across different configurations. Users should upgrade to the latest version of the Linux kernel where this vulnerability has been patched.

Added: Aug 22, 2025, 4:32 PM
Updated: Aug 22, 2025, 7:01 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
4.0
remediation
7.7
relevance
0.4
threat
3.2
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.