CVE-2021-47366·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server AFS-3 has two data fetch RPC variants, FS.FetchData and FS.FetchData64, and Linux's afs client switches between them when talking to a non-YFS server if the read size, the file position or the sum of the two have the upper 32 bits set of the 64-bit value. This is a problem, however, since the file position and length fields of FS.FetchData are *signed* 32-bit values. Fix this by capturing the capability bits obtained from the fileserver when it's sent an FS.GetCapabilities RPC, rather than just discarding them, and then picking out the VICED_CAPABILITY_64BITFILES flag. This can then be used to decide whether to use FS.FetchData or FS.FetchData64 - and also FS.StoreData or FS.StoreData64 - rather than using upper_32_bits() to switch on the parameter values. This capabilities flag could also be used to limit the maximum size of the file, but all servers must be checked for that. Note that the issue does not exist with FS.StoreData - that uses *unsigned* 32-bit values. It's also not a problem with Auristor servers as its YFS.FetchData64 op uses unsigned 64-bit values. This can be tested by cloning a git repo through an OpenAFS client to an OpenAFS server and then doing "git status" on it from a Linux afs client[1]. Provided the clone has a pack file that's in the 2G-4G range, the git status will show errors like: error: packfile .git/objects/pack/pack-5e813c51d12b6847bbc0fcd97c2bca66da50079c.pack does not match index error: packfile .git/objects/pack/pack-5e813c51d12b6847bbc0fcd97c2bca66da50079c.pack does not match index This can be observed in the server's FileLog with something like the following appearing: Sun Aug 29 19:31:39 2021 SRXAFS_FetchData, Fid = 2303380852.491776.3263114, Host 192.168.11.201:7001, Id 1001 Sun Aug 29 19:31:39 2021 CheckRights: len=0, for host=192.168.11.201:7001 Sun Aug 29 19:31:39 2021 FetchData_RXStyle: Pos 18446744071815340032, Len 3154 Sun Aug 29 19:31:39 2021 FetchData_RXStyle: file size 2400758866 ... Sun Aug 29 19:31:40 2021 SRXAFS_FetchData returns 5 Note the file position of 18446744071815340032. This is the requested file position sign-extended.
- 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: 2.6.22
Until: 5.14.9
Fixed in: 5.14.9
How to fix this CVE
Update the Linux kernel to version 5.14.9 or later to resolve a data corruption issue affecting AFS file reads in the 2GB-4GB range. This vulnerability impacts systems using the AFS client to communicate with OpenAFS servers that do not properly handle 64-bit file positions with signed 32-bit RPC parameters. Kernel updates are critical for maintaining data integrity in AFS-based environments.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with: uname -r
- Step 2: Verify if AFS client is installed and in use by running: modprobe -l | grep afs or ps aux | grep afs
- Step 3: Check for data corruption errors in git repositories with: git fsck --full (if applicable)
- Step 4: Review system logs for AFS-related errors: grep -i 'afs\|corruption' /var/log/syslog /var/log/kernel.log
- Step 5: Confirm the fix by rebooting and verifying the new kernel version: uname -r
FAQ
What is CVE-2021-47366?
This vulnerability affects the Linux AFS client's ability to correctly handle file reads from OpenAFS servers when accessing file positions between 2GB and 4GB. The issue stems from the client incorrectly switching between 32-bit and 64-bit RPC variants based on parameter values instead of server capability flags, causing sign-extension errors that corrupt data.
Is CVE-2021-47366 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, it can cause silent data corruption for legitimate AFS users, particularly in version control systems.
What versions of Kernel are affected by CVE-2021-47366?
Linux kernel versions from 2.6.22 through 5.14.8 are affected. The vulnerability is fixed in kernel version 5.14.9 and later.
How do I check if my server is vulnerable to CVE-2021-47366?
Run 'uname -r' to check your kernel version. If it shows a version before 5.14.9 and you use the AFS client (check with 'lsmod | grep afs'), your system is vulnerable.
Does Defensia detect CVE-2021-47366?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47366 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-47366. Free for 1 server.
Get started free