CVE-2026-64585: can: esd_usb: kill anchored URBs before freeing netdevs

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026080617-CVE-2026-64585-cfa1@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

can: esd_usb: kill anchored URBs before freeing netdevs

esd_usb_disconnect() frees each CAN netdev with free_candev() inside
its per-netdev loop and only calls unlink_all_urbs(dev) afterwards.
The per-netdev private data (struct esd_usb_net_priv) is embedded in
the net_device allocation returned by alloc_candev(), so once
free_candev() has run, dev->nets[i] points to freed memory.
unlink_all_urbs() then dereferences the freed dev->nets[i] to kill the
per-netdev TX anchor (usb_kill_anchored_urbs(&priv->tx_submitted)),
clear active_tx_jobs, and reset priv->tx_contexts[].

Reorder the teardown so the anchored URBs are killed before the netdevs
are freed, matching other CAN/USB drivers in the same directory such as
ems_usb, usb_8dev and mcba_usb, which unregister, then unlink, then
free: unregister the netdevs first (which stops their TX queues), call
unlink_all_urbs(dev) once, then free the netdevs.

This issue was found by an in-house static analysis tool.

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


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

	Issue introduced in 2.6.36 with commit 96d8e90382dc336b5de401164597edfdc2e8d9f1 and fixed in 6.1.178 with commit aa1d005927db38af783c1a4a8a00a39e0229ab2d
	Issue introduced in 2.6.36 with commit 96d8e90382dc336b5de401164597edfdc2e8d9f1 and fixed in 6.6.145 with commit a02e1d8f191324583599544d54e59e6a2b74bb0e
	Issue introduced in 2.6.36 with commit 96d8e90382dc336b5de401164597edfdc2e8d9f1 and fixed in 6.12.97 with commit a3314f10369df70925140f59bbe069718f65a0b9
	Issue introduced in 2.6.36 with commit 96d8e90382dc336b5de401164597edfdc2e8d9f1 and fixed in 6.18.40 with commit 765ba1c91823a296447528791b89a6504947fd5c
	Issue introduced in 2.6.36 with commit 96d8e90382dc336b5de401164597edfdc2e8d9f1 and fixed in 7.1.5 with commit 5832c55b3c824ba2fe9c36ac3c411baddcce053e
	Issue introduced in 2.6.36 with commit 96d8e90382dc336b5de401164597edfdc2e8d9f1 and fixed in 7.2-rc4 with commit c43122fef328a70045fe7621c06de6b2b8e19264

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-64585
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/can/usb/esd_usb.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/aa1d005927db38af783c1a4a8a00a39e0229ab2d
	https://git.kernel.org/stable/c/a02e1d8f191324583599544d54e59e6a2b74bb0e
	https://git.kernel.org/stable/c/a3314f10369df70925140f59bbe069718f65a0b9
	https://git.kernel.org/stable/c/765ba1c91823a296447528791b89a6504947fd5c
	https://git.kernel.org/stable/c/5832c55b3c824ba2fe9c36ac3c411baddcce053e
	https://git.kernel.org/stable/c/c43122fef328a70045fe7621c06de6b2b8e19264
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.