CVE-2026-53161: misc: fastrpc: fix use-after-free of fastrpc_user in workqueue context

Published Jun 25, 2026
·
Updated

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

misc: fastrpc: fix use-after-free of fastrpcuser in workqueue context

There is a race between fastrpcdevicerelease() and the workqueue that processes DSP responses. When the user closes the file descriptor, fastrpcdevicerelease() frees the fastrpcuser structure. Concurrently, an in-flight DSP invocation can complete and fastrpcrpmsgcallback() schedules context cleanup via schedulework(&ctx->putwork). If the workqueue runs fastrpccontextfree() in parallel with or after fastrpcdevicerelease() has freed the user structure, it dereferences the freed fastrpcuser. Depending on the state of the context at the time of the race, any one of the following accesses can be hit:

1. fastrpcbuffree() calls fastrpcipatodmaaddr(buf->fl->cctx, ...) to strip the SID bits from the stored IOVA before passing the physical address to dmafreecoherent().

2. fastrpcfreemap() reads map->fl->cctx->vmperms[0].vmid to reconstruct the source permission bitmask needed for the qcomscmassignmem() call that returns memory from the DSP VM back to HLOS.

3. fastrpcfreemap() acquires map->fl->lock to safely remove the map node from the fl->maps list.

The resulting use-after-free manifests as:

pc : fastrpcbuffree+0x38/0x80 [fastrpc] lr : fastrpccontextfree+0xa8/0x1b0 [fastrpc] fastrpccontextfree+0xa8/0x1b0 [fastrpc] fastrpccontextputwq+0x78/0xa0 [fastrpc] processonework+0x180/0x450 workerthread+0x26c/0x388

Add kref-based reference counting to fastrpcuser. 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 fastrpcdevicerelease() 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 fastrpcuserfree(), 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.

Affected Software

16 affected componentsFixes available
Linux Linux kernel (fastrpc)
Microsoft azl3 kernel 6.6.141.1-1<6.6.143.1-1
6.6.143.1-1
Linux Linux kernel>=5.1<5.10.259
Linux Linux kernel>=5.11<5.15.210
Linux Linux kernel>=5.16<6.1.176
Linux Linux kernel>=6.2<6.6.143
Linux Linux kernel>=6.7<6.12.94
Linux Linux kernel>=6.13<6.18.36
Linux Linux kernel>=6.19<7.0.13
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2
Linux Linux kernel=7.1-rc3
Linux Linux kernel=7.1-rc4
Linux Linux kernel=7.1-rc5
Linux Linux kernel=7.1-rc6
Linux Linux kernel=7.1-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.6.143.1-1
  2. Configuration

    Apply the kernel fix for "misc: fastrpc: fix use-after-free of fastrpc_user in workqueue context" by adding kref-based reference counting to fastrpc_user, moving the teardown of the user into the kref release callback (fastrpc_user_free()), and ensuring the teardown runs only when the last reference is dropped so fastrpc_device_release() does not free fastrpc_user while workqueue/in-flight callbacks may still dereference it.

    Linux kernel (fastrpc) misc: fastrpc user teardown/workqueue teardown = Use kref-based reference counting for fastrpc_user; release initial reference in the kref release callback

Event History

Jun 25, 2026
CVE Published
via MITRE·08:38 AM
Data Sourced
via MITRE·08:38 AM
DescriptionSeverity
Data Sourced
via OSV·09:16 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·09:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 27, 2026
Data Sourced
via Microsoft·08:08 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-53161?

CVE-2026-53161 has a risk score of 47.

2

What type of vulnerability is CVE-2026-53161?

CVE-2026-53161 is classified as a Use After Free vulnerability.

3

How does CVE-2026-53161 occur in the Linux kernel?

CVE-2026-53161 occurs due to a race condition between fastrpc_device_release() and a workqueue processing DSP responses.

4

How can I mitigate CVE-2026-53161 in my system?

To mitigate CVE-2026-53161, ensure that you are using the patched version of the Linux kernel that resolves this vulnerability.

5

What components are affected by CVE-2026-53161?

CVE-2026-53161 specifically affects the fastrpc component within the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203