CVE-2022-21505

6.7 MEDIUM

📋 TL;DR

This vulnerability in the Linux kernel allows bypassing lockdown mode when IMA appraisal is configured with 'ima_appraise=log' boot parameter and Secure Boot is disabled. Attackers with local high-privilege access can use kexec to execute arbitrary code despite lockdown restrictions. Systems using lockdown without Secure Boot are affected.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Versions before commit 543ce63b664e2c2f9533d089a4664b559c3e6b5b (mainline kernel 5.19-rc1 and earlier)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when: 1) Using lockdown mode, 2) Secure Boot disabled/unavailable, 3) IMA appraisal enabled with 'ima_appraise=log' boot parameter

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing execution of arbitrary kernel code, bypassing all security restrictions imposed by lockdown mode, potentially leading to persistent backdoors or complete system control.

🟠

Likely Case

Privileged local attackers bypass lockdown restrictions to load and execute unauthorized kernel modules or modified system images, compromising system integrity and confidentiality.

🟢

If Mitigated

With Secure Boot enabled or proper kernel configuration, the vulnerability cannot be exploited, maintaining full lockdown protection.

🌐 Internet-Facing: LOW - This is a local privilege escalation requiring existing high-privilege access, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Internal attackers with sudo/root access could exploit this to bypass lockdown and execute arbitrary code, but requires specific kernel configuration.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local high-privilege access (PR:H) and specific kernel configuration. Exploitation involves using kexec system call to bypass lockdown.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel commit 543ce63b664e2c2f9533d089a4664b559c3e6b5b and later

Vendor Advisory: https://linux.oracle.com/cve/CVE-2022-21505.html

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing commit 543ce63b664e2c2f9533d089a4664b559c3e6b5b or later. 2. Reboot system to load patched kernel. 3. Verify kernel version and that patch is applied.

🔧 Temporary Workarounds

Enable Secure Boot

linux

Enable Secure Boot in BIOS/UEFI settings to prevent setting 'ima_appraise=log' parameter

Remove ima_appraise=log boot parameter

linux

Remove or change the 'ima_appraise=log' boot parameter to 'enforce' or 'fix'

Edit /etc/default/grub or bootloader configuration, remove 'ima_appraise=log' from GRUB_CMDLINE_LINUX
Run: sudo update-grub
Reboot system

🧯 If You Can't Patch

  • Enable Secure Boot in system firmware if hardware supports it
  • Change IMA appraisal mode from 'log' to 'enforce' or 'fix' in boot parameters

🔍 How to Verify

Check if Vulnerable:

Check if system uses lockdown: cat /sys/kernel/security/lockdown. Check boot parameters: cat /proc/cmdline | grep ima_appraise=log. Check Secure Boot status: mokutil --sb-state

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes commit 543ce63b664e2c2f9533d089a4664b559c3e6b5b: uname -r. Check git log for commit presence.

📡 Detection & Monitoring

Log Indicators:

  • Kernel logs showing kexec usage while lockdown is active
  • IMA appraisal mode changes in boot logs
  • Unauthorized kernel module loading attempts

SIEM Query:

source="kernel" AND ("kexec" OR "lockdown bypass" OR "ima_appraise")

🔗 References

📤 Share & Export