Skip to main content

CVE-2025-21799: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-21799cvecve-2025-21799
Published: Thu Feb 27 2025 (02/27/2025, 20:00:54 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns() When getting the IRQ we use k3_udma_glue_tx_get_irq() which returns negative error value on error. So not NULL check is not sufficient to deteremine if IRQ is valid. Check that IRQ is greater then zero to ensure it is valid. There is no issue at probe time but at runtime user can invoke .set_channels which results in the following call chain. am65_cpsw_set_channels() am65_cpsw_nuss_update_tx_rx_chns() am65_cpsw_nuss_remove_tx_chns() am65_cpsw_nuss_init_tx_chns() At this point if am65_cpsw_nuss_init_tx_chns() fails due to k3_udma_glue_tx_get_irq() then tx_chn->irq will be set to a negative value. Then, at subsequent .set_channels with higher channel count we will attempt to free an invalid IRQ in am65_cpsw_nuss_remove_tx_chns() leading to a kernel warning. The issue is present in the original commit that introduced this driver, although there, am65_cpsw_nuss_update_tx_rx_chns() existed as am65_cpsw_nuss_update_tx_chns().

AI-Powered Analysis

AILast updated: 06/30/2025, 09:13:00 UTC

Technical Analysis

CVE-2025-21799 is a vulnerability identified in the Linux kernel specifically within the Ethernet driver for the Texas Instruments AM65 CPSW (AM65-cpsw) network interface. The issue arises from improper handling of IRQ (interrupt request) values during the freeing process in the function am65_cpsw_nuss_remove_tx_chns(). The root cause is that the IRQ retrieval function k3_udma_glue_tx_get_irq() can return a negative error code to indicate failure, but the driver only checks for NULL rather than verifying that the IRQ value is greater than zero. Consequently, if k3_udma_glue_tx_get_irq() fails at runtime during a dynamic channel configuration change (.set_channels call), the driver sets the tx_chn->irq field to a negative value. Later, when attempting to free IRQs for a higher channel count, the driver tries to free an invalid IRQ number, leading to a kernel warning. This improper IRQ management can cause instability in the kernel's network driver subsystem. The vulnerability does not manifest at probe time but can be triggered at runtime when users invoke channel reconfiguration. The flaw has existed since the original introduction of this driver, though the function names have evolved. There are no known exploits in the wild currently, and no CVSS score has been assigned yet. The vulnerability is technical and specific to the Linux kernel's network driver code for TI AM65 CPSW Ethernet hardware.

Potential Impact

For European organizations, the impact of CVE-2025-21799 depends largely on their use of Linux systems running on hardware with the TI AM65 CPSW Ethernet controller, which is common in embedded systems and industrial devices. If exploited, this vulnerability could lead to kernel warnings and potentially kernel instability or crashes due to improper IRQ handling. This could degrade network availability or cause denial of service conditions on affected devices. Industrial control systems, telecommunications infrastructure, or embedded Linux devices in sectors such as manufacturing, energy, or transportation could be affected if they use this hardware and kernel version. While the vulnerability does not directly lead to privilege escalation or data leakage, the resulting kernel instability could disrupt critical network communications and operational technology systems. Given the lack of known exploits, the immediate risk is moderate, but the potential for denial of service in critical infrastructure environments elevates concern for European organizations relying on these embedded Linux systems.

Mitigation Recommendations

To mitigate CVE-2025-21799, organizations should: 1) Apply the official Linux kernel patches that correct the IRQ validation logic in the am65-cpsw driver as soon as they become available. 2) For embedded or industrial Linux systems, coordinate with hardware and OS vendors to ensure updated kernel versions are deployed in a timely manner. 3) Implement runtime monitoring for kernel warnings related to IRQ handling or network driver errors to detect potential exploitation attempts or instability early. 4) Restrict user permissions to prevent unauthorized invocation of .set_channels or similar runtime configuration changes that could trigger the vulnerability. 5) Conduct thorough testing of updated kernels in staging environments to confirm stability before production deployment. 6) Maintain an inventory of devices using the TI AM65 CPSW Ethernet controller to prioritize patching and monitoring efforts. These steps go beyond generic advice by focusing on the specific driver and runtime conditions that trigger the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.770Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9832c4522896dcbe886e

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

Last enriched: 6/30/2025, 9:13:00 AM

Last updated: 8/12/2025, 1:48:41 AM

Views: 12

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