PT-2026-122016
CVE-2026-99039
·
Published
2026-10-23
·
Updated
2026-10-23
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
memstick: core: wait for request completion before freeing card
In memstick alloc card() and memstick set rw addr(),
wait for completion timeout() is used to wait for device identification
and address configuration requests to complete.
The memstick subsystem does not provide an abort or cancellation
callback in struct memstick host for in-flight requests. If
wait for completion timeout() expires (for instance, when a USB transfer
or command retry is delayed), memstick alloc card() returns an error and
frees the memstick dev structure via kfree(card).
However, the host controller driver (such as rtsx usb ms) is still
running the request asynchronously in worker context. When the transfer
eventually finishes, the driver writes into host->req->data, which
points to memory inside the already freed card structure. This leads to
a KASAN slab-use-after-free write:
BUG: KASAN: slab-use-after-free in ms read bytes+0x8fe/0x990
Write of size 1 at addr ffff88813c188079 by task kworker/1:5/5239
Workqueue: events rtsx usb ms handle req
Call Trace:
ms read bytes+0x8fe/0x990 drivers/memstick/host/rtsx usb ms.c:450
rtsx usb ms issue cmd drivers/memstick/host/rtsx usb ms.c:477 [inline]
rtsx usb ms handle req+0x557/0x1a00 drivers/memstick/host/rtsx usb ms.c:531
process one work+0xac7/0x1b10 kernel/workqueue.c:3396
worker thread+0x5ef/0xe50 kernel/workqueue.c:3560
kthread+0x373/0x450 kernel/kthread.c:436
Allocated by task 1662:
memstick alloc card drivers/memstick/core/memstick.c:383 [inline]
memstick check+0x2c1/0x10d0 drivers/memstick/core/memstick.c:452
process one work+0xac7/0x1b10 kernel/workqueue.c:3396
Freed by task 1662:
kfree+0x20c/0x650 mm/slub.c:6792
memstick alloc card drivers/memstick/core/memstick.c:420 [inline]
memstick check+0x72b/0x10d0 drivers/memstick/core/memstick.c:452
process one work+0xac7/0x1b10 kernel/workqueue.c:3396
Host controller drivers (rtsx usb ms, jmb38x ms, tifm ms, r592) already
implement their own hardware and bus timeouts, and callers in
mspro block and ms block already rely on wait for completion()
unconditionally.
Replace wait for completion timeout() with wait for completion() in
memstick set rw addr() and memstick alloc card() so that the card
structure is never freed while an asynchronous request is in flight.
Found an issue in the description? Have something to add? Feel free to write us 👾