CVE-2022-48821

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
16/07/2024
Last modified:
25/09/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> misc: fastrpc: avoid double fput() on failed usercopy<br /> <br /> If the copy back to userland fails for the FASTRPC_IOCTL_ALLOC_DMA_BUFF<br /> ioctl(), we shouldn&amp;#39;t assume that &amp;#39;buf-&gt;dmabuf&amp;#39; is still valid. In fact,<br /> dma_buf_fd() called fd_install() before, i.e. "consumed" one reference,<br /> leaving us with none.<br /> <br /> Calling dma_buf_put() will therefore put a reference we no longer own,<br /> leading to a valid file descritor table entry for an already released<br /> &amp;#39;file&amp;#39; object which is a straight use-after-free.<br /> <br /> Simply avoid calling dma_buf_put() and rely on the process exit code to<br /> do the necessary cleanup, if needed, i.e. if the file descriptor is<br /> still valid.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.1 (including) 5.4.180 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.101 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.24 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.16.10 (excluding)
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*