{
  "threat_severity" : "Moderate",
  "public_date" : "2024-03-04T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: NFSD: Fix READDIR buffer overflow",
    "id" : "2267911",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2267911"
  },
  "cvss3" : {
    "cvss3_base_score" : "7.1",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-121",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nNFSD: Fix READDIR buffer overflow\nIf a client sends a READDIR count argument that is too small (say,\nzero), then the buffer size calculation in the new init_dirlist\nhelper functions results in an underflow, allowing the XDR stream\nfunctions to write beyond the actual buffer.\nThis calculation has always been suspect. NFSD has never sanity-\nchecked the READDIR count argument, but the old entry encoders\nmanaged the problem correctly.\nWith the commits below, entry encoding changed, exposing the\nunderflow to the pointer arithmetic in xdr_reserve_space().\nModern NFS clients attempt to retrieve as much data as possible\nfor each READDIR request. Also, we have no unit tests that\nexercise the behavior of READDIR at the lower bound of @count\nvalues. Thus this case was missed during testing.", "CVE-2021-47107 is a flaw in the Linux system that runs file-sharing services (NFS). The problem happened because the system did not properly check how much data it should handle when someone asked to list the contents of a folder. If that request was made with a very small value, the system could become confused and try to use more memory than it should. This mistake could cause the computer to crash, stop responding, or even give an attacker a chance to run harmful code. The issue has since been fixed in newer versions of Linux by adding proper checks to prevent unsafe requests." ],
  "statement" : "Red Hat Product Security has rated this bug as moderate as the out of box configuration of NFS protects the process from arbitrary code execution scenarios. There is a risk to availablity on successful exploitation of this bug.",
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2022-11-08T00:00:00Z",
    "advisory" : "RHSA-2022:7683",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8",
    "package" : "kernel-0:4.18.0-425.3.1.el8"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2021-47107\nhttps://nvd.nist.gov/vuln/detail/CVE-2021-47107\nhttps://lore.kernel.org/linux-cve-announce/2024030445-CVE-2021-47107-7dda@gregkh/T" ],
  "name" : "CVE-2021-47107",
  "csaw" : false
}