rpmsg: char: Avoid double destroy of default endpoint
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.19.17, 6.0.3
- CVEs
- CVE-2022-50421
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 02:11 UTC · Revision 1
Source evidence
rpmsg: char: Avoid double destroy of default endpoint
core-osv · Original sourcePublished 1 Oct 2025, 11:41 UTC
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.
osv:CVE-2022-50421
Kernel
Fixed versions: 5.19.17, 6.0.3
Complete source record
{
"id": "094008d194ff1181b20da03606637bf4344c55c50c7f6f29920c361ece4e0fc3",
"url": "https://osv.dev/vulnerability/CVE-2022-50421",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "rpmsg: char: Avoid double destroy of default endpoint",
"summary": "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.",
"evidence": "osv:CVE-2022-50421",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.19.17",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2022-50421",
"aliases": [
"CVE-2022-50421"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "bea9b79c2d10fecf7bfa26e212ecefe61d232e39"
},
{
"fixed": "ef828a39d6a7028836eaf37df3ad568c8c2dd6f9"
},
{
"fixed": "3f20ef7a845c2c8d7ec82ecffa20d95cab5ecfeb"
},
{
"fixed": "467233a4ac29b215d492843d067a9f091e6bf0c5"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50421.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.18.0"
},
{
"fixed": "5.19.17"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.20.0"
},
{
"fixed": "6.0.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50421.json"
}
}
],
"modified": "2026-10-28T02:30:49.062833405Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/3f20ef7a845c2c8d7ec82ecffa20d95cab5ecfeb",
"https://git.kernel.org/stable/c/467233a4ac29b215d492843d067a9f091e6bf0c5",
"https://git.kernel.org/stable/c/ef828a39d6a7028836eaf37df3ad568c8c2dd6f9",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50421.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50421",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50421.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50421",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 517261,
"published_at": "2025-10-01T11:41:54.351+00:00"
}