Skip to contentSkip to conversation

CVE-2025-68338: net: dsa: microchip: Don't free uninitialized ksz_irq

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 23, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

net: dsa: microchip: Don't free uninitialized ksz_irq

If something goes wrong at setup, ksz_irq_free() can be called on uninitialized ksz_irq (for example when ksz_ptp_irq_setup() fails). It leads to freeing uninitialized IRQ numbers and/or domains.

Use dsa_switch_for_each_user_port_continue_reverse() in the error path to iterate only over the fully initialized ports.

The Linux kernel CVE team has assigned CVE-2025-68338 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.3 with commit cc13ab18b201ab630f03511060ba289b70052959 and fixed in 6.12.61 with commit 9428654c827fa8d38b898135d26d39ee2d544246
	Issue introduced in 6.3 with commit cc13ab18b201ab630f03511060ba289b70052959 and fixed in 6.17.11 with commit 32abbcf4379a0f851d7eb9d4389e7bf5c64bf6c0
	Issue introduced in 6.3 with commit cc13ab18b201ab630f03511060ba289b70052959 and fixed in 6.18 with commit 25b62cc5b22c45face094ae3e8717258e46d1d19

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2025-68338

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/dsa/microchip/ksz_common.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/9428654c827fa8d38b898135d26d39ee2d544246
	https://git.kernel.org/stable/c/32abbcf4379a0f851d7eb9d4389e7bf5c64bf6c0
	https://git.kernel.org/stable/c/25b62cc5b22c45face094ae3e8717258e46d1d19