misc: fastrpc: fix use-after-free race in fastrpc_map_create
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 10df039834f84a297c72ec962c0f9b7c8c5ca31a · < 07ebe87915d8accdaba20c4f88c5ae430fe62fbb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
misc: fastrpc: fix use-after-free race in fastrpc_map_create
fastrpc_map_lookup returns a raw pointer after releasing fl->lock. The caller fastrpc_map_create then calls fastrpc_map_get (kref_get_unless_zero) on this unprotected pointer. A concurrent MEM_UNMAP can free the map between the lock release and the kref operation, resulting in a use-after-free on the freed slab object.
Restore the take_ref parameter to fastrpc_map_lookup so the reference is acquired atomically under fl->lock before the pointer is exposed to the caller.
From the CVE record · Linux
A race in the Linux kernel's fastrpc map creation code can cause a use-after-free. It occurs when a concurrent MEM_UNMAP frees a map before its reference is acquired. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels with the affected fastrpc code should check their deployments; affected versions are not specified.