All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-72073: mmc: vub300: fix use-after-free on probe failure
@ 2026-08-15  6:02 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-08-15  6:02 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

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

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

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

mmc: vub300: fix use-after-free on probe failure

The vub300 driver lifetime-manages its controller state using
vub300->kref, with vub300_delete() freeing the mmc host when the last
reference is dropped. The probe error path after the inactivity timer has
been armed still bypasses that lifetime rule, however, and falls through
to mmc_free_host() directly if mmc_add_host() fails.

The race window is between arming the inactivity timer and reaching the
probe error unwind after mmc_add_host() fails:

        probe thread                     timer/workqueue
        ------------                     ---------------
        kref_init(&vub300->kref)         ref = 1
        kref_get(&vub300->kref)          ref = 2, timer ref
        add_timer(inactivity_timer)      fires after one second
        |
        |   race window
        |<---------------------------------------------------->
        |
        mmc_add_host(mmc)
                                         inactivity timer fires
                                         vub300_queue_dead_work()
                                           kref_get()          ref = 3
                                           queue_work(deadwork)
        mmc_add_host() fails
        timer_delete_sync()
        mmc_free_host(mmc)
          frees vub300
                                         deadwork runs
                                           use-after-free

The inactivity timeout is one second, so this would require
mmc_add_host() to both fail and take more than one second to do so. This
is unlikely to happen in practice, but the error path is still wrong.

timer_delete_sync() only waits for the timer callback itself. It does
not flush deadwork that the callback may already have queued. As a
result, queued deadwork can still hold a kref while the probe error path
directly frees the backing mmc host, including the vub300 storage.

Fix this by using the same lifetime mechanism as disconnect. Clear
vub300->interface so that the timer callback and any queued deadwork
return early and drop their references, then drop the initial probe
reference and return without falling through to err_free_host.

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


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

	Issue introduced in 6.2 with commit 0613ad2401f88bdeae5594c30afe318e93b14676 and fixed in 6.18.42 with commit 5b82af744e06cd741938c3da54fdbe564a7e52d9
	Issue introduced in 6.2 with commit 0613ad2401f88bdeae5594c30afe318e93b14676 and fixed in 7.1.5 with commit 618cf6b139503ec18ef93ffd663396aaf99b763a
	Issue introduced in 6.2 with commit 0613ad2401f88bdeae5594c30afe318e93b14676 and fixed in 7.2-rc4 with commit a3b5f242997a3be7404112fd48784881560aea57
	Issue introduced in 4.9.337 with commit 41ed46bdbd2878cd6567abe0974a445f8b1b8ec8
	Issue introduced in 4.14.303 with commit 25f05d762ca5e1c685002a53dd44f68e78ca3feb
	Issue introduced in 4.19.270 with commit a46e681151bbdacdf6b89ee8c4e5bad0555142bb
	Issue introduced in 5.4.229 with commit 3b29f8769d32016b2d89183db4d80c7a71b7e35e
	Issue introduced in 5.10.163 with commit 3049a3b927a40d89d4582ff1033cd7953be773c7
	Issue introduced in 5.15.86 with commit afc898019e7bf18c5eb7a0ac19852fcb1b341b3c
	Issue introduced in 6.0.16 with commit c9e85979b59cb86f0a15defa8199d740e2b36b90
	Issue introduced in 6.1.2 with commit 2044b2ea77945f372ef161d1bbf814e471767ff2

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-72073
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/mmc/host/vub300.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/5b82af744e06cd741938c3da54fdbe564a7e52d9
	https://git.kernel.org/stable/c/618cf6b139503ec18ef93ffd663396aaf99b763a
	https://git.kernel.org/stable/c/a3b5f242997a3be7404112fd48784881560aea57

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-15  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15  6:02 CVE-2026-72073: mmc: vub300: fix use-after-free on probe failure Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.