# selinux: fix memleak in security_read_state_kernel()

CVE record · `CVE-2022-50201`

- **Identifiers:** `CVE-2022-50201`
- **State:** Confirmed
- **Severity:** No CVSS score
- **Critical:** No
- **CNA:** Linux
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 18 Jun 2025
- **Updated:** 5 Nov 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 18 Jun 2025, 11:03 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `fdd1ffe8a812b1109388e4bc389e57b2695ad095 to before c877c5217145bda8fd95f506bf42f8d981afa57d` (git)
  - affected: `fdd1ffe8a812b1109388e4bc389e57b2695ad095 to before f3cd7562c0a6774fc62d79654482014020e574f5` (git)
  - affected: `fdd1ffe8a812b1109388e4bc389e57b2695ad095 to before 1fc1f72aad2070d34022d0823e4cf09706b53f25` (git)
  - affected: `fdd1ffe8a812b1109388e4bc389e57b2695ad095 to before 73de1befcc53a7c68b0c5e76b9b5ac41c517760f` (git)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `5.12`
  - unaffected: `before 5.12` (semver)
  - unaffected: `5.15.61 to 5.15.*, inclusive` (semver)
  - unaffected: `5.18.18 to 5.18.*, inclusive` (semver)
  - unaffected: `5.19.2 to 5.19.*, inclusive` (semver)
  - unaffected: `6.0 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The Linux kernel's SELinux code (security_read_state_kernel()) is affected in a range of kernel versions starting from 5.12 until fixed in stable branches such as 5.15.61, 5.18.18, 5.19.2 and 6.0. The flaw is a memory leak: when reading the policy fails, the buffer already allocated is not freed. The source gives few details on who can trigger it or what impact results beyond the leak. Upgrade to a fixed kernel version for your branch, such as 5.15.61 or later in the 5.15 series, 5.18.18 or later in 5.18, 5.19.2 or later in 5.19, or 6.0 or later.

Written 16 Nov 2026.

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

No source has published a CVSS score for this record yet.

- **CISA KEV:** Not listed.
- **EPSS:** 0.0026, the 17th percentile, on 20 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 18 Jun 2025, 11:03 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2022-50201)
- 18 Jun 2025, 11:15 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-50201)

## Sources

- [CVE List: CVE-2022-50201](https://www.cve.org/CVERecord?id=CVE-2022-50201)
- [NVD: CVE-2022-50201](https://nvd.nist.gov/vuln/detail/CVE-2022-50201)

### References from the CNA

- <https://git.kernel.org/stable/c/c877c5217145bda8fd95f506bf42f8d981afa57d>
- <https://git.kernel.org/stable/c/f3cd7562c0a6774fc62d79654482014020e574f5>
- <https://git.kernel.org/stable/c/1fc1f72aad2070d34022d0823e4cf09706b53f25>
- <https://git.kernel.org/stable/c/73de1befcc53a7c68b0c5e76b9b5ac41c517760f>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2022-50201>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2022-50201/>. Everything for agents: <https://agentprime.io/llms.txt>.
