Skip to contentSkip to conversation

CVE-2025-39872: hsr: hold rcu and dev lock for hsr_get_port_ndev

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 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:

hsr: hold rcu and dev lock for hsr_get_port_ndev

hsr_get_port_ndev calls hsr_for_each_port, which need to hold rcu lock. On the other hand, before return the port device, we need to hold the device reference to avoid UaF in the caller function.

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

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

	Issue introduced in 6.14 with commit 9c10dd8eed74de9e8adeb820939f8745cd566d4a and fixed in 6.16.8 with commit 68a6729afd3e8e9a2a32538642ce92b96ccf9b1d
	Issue introduced in 6.14 with commit 9c10dd8eed74de9e8adeb820939f8745cd566d4a and fixed in 6.17-rc6 with commit 847748fc66d08a89135a74e29362a66ba4e3ab15

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-39872

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/ethernet/ti/icssg/icssg_prueth.c net/hsr/hsr_device.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/68a6729afd3e8e9a2a32538642ce92b96ccf9b1d
	https://git.kernel.org/stable/c/847748fc66d08a89135a74e29362a66ba4e3ab15