Skip to contentSkip to conversation

CVE-2026-31759: usb: ulpi: fix double free in ulpi_register_interface() error path

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 1

lore
Share & tools
lore
#0 lore raw

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

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

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

usb: ulpi: fix double free in ulpi_register_interface() error path

When device_register() fails, ulpi_register() calls put_device() on ulpi->dev.

The device release callback ulpi_dev_release() drops the OF node reference and frees ulpi, but the current error path in ulpi_register_interface() then calls kfree(ulpi) again, causing a double free.

Let put_device() handle the cleanup through ulpi_dev_release() and avoid freeing ulpi again in ulpi_register_interface().

The Linux kernel CVE team has assigned CVE-2026-31759 to this issue.

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

	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 5.10.253 with commit 2f70ba9dae13a190673cc3f9b4aad52179738f60
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 5.15.203 with commit ee248e6e941e4f2e634df2bd43e5f1ef810ab6df
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 6.1.168 with commit 272a9b26c336a295e4e209157fed809706c1b1f7
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 6.6.134 with commit aaeae6533d77e6ed4def85baec01e2815ebbef61
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 6.12.81 with commit 8763f8317bb389aded32a32b08f6751cfff657d2
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 6.18.22 with commit 38c28fe25611099230f0965c925499bfcf46a795
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 6.19.12 with commit a6e5461f076c2ef63159f18e5cdbd30b50f0bc15
	Issue introduced in 4.2 with commit 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f and fixed in 7.0 with commit 01af542392b5d41fd659d487015a71f627accce3

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-2026-31759

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/usb/common/ulpi.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/2f70ba9dae13a190673cc3f9b4aad52179738f60
	https://git.kernel.org/stable/c/ee248e6e941e4f2e634df2bd43e5f1ef810ab6df
	https://git.kernel.org/stable/c/272a9b26c336a295e4e209157fed809706c1b1f7
	https://git.kernel.org/stable/c/aaeae6533d77e6ed4def85baec01e2815ebbef61
	https://git.kernel.org/stable/c/8763f8317bb389aded32a32b08f6751cfff657d2
	https://git.kernel.org/stable/c/38c28fe25611099230f0965c925499bfcf46a795
	https://git.kernel.org/stable/c/a6e5461f076c2ef63159f18e5cdbd30b50f0bc15
	https://git.kernel.org/stable/c/01af542392b5d41fd659d487015a71f627accce3