Skip to main content

CVE-2021-47229: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47229cvecve-2021-47229
Published: Tue May 21 2024 (05/21/2024, 14:19:32 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: PCI: aardvark: Fix kernel panic during PIO transfer Trying to start a new PIO transfer by writing value 0 in PIO_START register when previous transfer has not yet completed (which is indicated by value 1 in PIO_START) causes an External Abort on CPU, which results in kernel panic: SError Interrupt on CPU0, code 0xbf000002 -- SError Kernel panic - not syncing: Asynchronous SError Interrupt To prevent kernel panic, it is required to reject a new PIO transfer when previous one has not finished yet. If previous PIO transfer is not finished yet, the kernel may issue a new PIO request only if the previous PIO transfer timed out. In the past the root cause of this issue was incorrectly identified (as it often happens during link retraining or after link down event) and special hack was implemented in Trusted Firmware to catch all SError events in EL3, to ignore errors with code 0xbf000002 and not forwarding any other errors to kernel and instead throw panic from EL3 Trusted Firmware handler. Links to discussion and patches about this issue: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=3c7dcdac5c50 https://lore.kernel.org/linux-pci/20190316161243.29517-1-repk@triplefau.lt/ https://lore.kernel.org/linux-pci/971be151d24312cc533989a64bd454b4@www.loen.fr/ https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/1541 But the real cause was the fact that during link retraining or after link down event the PIO transfer may take longer time, up to the 1.44s until it times out. This increased probability that a new PIO transfer would be issued by kernel while previous one has not finished yet. After applying this change into the kernel, it is possible to revert the mentioned TF-A hack and SError events do not have to be caught in TF-A EL3.

AI-Powered Analysis

AILast updated: 06/26/2025, 14:51:21 UTC

Technical Analysis

CVE-2021-47229 is a vulnerability in the Linux kernel related to the handling of Programmed Input/Output (PIO) transfers on PCI devices using the aardvark driver. The flaw arises when the kernel attempts to initiate a new PIO transfer by writing a zero to the PIO_START register while a previous transfer is still in progress (indicated by a value of one in PIO_START). This improper handling causes an External Abort on the CPU, triggering a System Error (SError) interrupt and resulting in a kernel panic with the message "Kernel panic - not syncing: Asynchronous SError Interrupt." The root cause is that during link retraining or after a link down event, the PIO transfer can take an extended time (up to 1.44 seconds) to complete, increasing the likelihood that the kernel will issue a new PIO transfer prematurely. Previously, this issue was misdiagnosed and mitigated by a workaround in the Trusted Firmware (TF-A) that caught and suppressed these SError events at the EL3 exception level, preventing kernel panics but masking the underlying problem. The fix involves modifying the kernel to reject new PIO transfer requests if the previous transfer has not finished unless the previous transfer has timed out. This correction allows the removal of the TF-A workaround and ensures proper error handling and system stability. The vulnerability affects specific Linux kernel versions identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and was publicly disclosed in May 2024. No known exploits are reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability primarily threatens system stability and availability rather than confidentiality or integrity. Linux is widely used across European enterprises, governments, and critical infrastructure, especially in servers, embedded systems, and network devices. Systems utilizing the affected PCI aardvark driver or similar PIO mechanisms are at risk of unexpected kernel panics leading to service interruptions or downtime. This can impact data centers, telecommunications, industrial control systems, and cloud service providers relying on Linux-based platforms. While no direct exploitation for data breach or privilege escalation is indicated, repeated kernel panics can degrade operational continuity, cause loss of unsaved data, and increase maintenance overhead. Organizations with high availability requirements or real-time systems may face significant operational disruptions. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to accidental or triggered panics, potentially exploited by attackers to cause denial of service.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the fix for CVE-2021-47229. Specifically, they should ensure that the kernel rejects new PIO transfers if the previous transfer is still active unless it has timed out, as per the patch referenced by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2. Systems using Trusted Firmware with the previous workaround should be updated to remove the hack that suppresses SError events, ensuring proper error propagation and handling. It is advisable to audit systems for the presence of the aardvark PCI driver or similar PIO transfer mechanisms and monitor kernel logs for SError interrupts or related panics. Implementing robust monitoring and alerting for kernel panics can help detect attempts to trigger this vulnerability. For critical systems, consider isolating or limiting the use of affected hardware components until patches are applied. Additionally, coordinate with hardware vendors and Linux distribution maintainers to obtain timely updates and verify compatibility. Testing patches in staging environments before production deployment is recommended to avoid regressions.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-04-10T18:59:19.530Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea112

Added to database: 5/21/2025, 9:09:09 AM

Last enriched: 6/26/2025, 2:51:21 PM

Last updated: 7/29/2025, 11:25:55 AM

Views: 10

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats