PT-2026-52257 · Linux · Linux
Published
2026-06-25
·
Updated
2026-06-25
·
CVE-2026-53161
None
No 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:
misc: fastrpc: fix use-after-free of fastrpc user in workqueue context
There is a race between fastrpc device release() and the workqueue
that processes DSP responses. When the user closes the file descriptor,
fastrpc device release() frees the fastrpc user structure. Concurrently,
an in-flight DSP invocation can complete and fastrpc rpmsg callback()
schedules context cleanup via schedule work(&ctx->put work). If the
workqueue runs fastrpc context free() in parallel with or after
fastrpc device release() has freed the user structure, it dereferences
the freed fastrpc user. Depending on the state of the context at the
time of the race, any one of the following accesses can be hit:
-
fastrpc buf free() calls fastrpc ipa to dma addr(buf->fl->cctx, ...) to strip the SID bits from the stored IOVA before passing the physical address to dma free coherent().
-
fastrpc free map() reads map->fl->cctx->vmperms[0].vmid to reconstruct the source permission bitmask needed for the qcom scm assign mem() call that returns memory from the DSP VM back to HLOS.
-
fastrpc free map() acquires map->fl->lock to safely remove the map node from the fl->maps list.
The resulting use-after-free manifests as:
pc : fastrpc buf free+0x38/0x80 [fastrpc]
lr : fastrpc context free+0xa8/0x1b0 [fastrpc]
fastrpc context free+0xa8/0x1b0 [fastrpc]
fastrpc context put wq+0x78/0xa0 [fastrpc]
process one work+0x180/0x450
worker thread+0x26c/0x388
Add kref-based reference counting to fastrpc user. Have each invoke
context take a reference on the user at allocation time and release it
when the context is freed. Release the initial reference in
fastrpc device release() at file close. Move the teardown of the user
structure — freeing pending contexts, maps, mmaps, and the channel
context reference — into the kref release callback fastrpc user free(),
so that it runs only when the last reference is dropped, regardless of
whether that happens at device close or after the final in-flight
context completes.
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Linux