Lucene search

K
cveLinuxCVE-2021-47107
HistoryMar 04, 2024 - 7:15 p.m.

CVE-2021-47107

2024-03-0419:15:18
Linux
web.nvd.nist.gov
47
linux kernel
nfsd
cve-2021-47107
vulnerability
readdir buffer overflow
security fix
nvd

AI Score

6.4

Confidence

Low

EPSS

0

Percentile

15.6%

In 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.

Affected configurations

Vulners
Node
linuxlinux_kernelRange5.135.15.12
OR
linuxlinux_kernelRange5.16.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/nfsd/nfs3proc.c",
      "fs/nfsd/nfsproc.c"
    ],
    "versions": [
      {
        "version": "37aa5e640222",
        "lessThan": "9e291a6a28d3",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "7f87fc2d34d4",
        "lessThan": "eabc0aab98e5",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "7f87fc2d34d4",
        "lessThan": "53b1119a6e50",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/nfsd/nfs3proc.c",
      "fs/nfsd/nfsproc.c"
    ],
    "versions": [
      {
        "version": "5.13",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.13",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.12",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.16",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

AI Score

6.4

Confidence

Low

EPSS

0

Percentile

15.6%