lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025090550-CVE-2025-39711-5512@gregkh>
Date: Fri,  5 Sep 2025 19:21:24 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-39711: media: ivsc: Fix crash at shutdown due to missing mei_cldev_disable() calls

From: Greg Kroah-Hartman <gregkh@...nel.org>

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

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

media: ivsc: Fix crash at shutdown due to missing mei_cldev_disable() calls

Both the ACE and CSI driver are missing a mei_cldev_disable() call in
their remove() function.

This causes the mei_cl client to stay part of the mei_device->file_list
list even though its memory is freed by mei_cl_bus_dev_release() calling
kfree(cldev->cl).

This leads to a use-after-free when mei_vsc_remove() runs mei_stop()
which first removes all mei bus devices calling mei_ace_remove() and
mei_csi_remove() followed by mei_cl_bus_dev_release() and then calls
mei_cl_all_disconnect() which walks over mei_device->file_list dereferecing
the just freed cldev->cl.

And mei_vsc_remove() it self is run at shutdown because of the
platform_device_unregister(tp->pdev) in vsc_tp_shutdown()

When building a kernel with KASAN this leads to the following KASAN report:

[ 106.634504] ==================================================================
[ 106.634623] BUG: KASAN: slab-use-after-free in mei_cl_set_disconnected (drivers/misc/mei/client.c:783) mei
[ 106.634683] Read of size 4 at addr ffff88819cb62018 by task systemd-shutdow/1
[ 106.634729]
[ 106.634767] Tainted: [E]=UNSIGNED_MODULE
[ 106.634770] Hardware name: Dell Inc. XPS 16 9640/09CK4V, BIOS 1.12.0 02/10/2025
[ 106.634773] Call Trace:
[ 106.634777]  <TASK>
...
[ 106.634871] kasan_report (mm/kasan/report.c:221 mm/kasan/report.c:636)
[ 106.634901] mei_cl_set_disconnected (drivers/misc/mei/client.c:783) mei
[ 106.634921] mei_cl_all_disconnect (drivers/misc/mei/client.c:2165 (discriminator 4)) mei
[ 106.634941] mei_reset (drivers/misc/mei/init.c:163) mei
...
[ 106.635042] mei_stop (drivers/misc/mei/init.c:348) mei
[ 106.635062] mei_vsc_remove (drivers/misc/mei/mei_dev.h:784 drivers/misc/mei/platform-vsc.c:393) mei_vsc
[ 106.635066] platform_remove (drivers/base/platform.c:1424)

Add the missing mei_cldev_disable() calls so that the mei_cl gets removed
from mei_device->file_list before it is freed to fix this.

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


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

	Issue introduced in 6.6 with commit 29006e196a5661d9afc8152fa2bf8a5347ac17b4 and fixed in 6.6.103 with commit 3c0e4cc4f55f9a1db2a761e4ffb27c9594245888
	Issue introduced in 6.6 with commit 29006e196a5661d9afc8152fa2bf8a5347ac17b4 and fixed in 6.12.44 with commit 639f5b33fcd7c59157f29b09f6f2866eacf9279c
	Issue introduced in 6.6 with commit 29006e196a5661d9afc8152fa2bf8a5347ac17b4 and fixed in 6.16.4 with commit 1dfe73394dcfc9b049c8da0dc181c45f156a5f49
	Issue introduced in 6.6 with commit 29006e196a5661d9afc8152fa2bf8a5347ac17b4 and fixed in 6.17-rc1 with commit 0c92c49fc688cfadacc47ae99b06a31237702e9e

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-39711
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/media/pci/intel/ivsc/mei_ace.c
	drivers/media/pci/intel/ivsc/mei_csi.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/3c0e4cc4f55f9a1db2a761e4ffb27c9594245888
	https://git.kernel.org/stable/c/639f5b33fcd7c59157f29b09f6f2866eacf9279c
	https://git.kernel.org/stable/c/1dfe73394dcfc9b049c8da0dc181c45f156a5f49
	https://git.kernel.org/stable/c/0c92c49fc688cfadacc47ae99b06a31237702e9e

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ