Skip to content
Heist/ feed
Back to feed
UnratedFix available

net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns()

Type: advisorySources: OSV

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().

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.235, 5.15.179, 6.1.129, 6.12.13, 6.13.2, 6.6.76
CVEs
CVE-2025-21799
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 05:27 UTC · Revision 1

Source evidence

net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns()

core-osv · Original source

Published 27 Feb 2025, 20:00 UTC

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().

osv:CVE-2025-21799

Kernel

Fixed versions: 5.10.235, 5.15.179, 6.1.129, 6.6.76, 6.12.13, 6.13.2

Complete source record
{
  "id": "9a4e1e318fd9d9e77086c47d5e04fedb101a5263c727cb9428079381c3c632d7",
  "url": "https://osv.dev/vulnerability/CVE-2025-21799",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns()",
    "summary": "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().",
    "evidence": "osv:CVE-2025-21799",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.235",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.179",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.129",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.76",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.13",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-21799",
      "aliases": [
        "CVE-2025-21799"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "93a76530316a3d8cc2d82c3deca48424fee92100"
                },
                {
                  "fixed": "321990fdf4f1bb64e818c7140688bf33d129e48d"
                },
                {
                  "fixed": "ed8c0300f302338c36edb06bca99051e5be6fb2f"
                },
                {
                  "fixed": "aea5cca681d268f794fa2385f9ec26a5cce025cd"
                },
                {
                  "fixed": "88fd5db8c0073bd91d18391feb5741aeb0a2b475"
                },
                {
                  "fixed": "8448c87b3af68bebca21e3136913f7f77e363515"
                },
                {
                  "fixed": "8aae91ae1c65782a169ec070e023d4d269e5d6e6"
                },
                {
                  "fixed": "4395a44acb15850e492dd1de9ec4b6479d96bc80"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21799.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.7.0"
                },
                {
                  "fixed": "5.10.235"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.179"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.129"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.76"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.13"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21799.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:43.090283071Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/321990fdf4f1bb64e818c7140688bf33d129e48d",
        "https://git.kernel.org/stable/c/4395a44acb15850e492dd1de9ec4b6479d96bc80",
        "https://git.kernel.org/stable/c/8448c87b3af68bebca21e3136913f7f77e363515",
        "https://git.kernel.org/stable/c/88fd5db8c0073bd91d18391feb5741aeb0a2b475",
        "https://git.kernel.org/stable/c/8aae91ae1c65782a169ec070e023d4d269e5d6e6",
        "https://git.kernel.org/stable/c/aea5cca681d268f794fa2385f9ec26a5cce025cd",
        "https://git.kernel.org/stable/c/ed8c0300f302338c36edb06bca99051e5be6fb2f",
        "https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html",
        "https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21799.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-21799",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21799.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-21799",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 510706,
  "published_at": "2025-02-27T20:00:54.223+00:00"
}