CVE-2022-48740·Kernel vulnerability
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]
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.16.8
- Published
- 2024-06-20
Affected versions
From: 5.16
Until: 5.16.8
Fixed in: 5.16.8
How to fix this CVE
Update your Linux kernel to version 5.16.8 or later to resolve a memory management defect in SELinux policy handling. This vulnerability affects the conditional policy list cleanup routine, which could lead to kernel crashes or privilege escalation in systems running vulnerable kernel versions. Apply the patch immediately, especially on systems with SELinux enforcing mode enabled.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r — compare against 5.16.8; versions 5.16.0 through 5.16.7 are vulnerable
- Verify SELinux is active: getenforce — if Enforcing or Permissive, the vulnerable code path is loaded
- Check loaded modules: lsmod | grep selinux — confirms SELinux module is active in kernel
- After patching, rerun uname -r and confirm version is 5.16.8 or higher
FAQ
What is CVE-2022-48740?
This is a memory management vulnerability in the Linux kernel's SELinux conditional policy list handling. When certain error conditions occur during policy database operations, the cleanup function is invoked twice, causing a NULL pointer dereference that can crash the kernel or be exploited for privilege escalation.
Is CVE-2022-48740 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are documented. However, the high CVSS score (7.8) warrants urgent patching.
What versions of Kernel are affected by CVE-2022-48740?
Linux kernel versions 5.16.0 through 5.16.7 are vulnerable. Version 5.16.8 and all later kernel versions contain the fix.
How do I check if my server is vulnerable to CVE-2022-48740?
Run: uname -r — if the output shows 5.16.0 through 5.16.7, your system is vulnerable. Additionally, verify SELinux status with getenforce to confirm the vulnerable code is active.
Does Defensia detect CVE-2022-48740?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2022-48740 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/186edf7e368c40d06cf727a1ad14698ea67b74ad
- https://git.kernel.org/stable/c/70caa32e6d81f45f0702070c0e4dfe945e92fbd7
- https://git.kernel.org/stable/c/7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4
- https://git.kernel.org/stable/c/f446089a268c8fc6908488e991d28a9b936293db
- https://git.kernel.org/stable/c/186edf7e368c40d06cf727a1ad14698ea67b74ad
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-48740. Free for 1 server.
Get started free