# CVE-2022-48821: misc: fastrpc: avoid double fput() on failed usercopy

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 17% of CVEs (2026-11-30)
- Published: 2024-07-16T11:44:07.965Z
- Modified: 2026-08-05T08:52:29.928Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

misc: fastrpc: avoid double fput() on failed usercopy

If the copy back to userland fails for the FASTRPC_IOCTL_ALLOC_DMA_BUFF
ioctl(), we shouldn't assume that 'buf->dmabuf' is still valid. In fact,
dma_buf_fd() called fd_install() before, i.e. "consumed" one reference,
leaving us with none.

Calling dma_buf_put() will therefore put a reference we no longer own,
leading to a valid file descritor table entry for an already released
'file' object which is a straight use-after-free.

Simply avoid calling dma_buf_put() and rely on the process exit code to
do the necessary cleanup, if needed, i.e. if the file descriptor is
still valid.

(As written by CVE List.)

## Affected

- Linux Linux: from 6cffd79504ce040f460831030d3069fa1c99bb71 before 4e6fd2b5fcf8e7119305a6042bd92e7f2b9ed215; from 6cffd79504ce040f460831030d3069fa1c99bb71 before a5ce7ee5fcc07583159f54ab4af5164de00148f5; from 6cffd79504ce040f460831030d3069fa1c99bb71 before e4382d0a39f9a1e260d62fdc079ddae5293c037d; from 6cffd79504ce040f460831030d3069fa1c99bb71 before 76f85c307ef9f10aa2cef1b1d5ee654c1f3345fc; from 6cffd79504ce040f460831030d3069fa1c99bb71 before 46963e2e0629cb31c96b1d47ddd89dc3d8990b34; 5.1 (not affected: before 5.1; from 5.4.180 up to 5.4.*; from 5.10.101 up to 5.10.*; from 5.15.24 up to 5.15.*; from 5.16.10 up to 5.16.*; from 5.17 up to *)
- linux linux_kernel: from 5.1 before 5.4.180; from 5.5 before 5.10.101; from 5.11 before 5.15.24; from 5.16 before 5.16.10; 5.17

## Every score

- Linux: 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`
- NVD: 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`

## References

- <https://git.kernel.org/stable/c/4e6fd2b5fcf8e7119305a6042bd92e7f2b9ed215> (patch)
- <https://git.kernel.org/stable/c/a5ce7ee5fcc07583159f54ab4af5164de00148f5> (patch)
- <https://git.kernel.org/stable/c/e4382d0a39f9a1e260d62fdc079ddae5293c037d> (patch)
- <https://git.kernel.org/stable/c/76f85c307ef9f10aa2cef1b1d5ee654c1f3345fc> (patch)
- <https://git.kernel.org/stable/c/46963e2e0629cb31c96b1d47ddd89dc3d8990b34> (patch)

## Sources

- CVE List: [CVE-2022-48821](https://www.cve.org/CVERecord?id=CVE-2022-48821), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-48821](https://nvd.nist.gov/vuln/detail/CVE-2022-48821), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-48821 · Whole record: https://cve.day/CVE-2022-48821.json · Rebuilt by cve.day 2026-11-25T22:58:19.901Z
