misc: fastrpc: Fix double free of 'buf' in error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
misc: fastrpc: Fix double free of 'buf' in error path
smatch warning: drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf'
In fastrpc_req_mmap() error path, the fastrpc buffer is freed in fastrpc_req_munmap_impl() if unmap is successful.
But in the end, there is an unconditional call to fastrpc_buf_free(). So the above case triggers the double free of fastrpc buf.
From the CVE record · Linux
The Linux kernel’s fastrpc_req_mmap() error path can free a buffer twice when unmapping succeeds. The input does not specify an attacker action, access requirements, or whether user interaction is needed.
Engineers running Linux kernels with the fastrpc driver should check their versions; affected versions are not specified.