Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2021-47366

HIGH 7.1EPSS 13%

afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < e66fc460d6dcf85cf12288e133a081205aebcd97; >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < b537a3c21775075395af475dcc6ef212fcf29db8
  • Anyone running Linux 2.6.22

Vulnerability facts

Affected
Linux >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < e66fc460d6dcf85cf12288e133a081205aebcd97; >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < b537a3c21775075395af475dcc6ef212fcf29db8; Linux 2.6.22
Fixed in
No fix listed yet
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.1 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: High
  • Availability impact: High
EPSS
0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
CWE
CWE-787
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < e66fc460d6dcf85cf12288e133a081205aebcd97; >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < b537a3c21775075395af475dcc6ef212fcf29db8—cvelist
Linux2.6.22—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2021-47366. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47366.md
Affected: Linux >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < e66fc460d6dcf85cf12288e133a081205aebcd97; >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < b537a3c21775075395af475dcc6ef212fcf29db8; Linux 2.6.22
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2021-47366 being exploited?

There is no confirmed exploitation: CVE-2021-47366 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2021-47366?

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2021-47366?

Linux >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < e66fc460d6dcf85cf12288e133a081205aebcd97; >= b9b1f8d5930a813879278d0cbfc8c658d6a038dc, < b537a3c21775075395af475dcc6ef212fcf29db8; Linux 2.6.22.

Is there a fix for CVE-2021-47366?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

How do I check if I'm affected by CVE-2021-47366?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors