Skip to contentSkip to conversation

CVE-2025-68789: hwmon: (ibmpex) fix use-after-free in high/low store

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jan 13

lore
Share & tools
lore
#0 lore raw

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

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

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

hwmon: (ibmpex) fix use-after-free in high/low store

The ibmpex_high_low_store() function retrieves driver data using dev_get_drvdata() and uses it without validation. This creates a race condition where the sysfs callback can be invoked after the data structure is freed, leading to use-after-free.

Fix by adding a NULL check after dev_get_drvdata(), and reordering operations in the deletion path to prevent TOCTOU.

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

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

	Issue introduced in 2.6.24 with commit 57c7c3a0fdea95eddcaeba31e7ca7dfc917682ab and fixed in 6.1.160 with commit 533ead425f8109b02fecc7e72d612b8898ec347a
	Issue introduced in 2.6.24 with commit 57c7c3a0fdea95eddcaeba31e7ca7dfc917682ab and fixed in 6.6.120 with commit fa37adcf1d564ef58b9dfb01b6c36d35c5294bad
	Issue introduced in 2.6.24 with commit 57c7c3a0fdea95eddcaeba31e7ca7dfc917682ab and fixed in 6.12.64 with commit 68d62e5bebbd118b763e8bb210d5cf2198ef450c
	Issue introduced in 2.6.24 with commit 57c7c3a0fdea95eddcaeba31e7ca7dfc917682ab and fixed in 6.18.3 with commit 5aa2139201667c1f644601e4529c4acd6bf8db5a
	Issue introduced in 2.6.24 with commit 57c7c3a0fdea95eddcaeba31e7ca7dfc917682ab and fixed in 6.19-rc2 with commit 6946c726c3f4c36f0f049e6f97e88c510b15f65d

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

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/hwmon/ibmpex.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/533ead425f8109b02fecc7e72d612b8898ec347a
	https://git.kernel.org/stable/c/fa37adcf1d564ef58b9dfb01b6c36d35c5294bad
	https://git.kernel.org/stable/c/68d62e5bebbd118b763e8bb210d5cf2198ef450c
	https://git.kernel.org/stable/c/5aa2139201667c1f644601e4529c4acd6bf8db5a
	https://git.kernel.org/stable/c/6946c726c3f4c36f0f049e6f97e88c510b15f65d