selinux: fix memleak in security_read_state_kernel()
Published Jun 18, 2025
5.5
MEDIUMCVSS 3.1
EPSS 0.24%
Description
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]
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 5.12StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<5.12
- Version 5.15.61StatusunaffectedConstraints<=5.15.*
- Version 5.18.18StatusunaffectedConstraints<=5.18.*
- Version 5.19.2StatusunaffectedConstraints<=5.19.*
- Version 6.0StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
- ≥ 5.12 · < 5.15.61
- ≥ 5.16 · < 5.18.18
- ≥ 5.19 · < 5.19.2
No data.
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Out of support scope
Red Hat Enterprise Linux 7
kernel
Fix deferred
Red Hat Enterprise Linux 7
kernel-rt
Fix deferred
Red Hat Enterprise Linux 8
kernel
Fix deferred
Red Hat Enterprise Linux 8
kernel-rt
Fix deferred
Red Hat Enterprise Linux 9
kernel
Fix deferred
Red Hat Enterprise Linux 9
kernel-rt
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (9)
- https://access.redhat.com/security/cve/CVE-2022-50201 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2373649 Issue Tracking
- https://git.kernel.org/stable/c/1fc1f72aad2070d34022d0823e4cf09706b53f25 Patch
- https://git.kernel.org/stable/c/73de1befcc53a7c68b0c5e76b9b5ac41c517760f Patch
- https://git.kernel.org/stable/c/c877c5217145bda8fd95f506bf42f8d981afa57d Patch
- https://git.kernel.org/stable/c/f3cd7562c0a6774fc62d79654482014020e574f5 Patch
- https://lore.kernel.org/linux-cve-announce/2025061840-CVE-2022-50201-7b57@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2022-50201
- https://www.cve.org/CVERecord?id=CVE-2022-50201
Change history (0)
No recorded changes yet.