CVE-2022-48821
kernel: misc: fastrpc: avoid double fput() on failed usercopy
Overview
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.
Source: OX vulnerability database
Severity
7.8 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-416
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 72 fixes
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.46-2.ph4 |
SUSE Linux Enterprise 2 releases · 7 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | kernel-livepatch-5-14-21-150400-24-128-default | 1-150400.9.3.1 | SUSE-SU-2024:2929-1 |
| 15.4 | cluster-md-kmp-default +17 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| 15.4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-13-64-rt | 1-150500.11.3.1 | SUSE-SU-2024:2894-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-55-73-default | 1-150500.11.3.1 | SUSE-SU-2024:2939-1 |
| 15.5 | kernel-azure +4 | 5.14.21-150500.33.63.1 | SUSE-SU-2024:2947-1 |
3 more rows
SUSE Linux Enterprise Micro 5 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.1 | kernel-rt +1 | 5.3.18-150300.178.1 | SUSE-SU-2024:2893-1 |
| 5.1 | kernel-default | 5.3.18-150300.59.170.1 | SUSE-SU-2024:2948-1 |
| 5.1 | kernel-default-base | 5.3.18-150300.59.170.1.150300.18.100.1 | SUSE-SU-2024:2948-1 |
| 5.2 | kernel-rt +1 | 5.3.18-150300.178.1 | SUSE-SU-2024:2893-1 |
| 5.2 | kernel-default | 5.3.18-150300.59.170.1 | SUSE-SU-2024:2948-1 |
| 5.2 | kernel-default-base | 5.3.18-150300.59.170.1.150300.18.100.1 | SUSE-SU-2024:2948-1 |
9 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.103-1 |
| 12 | linux | 5.16.10-1 |
| 13 | linux | 5.16.10-1 |
| 14 | linux | 5.16.10-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 5.16.10-1 |
openSUSE Leap Micro 1 release · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.5 | kernel-rt | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
| 5.5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| 5.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.103-1 |
| 12 | rootio-linux | 5.16.10-1 |
| 13 | rootio-linux | 5.16.10-1 |
ubuntu 4 releases · 18 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04 | linux-ibm-5-4 | 5.4.0-1021.23~18.04.1 |
| 18.04 | linux-raspi-5-4 | 5.4.0-1060.68~18.04.1 |
| 18.04 | linux-oracle-5-4 | 5.4.0-1071.77~18.04.1 |
| 18.04 | linux-gcp-5-4 | 5.4.0-1073.78~18.04.1 |
| 18.04 | linux-aws-5-4 | 5.4.0-1075.80~18.04.1 |
| 18.04 | linux-azure-5-4 | 5.4.0-1078.81~18.04.1 |
30 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-48821
- git.kernel.org https://git.kernel.org/linus/46963e2e0629cb31c96b1d47ddd89dc3d8990b34 (5.17-rc4)
- git.kernel.org https://git.kernel.org/stable/c/46963e2e0629cb31c96b1d47ddd89dc3d8990b34
- git.kernel.org https://git.kernel.org/stable/c/4e6fd2b5fcf8e7119305a6042bd92e7f2b9ed215
- git.kernel.org https://git.kernel.org/stable/c/76f85c307ef9f10aa2cef1b1d5ee654c1f3345fc
- git.kernel.org https://git.kernel.org/stable/c/a5ce7ee5fcc07583159f54ab4af5164de00148f5
- git.kernel.org https://git.kernel.org/stable/c/e4382d0a39f9a1e260d62fdc079ddae5293c037d
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2024071650-CVE-2022-48821-5c97@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-48821
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2022-48821
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.