CVE-2022-50421
kernel: rpmsg: char: Avoid double destroy of default endpoint
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
rpmsg: char: Avoid double destroy of default endpoint
The rpmsg_dev_remove() in rpmsg_core is the place for releasing
this default endpoint.
So need to avoid destroying the default endpoint in
rpmsg_chrdev_eptdev_destroy(), this should be the same as
rpmsg_eptdev_release(). Otherwise there will be double destroy
issue that ept->refcount report warning:
refcount_t: underflow; use-after-free.
Call trace:
refcount_warn_saturate+0xf8/0x150
virtio_rpmsg_destroy_ept+0xd4/0xec
rpmsg_dev_remove+0x60/0x70
The issue can be reproduced by stopping remoteproc before
closing the /dev/rpmsgX.
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 · 8 fixes
Red Hat 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 9 | kernel-rt +20 | affected | — |
| 9 | kernel +73 | 0:5.14.0-570.12.1.el9_6 | RHSA-2025:6966 |
debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 12 | linux | 6.0.3-1 |
| 13 | linux | 6.0.3-1 |
| 14 | linux | 6.0.3-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.0.3-1 |
root.io debian 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 12 | rootio-linux | 6.0.3-1 |
| 13 | rootio-linux | 6.0.3-1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-50421
- git.kernel.org https://git.kernel.org/stable/c/3f20ef7a845c2c8d7ec82ecffa20d95cab5ecfeb
- git.kernel.org https://git.kernel.org/stable/c/467233a4ac29b215d492843d067a9f091e6bf0c5
- git.kernel.org https://git.kernel.org/stable/c/ef828a39d6a7028836eaf37df3ad568c8c2dd6f9
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025100155-CVE-2022-50421-8bdc@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-50421
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2022-50421
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.