# CVE-2022-50201: selinux: fix memleak in security_read_state_kernel()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2025-06-18T11:03:43.263Z
- Modified: 2026-11-05T20:17:27.087Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

selinux: fix memleak in security_read_state_kernel()

In this function, it directly returns the result of __security_read_policy
without freeing the allocated memory in *data, cause memory leak issue,
so free the memory if __security_read_policy failed.

[PM: subject line tweak]

(As written by CVE List.)

## Affected

- Linux Linux: from fdd1ffe8a812b1109388e4bc389e57b2695ad095 before c877c5217145bda8fd95f506bf42f8d981afa57d; from fdd1ffe8a812b1109388e4bc389e57b2695ad095 before f3cd7562c0a6774fc62d79654482014020e574f5; from fdd1ffe8a812b1109388e4bc389e57b2695ad095 before 1fc1f72aad2070d34022d0823e4cf09706b53f25; from fdd1ffe8a812b1109388e4bc389e57b2695ad095 before 73de1befcc53a7c68b0c5e76b9b5ac41c517760f; 5.12 (not affected: before 5.12; from 5.15.61 up to 5.15.*; from 5.18.18 up to 5.18.*; from 5.19.2 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 5.12 before 5.15.61; from 5.16 before 5.18.18; from 5.19 before 5.19.2

## References

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

## Sources

- CVE List: [CVE-2022-50201](https://www.cve.org/CVERecord?id=CVE-2022-50201), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-50201](https://nvd.nist.gov/vuln/detail/CVE-2022-50201), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-50201 · Whole record: https://cve.day/CVE-2022-50201.json · Rebuilt by cve.day 2026-11-25T22:58:21.101Z
