CVE-2021-47365·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: afs: Fix page leak There's a loop in afs_extend_writeback() that adds extra pages to a write we want to make to improve the efficiency of the writeback by making it larger. This loop stops, however, if we hit a page we can't write back from immediately, but it doesn't get rid of the page ref we speculatively acquired. This was caused by the removal of the cleanup loop when the code switched from using find_get_pages_contig() to xarray scanning as the latter only gets a single page at a time, not a batch. Fix this by putting the page on a ref on an early break from the loop. Unfortunately, we can't just add that page to the pagevec we're employing as we'll go through that and add those pages to the RPC call. This was found by the generic/074 test. It leaks ~4GiB of RAM each time it is run - which can be observed with "top".
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.14.9
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 3% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 5.13
Until: 5.14.9
Fixed in: 5.14.9
How to fix this CVE
Update your Linux kernel to version 5.14.9 or later to resolve a memory leak in the AFS writeback mechanism. Systems running kernel versions 5.13 through 5.14.8 should prioritize this patch, as the vulnerability causes unreferenced memory pages to accumulate during file write operations, potentially exhausting available RAM over time.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if AFS (Andrew File System) is enabled: grep -i afs /boot/config-$(uname -r)
- Monitor memory growth during file write operations on AFS-mounted filesystems using: watch -n 1 'free -h && ps aux | grep -E "write|afs"'
- Confirm the patched kernel is running after update: uname -r | grep -E '5.14.9|5.15|5.16|5.17|5.18|5.19|6.'
FAQ
What is CVE-2021-47365?
CVE-2021-47365 is a kernel memory leak affecting AFS (Andrew File System) writeback operations. When the kernel attempts to optimize write performance by batching pages together, it fails to properly release page references under certain conditions, causing memory to remain allocated indefinitely.
Is CVE-2021-47365 being actively exploited?
No, this vulnerability is not listed in CISA's known exploited vulnerabilities catalog and no public exploits are available. However, it can cause significant system degradation through resource exhaustion.
What versions of Kernel are affected by CVE-2021-47365?
Linux kernel versions 5.13 through 5.14.8 are vulnerable. The fix was introduced in kernel 5.14.9 and all subsequent versions.
How do I check if my server is vulnerable to CVE-2021-47365?
Run `uname -r` and compare your kernel version against 5.14.9. If your version is between 5.13 and 5.14.8, you are vulnerable. Additionally verify AFS is used: `grep afs /proc/filesystems`.
Does Defensia detect CVE-2021-47365?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server running a vulnerable version, CVE-2021-47365 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47365. Free for 1 server.
Get started free