HIGH 7.8

CVE-2026-53161: Linux fastrpc Use-After-Free Privilege Escalation

CVE-2026-53161 is a use-after-free vulnerability in the Linux kernel's fastrpc (fast RPC) driver, a Qualcomm component that handles communication with digital signal processors (DSPs). The flaw occurs when a user closes their connection to the driver while the system is still processing responses from the DSP. The driver can attempt to access data structures that have already been freed, potentially leading to kernel crashes or privilege escalation. This vulnerability requires local access and user-level privileges to trigger, making it primarily a concern for multi-user systems or those where untrusted local users have accounts.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-416
Affected products
8 configuration(s)
Published / Modified
2026-06-25 / 2026-07-06

NVD description (verbatim)

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: 1. 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(). 2. 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. 3. 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.

8 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from improper synchronization between the fastrpc_device_release() function, which executes when a user closes a file descriptor, and the workqueue that processes asynchronous DSP responses. When fastrpc_device_release() frees the fastrpc_user structure, concurrent or subsequent execution of fastrpc_context_free() via a scheduled work item can dereference the already-freed pointer. The race manifests in three distinct code paths: (1) fastrpc_buf_free() dereferencing buf->fl->cctx for IOVA address translation, (2) fastrpc_free_map() reading map->fl->cctx->vmperms to reconstruct memory permissions for SCM calls, and (3) fastrpc_free_map() acquiring map->fl->lock to safely remove map nodes. The fix introduces reference counting (kref) on the fastrpc_user structure. Each invoke context takes a reference at allocation; contexts release their reference upon completion. The initial reference is released at device close, but the actual teardown of user resources is deferred to the kref release callback, fastrpc_user_free(), which executes only when the final reference drops.

Business impact

Systems using Qualcomm-based processors with fastrpc functionality—including snapdragon-based devices, automotive platforms, and IoT endpoints—face stability and security risks. A local unprivileged attacker could trigger kernel memory corruption, leading to denial of service or privilege escalation. Multi-user systems and cloud environments with guest isolation relying on kernel integrity are particularly exposed. The impact depends on whether the fastrpc driver is compiled and active in the target kernel; many standard deployments on Qualcomm hardware will be affected.

Affected systems

The vulnerability affects the Linux kernel fastrpc driver across multiple versions. Qualcomm-based systems including Snapdragon processors, automotive and industrial IoT platforms, and Android devices running affected kernel versions are in scope. The vulnerability requires the fastrpc driver to be compiled and accessible, which is common in Qualcomm SoC deployments but not universal across all Linux distributions. Desktop and server platforms without Qualcomm hardware or fastrpc driver support are not affected.

Exploitability

Exploitation requires local access and unprivileged user-level privileges (no root needed), making the barrier to entry relatively low on systems with local user accounts. However, reliable exploitation depends on precise timing of the race condition—closing a file descriptor while DSP responses are in-flight. The vulnerability is not remotely exploitable. The inconsistent nature of race conditions means success may require multiple attempts or specific workload conditions, though the kernel crash manifestation suggests the flaw is highly likely to be triggered under concurrent DSP usage patterns.

Remediation

Apply a kernel update that includes the reference-counting fix to fastrpc_user structures and defers teardown to the kref release callback. Verify the patch is included in the vendor's advisory. As a temporary mitigation, disable the fastrpc driver via kernel configuration or module blacklist if not required for your use case. Limit local user account creation and enforce strict access controls on systems that must run the vulnerable driver until patching is complete.

Patch guidance

Consult your Linux distribution and hardware vendor's security advisory for availability and timing of patched kernel versions. Qualcomm and your distribution maintainer will provide specific kernel versions containing the fix—verify the fastrpc reference-counting changes are present before deployment. Test the patch in a non-production environment first, as kernel updates require reboot. For systems unable to update immediately, consider disabling fastrpc via grub parameters or module configuration files as a temporary protective measure.

Detection guidance

Monitor system logs for kernel oops or panic messages originating from the fastrpc driver, particularly stack traces mentioning fastrpc_context_free(), fastrpc_buf_free(), or fastrpc_free_map(). Kernel address sanitizer (KASAN) or other memory safety tools, if enabled, will detect the use-after-free at runtime. Workqueue activity and file descriptor close operations on fastrpc devices can be logged via audit rules. Detection of exploitation in production is challenging due to the race condition's unpredictable nature; prevention through timely patching is the most reliable defense.

Why prioritize this

A CVSS 7.8 HIGH-severity local privilege escalation and denial of service flaw targeting kernel memory safety warrants prompt remediation. While not remotely exploitable, the low privilege requirement and presence on Qualcomm hardware—a significant installed base—justifies prioritization. Kernel stability issues carry cascading business impact; organizations operating affected Qualcomm-based infrastructure should schedule patching within their standard critical kernel update timelines.

Risk score, explained

The CVSS 3.1 score of 7.8 reflects: (1) local attack vector—exploiter needs shell access; (2) low complexity—the race condition, while timing-sensitive, is triggered by normal close+DSP activity patterns; (3) low privilege requirement—unprivileged users can trigger the flaw; (4) high confidentiality, integrity, and availability impact—kernel memory corruption enables privilege escalation and system crash. The score appropriately signals a serious local kernel vulnerability requiring near-term remediation.

Frequently asked questions

Does this affect my system if I don't use Qualcomm processors or DSP functionality?

No. The fastrpc driver is specific to Qualcomm SoCs and DSP communication. Systems without Qualcomm hardware or with the fastrpc driver disabled are not vulnerable.

Can an attacker trigger this remotely over the network?

No. The vulnerability requires local user-level access to a system running the affected kernel with fastrpc enabled. Remote network-based exploitation is not possible.

What is the difference between applying a patch and disabling the driver as a workaround?

Patching fixes the underlying race condition, allowing fastrpc to operate safely. Disabling the driver prevents the vulnerability entirely but may break functionality for applications that depend on DSP offloading. Patching is the recommended permanent solution; disabling is a temporary mitigation for systems that can tolerate loss of DSP features.

How can I tell if my kernel version is vulnerable?

Check your kernel version (uname -r) against your vendor's advisory for the affected version range. Alternatively, verify the presence of the reference-counting fix in your kernel source or changelog. If unsure, assume vulnerability and plan to patch unless you have confirmed the fix is included.

This analysis is provided for informational purposes and does not constitute professional security advice. Vulnerability severity and exploit feasibility depend on your specific kernel version, configuration, and Qualcomm hardware variant. Always verify against official vendor advisories before patching decisions. Reference this analysis alongside your organization's risk assessment and patch management policies. SEC.co makes no warranty regarding the accuracy or completeness of derived information and disclaims liability for decisions made in reliance on this content. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).