CVE-2022-50525
📋 TL;DR
A resource leak vulnerability in the Linux kernel's Freescale PAMU (Peripheral Access Management Unit) IOMMU driver allows local attackers to cause denial of service through memory exhaustion. The vulnerability occurs when the fsl_pamu_probe() function fails to properly clean up IRQ and memory allocations if create_csd() fails during initialization. This affects systems using the affected Linux kernel versions with Freescale PAMU hardware.
💻 Affected Systems
- Linux kernel
⚠️ Risk & Real-World Impact
Worst Case
Local attacker causes kernel memory exhaustion leading to system crash or instability, potentially enabling denial of service attacks.
Likely Case
System instability or crash when the driver initialization fails, requiring reboot to restore functionality.
If Mitigated
Minimal impact with proper kernel hardening and resource limits in place.
🎯 Exploit Status
Requires local access and ability to trigger driver initialization failure conditions.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Multiple stable kernel versions with fixes (see references)
Vendor Advisory: https://git.kernel.org/stable/c/73f5fc5f884ad0c5f7d57f66303af64f9f002526
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version. 2. Rebuild kernel if compiling from source. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable Freescale PAMU support
linuxRemove or disable the fsl_pamu driver module if not required
modprobe -r fsl_pamu
echo 'blacklist fsl_pamu' >> /etc/modprobe.d/blacklist.conf
🧯 If You Can't Patch
- Restrict local user access to systems with vulnerable kernel
- Implement kernel hardening and resource limits to mitigate memory exhaustion impact
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if fsl_pamu module is loaded: 'uname -r' and 'lsmod | grep fsl_pamu'
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is updated to patched version and check patch commit is included
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages related to fsl_pamu
- Memory allocation failures in kernel logs
- System instability after driver initialization
Network Indicators:
- None - local vulnerability only
SIEM Query:
kernel:("fsl_pamu" OR "PAMU") AND ("panic" OR "oops" OR "memory allocation failure")
🔗 References
- https://git.kernel.org/stable/c/0d240ac0e4c35d3f64fc782c11433138c1bd016e
- https://git.kernel.org/stable/c/17fd440594961c5e2ea0f58591bc1bdba0629c75
- https://git.kernel.org/stable/c/73f5fc5f884ad0c5f7d57f66303af64f9f002526
- https://git.kernel.org/stable/c/9238b687fd62cde14c6e2e8576a40e4246de7ebe
- https://git.kernel.org/stable/c/9fbccdf2fefa3944dd8ba8c6a808b387787f3917
- https://git.kernel.org/stable/c/a305d0e4d0ce3166e31d7dbcb4c98b09cad6d49a
- https://git.kernel.org/stable/c/c93983230562883e0b5f122040efbb3d478c36d4
- https://git.kernel.org/stable/c/de7eb55009796687fc0a1670e0b944fa8ed54e9b
- https://git.kernel.org/stable/c/e42b543d08052c3b223bcfb48f05cbaf0b767f86