CVE-2023-52740 in Linuxinfo

Summary

by MITRE • 05/21/2024

In the Linux kernel, the following vulnerability has been resolved:

powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch

The RFI and STF security mitigation options can flip the interrupt_exit_not_reentrant static branch condition concurrently with the interrupt exit code which tests that branch.

Interrupt exit tests this condition to set MSR[EE|RI] for exit, then
again in the case a soft-masked interrupt is found pending, to recover the MSR so the interrupt can be replayed before attempting to exit again. If the condition changes between these two tests, the MSR and irq soft-mask state will become corrupted, leading to warnings and possible crashes. For example, if the branch is initially true then false, MSR[EE] will be 0 but PACA_IRQ_HARD_DIS clear and EE may not get
enabled, leading to warnings in irq_64.c.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 09/23/2025

The vulnerability identified as CVE-2023-52740 resides within the Linux kernel's powerpc/64s interrupt handling subsystem, specifically affecting systems utilizing the PowerPC 64-bit architecture. This issue stems from a race condition during interrupt exit processing that occurs when security mitigation switches are active, creating a critical timing vulnerability that can compromise system stability and security. The flaw manifests when the RFI (Return from Interrupt) and STF (Store Termination Facility) security mitigation options concurrently modify the interrupt_exit_not_reentrant static branch condition while the interrupt exit code is actively testing this same branch, creating a window where system state becomes inconsistent and potentially corrupted.

The technical implementation of this vulnerability involves the manipulation of the MSR (Machine State Register) bits EE (External Interrupt Enable) and RI (Recovery Interrupt) during interrupt exit operations. The interrupt handling code performs two distinct tests of the same static branch condition during the exit process - first to set the appropriate MSR[EE|RI] bits for proper exit, and subsequently to recover the MSR state when a soft-masked interrupt is detected as pending. This dual-testing mechanism becomes problematic when the branch condition changes between these two evaluations, creating a scenario where the system's interrupt state management becomes fundamentally corrupted. When the branch condition transitions from true to false during this critical window, the MSR[EE] bit may be set to zero while the PACA_IRQ_HARD_DIS flag remains clear, resulting in a state where external interrupts cannot be properly enabled, leading to system warnings and potential system crashes.

The operational impact of this vulnerability extends beyond simple system instability to encompass serious security implications for powerpc 64-bit systems running the Linux kernel. The race condition can lead to unpredictable system behavior including kernel panics, system hangs, and potential information disclosure through corrupted interrupt handling mechanisms that may allow malicious actors to exploit the inconsistent state. The vulnerability affects systems where security mitigations are actively enabled, particularly those implementing RFI and STF protections that are designed to defend against speculative execution attacks. The timing nature of this race condition makes it particularly challenging to detect and reproduce, as it depends on precise synchronization between mitigation switching operations and interrupt exit processing, potentially allowing for denial of service attacks or privilege escalation scenarios depending on the specific system configuration and attack vectors available.

Mitigation strategies for CVE-2023-52740 should focus on addressing the fundamental race condition through kernel updates that provide proper synchronization mechanisms for the interrupt exit processing. The fix typically involves implementing proper locking or atomic operations around the static branch condition testing to prevent concurrent modification during critical interrupt exit operations. Organizations should prioritize applying the relevant kernel patches that address this specific race condition, as the vulnerability represents a direct threat to system reliability and security. System administrators should also consider monitoring for interrupt-related warnings and kernel messages that may indicate the occurrence of this race condition, particularly in environments where security mitigations are actively enabled. The vulnerability aligns with CWE-362 (Concurrent Execution using Shared Resource with Unprotected Read-Write Access) and may be categorized under ATT&CK techniques related to privilege escalation and system stability compromise through kernel-level vulnerabilities. Given the nature of the issue, it represents a critical concern for enterprise systems and embedded devices running powerpc 64-bit Linux kernels where security mitigations are enabled.

Sources

Do you know our Splunk app?

Download it now for free!