CVE-2021-22543
📋 TL;DR
This CVE-2021-22543 vulnerability in Linux KVM allows attackers with VM control privileges to bypass read-only memory checks, potentially leading to memory corruption and local privilege escalation. It affects systems running KVM virtualization with vulnerable kernel versions. Attackers could read/write arbitrary memory pages within the host system.
💻 Affected Systems
- Linux Kernel KVM
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Full local privilege escalation from a VM guest to host root access, allowing complete system compromise and data exfiltration.
Likely Case
VM escape leading to host memory corruption, potential denial of service, or limited privilege escalation within the host.
If Mitigated
Limited impact if proper VM isolation and least-privilege access controls are enforced, though memory corruption risks remain.
🎯 Exploit Status
Exploit requires VM control privileges. Proof-of-concept code is available in security research repositories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel 5.12.13, 5.11.25, 5.10.42, 5.4.119, 4.19.191, 4.14.232, 4.9.272, 4.4.272 and later
Vendor Advisory: https://github.com/google/security-research/security/advisories/GHSA-7wq5-phmq-m584
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version. 2. Reboot system. 3. Verify kernel version with 'uname -r'. 4. Check distribution-specific security advisories for backported patches.
🔧 Temporary Workarounds
Disable KVM
linuxRemove KVM kernel module to prevent exploitation
sudo modprobe -r kvm
sudo modprobe -r kvm_intel (or kvm_amd)
echo 'blacklist kvm' | sudo tee /etc/modprobe.d/blacklist-kvm.conf
Restrict VM Creation
linuxLimit users who can create/control VMs to trusted administrators only
sudo usermod -a -G libvirt trusted_user
sudo chmod 640 /dev/kvm
sudo setfacl -m u:trusted_user:rw /dev/kvm
🧯 If You Can't Patch
- Restrict VM creation/control to minimal set of trusted administrators
- Implement strict VM isolation and monitor for unusual VM behavior
🔍 How to Verify
Check if Vulnerable:
Check kernel version: 'uname -r' and compare with vulnerable versions list
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is patched: 'uname -r' should show 5.12.13+ or equivalent backported version
📡 Detection & Monitoring
Log Indicators:
- Unusual VM creation/modification patterns
- Kernel panic or oops messages
- Failed memory access attempts in kernel logs
Network Indicators:
- Not network exploitable
SIEM Query:
source="kernel" AND ("VM_IO" OR "VM_PFNMAP" OR "KVM" AND "memory" AND "error")
🔗 References
- http://www.openwall.com/lists/oss-security/2021/06/26/1
- https://github.com/google/security-research/security/advisories/GHSA-7wq5-phmq-m584
- https://lists.debian.org/debian-lts-announce/2021/10/msg00010.html
- https://lists.debian.org/debian-lts-announce/2021/12/msg00012.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4G5YBUVEPHZYXMKNGBZ3S6INFCTEEL4E/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ROQIXQB7ZAWI3KSGSHR6H5RDUWZI775S/
- https://security.netapp.com/advisory/ntap-20210708-0002/
- http://www.openwall.com/lists/oss-security/2021/06/26/1
- https://github.com/google/security-research/security/advisories/GHSA-7wq5-phmq-m584
- https://lists.debian.org/debian-lts-announce/2021/10/msg00010.html
- https://lists.debian.org/debian-lts-announce/2021/12/msg00012.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4G5YBUVEPHZYXMKNGBZ3S6INFCTEEL4E/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ROQIXQB7ZAWI3KSGSHR6H5RDUWZI775S/
- https://security.netapp.com/advisory/ntap-20210708-0002/