CVE-2022-48740
selinux: fix double free of cond_list on error paths
Check your servers for CVE-2022-48740
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-48740 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
selinux: fix double free of cond_list on error paths
On error path from cond_read_list() and duplicate_policydb_cond_list() the cond_list_destroy() gets called a second time in caller functions, resulting in NULL pointer deref. Fix this by resetting the cond_list_len to 0 in cond_list_destroy(), making subsequent calls a noop.
Also consistently reset the cond_list pointer to NULL after freeing.
[PM: fix line lengths in the description]
Exploitation
EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 16.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 20 Jun 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 60abd3181db29ea81742106cc0ac2e27fd05b418, before f446089a268c8fc6908488e991d28a9b936293db affected from 60abd3181db29ea81742106cc0ac2e27fd05b418, before 70caa32e6d81f45f0702070c0e4dfe945e92fbd7 affected from 60abd3181db29ea81742106cc0ac2e27fd05b418, before 7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4 affected from 60abd3181db29ea81742106cc0ac2e27fd05b418, before 186edf7e368c40d06cf727a1ad14698ea67b74ad
Other versions: unaffected
|
| Linux |
affected 5.7 unaffected before 5.7 unaffected from 5.10.99 up to and including 5.10.* unaffected from 5.15.22 up to and including 5.15.* unaffected from 5.16.8 up to and including 5.16.* unaffected 5.17 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-48740 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-48740
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-48740
trivy image --scanners vuln IMAGE | grep CVE-2022-48740
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/f446089a268c8fc6908488e991d28a9b936293db git.kernel.org
- https://git.kernel.org/stable/c/70caa32e6d81f45f0702070c0e4dfe945e92fbd7 git.kernel.org
- https://git.kernel.org/stable/c/7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4 git.kernel.org
- https://git.kernel.org/stable/c/186edf7e368c40d06cf727a1ad14698ea67b74ad git.kernel.org
Source: the record CVE-2022-48740 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse