NFSD: Fix READDIR buffer overflow

Summary

CVECVE-2021-47107
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-03-04 19:15:18 UTC
Updated2026-05-12 10:16:37 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: NFSD: Fix READDIR buffer overflow If a client sends a READDIR count argument that is too small (say, zero), then the buffer size calculation in the new init_dirlist helper functions results in an underflow, allowing the XDR stream functions to write beyond the actual buffer. This calculation has always been suspect. NFSD has never sanity- checked the READDIR count argument, but the old entry encoders managed the problem correctly. With the commits below, entry encoding changed, exposing the underflow to the pointer arithmetic in xdr_reserve_space(). Modern NFS clients attempt to retrieve as much data as possible for each READDIR request. Also, we have no unit tests that exercise the behavior of READDIR at the lower bound of @count values. Thus this case was missed during testing.

Risk And Classification

Primary CVSS: v3.1 7.8 HIGH from [email protected]

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS: 0.000160000 probability, percentile 0.035280000 (date 2026-05-12)

Problem Types: CWE-120

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All
Operating System Linux Linux Kernel 5.16 rc1 All All
Operating System Linux Linux Kernel 5.16 rc2 All All
Operating System Linux Linux Kernel 5.16 rc3 All All
Operating System Linux Linux Kernel 5.16 rc4 All All
Operating System Linux Linux Kernel 5.16 rc5 All All
Operating System Linux Linux Kernel 5.16 rc6 All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 37aa5e64022243e721b8334122997881177a4cfc 9e291a6a28d32545ed2fd959a8165144d1724df1 git Not specified
CNA Linux Linux affected 7f87fc2d34d475225e78b7f5c4eabb121f4282b2 eabc0aab98e5218ceecd82069b0d6fdfff5ee885 git Not specified
CNA Linux Linux affected 7f87fc2d34d475225e78b7f5c4eabb121f4282b2 53b1119a6e5028b125f431a0116ba73510d82a72 git Not specified
CNA Linux Linux affected 5.13 Not specified
CNA Linux Linux unaffected 5.13 semver Not specified
CNA Linux Linux unaffected 5.15.12 5.15.* semver Not specified
CNA Linux Linux unaffected 5.16 * original_commit_for_fix Not specified
ADP Siemens SIMATIC S7-1500 TM MFP - GNU/Linux Subsystem affected * custom Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/53b1119a6e5028b125f431a0116ba73510d82a72 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Exploit, Mailing List, Patch
cert-portal.siemens.com/productcert/html/ssa-265688.html 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e cert-portal.siemens.com
git.kernel.org/stable/c/9e291a6a28d32545ed2fd959a8165144d1724df1 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Exploit, Mailing List, Patch
git.kernel.org/stable/c/eabc0aab98e5218ceecd82069b0d6fdfff5ee885 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Exploit, Mailing List, Patch
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report