{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50421",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-09-17T14:53:07.004Z",
        "datePublished": "2025-10-01T11:41:54.351Z",
        "dateUpdated": "2026-08-05T08:58:44.673Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:58:44.673Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nrpmsg: char: Avoid double destroy of default endpoint\n\nThe rpmsg_dev_remove() in rpmsg_core is the place for releasing\nthis default endpoint.\n\nSo need to avoid destroying the default endpoint in\nrpmsg_chrdev_eptdev_destroy(), this should be the same as\nrpmsg_eptdev_release(). Otherwise there will be double destroy\nissue that ept->refcount report warning:\n\nrefcount_t: underflow; use-after-free.\n\nCall trace:\n refcount_warn_saturate+0xf8/0x150\n virtio_rpmsg_destroy_ept+0xd4/0xec\n rpmsg_dev_remove+0x60/0x70\n\nThe issue can be reproduced by stopping remoteproc before\nclosing the /dev/rpmsgX."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable path is reached only through local rpmsg char device operations (/dev/rpmsgX open plus channel/device teardown via remoteproc stop, NS_DESTROY, or RPMSG_RELEASE_DEV_IOCTL); it is not reachable from network packets or adjacent-link protocols.\nAC:L - With /dev/rpmsgX held open on a default_ept (rpmsg-raw) channel, device removal deterministically double-destroys the same endpoint in rpmsg_chrdev_eptdev_destroy then rpmsg_dev_remove; the attacker who opens the device and triggers teardown fully controls both steps with no race or external precondition.\nPR:L - On the platforms where RPMSG_CHAR is actually deployed (Android/QCOM, automotive, OpenAMP embedded), /dev/rpmsg* is routinely granted to non-root HALs/service users via udev/sepolicy, and those same contexts can drive channel release or remoteproc restart without full init-namespace root.\nUI:N - The attacker opens /dev/rpmsgX and triggers device removal themselves; no separate victim action such as mounting a filesystem or opening a crafted file is required.\nS:U - Impact is a host-kernel heap use-after-free of the rpmsg_endpoint within the same OS security authority, with no VM escape, IOMMU bypass, or other cross-boundary compromise.\nC:H - The first rpmsg_destroy_ept kfree's the default endpoint while rpdev->ept still points at it, so the second destroy is a classic UAF on a reclaimable slab object that per guidance enables arbitrary kernel memory disclosure.\nI:H - The same freed rpmsg_endpoint can be sprayed before the second destroy walks ept->ops/rpdev/refcount, yielding a heap corruption and control-flow hijack primitive consistent with UAF integrity High.\nA:H - The bug manifests as refcount underflow use-after-free (and kernel oops under KASAN); per guidance any UAF scores Availability High even when not fully exploited for code execution."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/rpmsg/rpmsg_char.c"
                    ],
                    "versions": [
                        {
                            "version": "bea9b79c2d10fecf7bfa26e212ecefe61d232e39",
                            "lessThan": "ef828a39d6a7028836eaf37df3ad568c8c2dd6f9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bea9b79c2d10fecf7bfa26e212ecefe61d232e39",
                            "lessThan": "3f20ef7a845c2c8d7ec82ecffa20d95cab5ecfeb",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bea9b79c2d10fecf7bfa26e212ecefe61d232e39",
                            "lessThan": "467233a4ac29b215d492843d067a9f091e6bf0c5",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/rpmsg/rpmsg_char.c"
                    ],
                    "versions": [
                        {
                            "version": "5.18",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.18",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19.17",
                            "lessThanOrEqual": "5.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.3",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "5.19.17"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.0.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/ef828a39d6a7028836eaf37df3ad568c8c2dd6f9"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3f20ef7a845c2c8d7ec82ecffa20d95cab5ecfeb"
                },
                {
                    "url": "https://git.kernel.org/stable/c/467233a4ac29b215d492843d067a9f091e6bf0c5"
                }
            ],
            "title": "rpmsg: char: Avoid double destroy of default endpoint",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.8,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                            "integrityImpact": "HIGH",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2022-50421",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2026-01-14T17:39:44.735824Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-416",
                                "description": "CWE-416 Use After Free"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-01-14T17:42:46.316Z"
                }
            }
        ]
    }
}