CVE-2022-49097
📋 TL;DR
This CVE addresses a denial-of-service vulnerability in the Linux kernel's NFS writeback mechanism. In low memory conditions, NFS writeback threads could get stuck in infinite loops in mempool_alloc(), potentially causing system hangs or performance degradation. This affects Linux systems using NFS for file sharing.
💻 Affected Systems
- Linux kernel
📦 What is this software?
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 →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 →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 →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
Complete system hang or crash due to kernel threads stuck in infinite loops, leading to denial of service for all services on the affected system.
Likely Case
Performance degradation or temporary unresponsiveness of NFS services during memory pressure situations, potentially affecting file operations.
If Mitigated
Minimal impact with proper memory management and monitoring in place; system may experience temporary NFS slowdowns but avoids hangs.
🎯 Exploit Status
Exploitation requires ability to trigger low memory conditions on NFS server, typically requiring local access or NFS client access.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Check specific kernel versions from provided git commits: 0bae835b63c53f86cdc524f5962e39409585b22c and related commits
Vendor Advisory: https://git.kernel.org/stable/c/0bae835b63c53f86cdc524f5962e39409585b22c
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution's repositories. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Increase system memory or reduce memory pressure
linuxEnsure adequate available memory to prevent low memory conditions that trigger the vulnerability
# Monitor memory usage
free -h
# Identify memory-hungry processes
ps aux --sort=-%mem | head -20
Disable NFS if not required
linuxTemporarily disable NFS services to eliminate attack surface
# Stop NFS services
systemctl stop nfs-server
# Disable from auto-start
systemctl disable nfs-server
🧯 If You Can't Patch
- Implement strict memory monitoring and alerting for low memory conditions
- Restrict NFS access to trusted clients only and monitor for abnormal memory consumption patterns
🔍 How to Verify
Check if Vulnerable:
Check kernel version and compare against patched versions from kernel git commits. Also check if NFS is enabled: systemctl status nfs-server
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version after update matches patched version and test NFS operations under memory pressure
📡 Detection & Monitoring
Log Indicators:
- Kernel logs showing memory allocation failures
- NFS service logs showing timeouts or hangs
- System logs indicating high memory pressure
Network Indicators:
- NFS clients experiencing timeouts or slow file operations
- Unusual memory consumption patterns on NFS server
SIEM Query:
source="kernel" AND ("mempool_alloc" OR "memory allocation failed") OR source="nfs" AND ("timeout" OR "hang" OR "stuck")
🔗 References
- https://git.kernel.org/stable/c/0bae835b63c53f86cdc524f5962e39409585b22c
- https://git.kernel.org/stable/c/1b3fa9a3c420c31e77b406ddc28f3a627100516c
- https://git.kernel.org/stable/c/a6caeddd68977a1aaaf62fbd1955b41dd5c3c5d3
- https://git.kernel.org/stable/c/c74e2f6ecc51bd08bb5b0335477dba954a50592e
- https://git.kernel.org/stable/c/ea029e4ce760f786919d06ef52efa2e50ea92a5f