cve-2021-47506
Vulnerability from cvelistv5
Published
2024-05-24 15:01
Modified
2024-08-04 05:39
Severity
Summary
nfsd: fix use-after-free due to delegation race
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47506",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-05-29T17:04:47.932390Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:13:44.394Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:39:59.751Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/348714018139c39533c55661a0c7c990671396b4"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/eeb0711801f5e19ef654371b627682aed3b11373"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/548ec0805c399c65ed66c6641be467f717833ab5"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/nfsd/nfs4state.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "04a8d07f3d58",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "348714018139",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "33645d3e2272",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "2becaa990b93",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "e0759696de68",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "eeb0711801f5",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "148c816f10fd",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "548ec0805c39",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/nfsd/nfs4state.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "4.4.*",
              "status": "unaffected",
              "version": "4.4.296",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.294",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.259",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.222",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.168",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.85",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.8",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: fix use-after-free due to delegation race\n\nA delegation break could arrive as soon as we\u0027ve called vfs_setlease.  A\ndelegation break runs a callback which immediately (in\nnfsd4_cb_recall_prepare) adds the delegation to del_recall_lru.  If we\nthen exit nfs4_set_delegation without hashing the delegation, it will be\nfreed as soon as the callback is done with it, without ever being\nremoved from del_recall_lru.\n\nSymptoms show up later as use-after-free or list corruption warnings,\nusually in the laundromat thread.\n\nI suspect aba2072f4523 \"nfsd: grant read delegations to clients holding\nwrites\" made this bug easier to hit, but I looked as far back as v3.0\nand it looks to me it already had the same problem.  So I\u0027m not sure\nwhere the bug was introduced; it may have been there from the beginning."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:09:08.938Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce"
        },
        {
          "url": "https://git.kernel.org/stable/c/348714018139c39533c55661a0c7c990671396b4"
        },
        {
          "url": "https://git.kernel.org/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee"
        },
        {
          "url": "https://git.kernel.org/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4"
        },
        {
          "url": "https://git.kernel.org/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09"
        },
        {
          "url": "https://git.kernel.org/stable/c/eeb0711801f5e19ef654371b627682aed3b11373"
        },
        {
          "url": "https://git.kernel.org/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3"
        },
        {
          "url": "https://git.kernel.org/stable/c/548ec0805c399c65ed66c6641be467f717833ab5"
        }
      ],
      "title": "nfsd: fix use-after-free due to delegation race",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47506",
    "datePublished": "2024-05-24T15:01:52.746Z",
    "dateReserved": "2024-05-22T06:20:56.205Z",
    "dateUpdated": "2024-08-04T05:39:59.751Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47506\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-24T15:15:11.197\",\"lastModified\":\"2024-05-24T18:09:20.027\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnfsd: fix use-after-free due to delegation race\\n\\nA delegation break could arrive as soon as we\u0027ve called vfs_setlease.  A\\ndelegation break runs a callback which immediately (in\\nnfsd4_cb_recall_prepare) adds the delegation to del_recall_lru.  If we\\nthen exit nfs4_set_delegation without hashing the delegation, it will be\\nfreed as soon as the callback is done with it, without ever being\\nremoved from del_recall_lru.\\n\\nSymptoms show up later as use-after-free or list corruption warnings,\\nusually in the laundromat thread.\\n\\nI suspect aba2072f4523 \\\"nfsd: grant read delegations to clients holding\\nwrites\\\" made this bug easier to hit, but I looked as far back as v3.0\\nand it looks to me it already had the same problem.  So I\u0027m not sure\\nwhere the bug was introduced; it may have been there from the beginning.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nfsd: corrige el use-after-free debido a la ejecuci\u00f3n de delegaci\u00f3n. Una interrupci\u00f3n de la delegaci\u00f3n podr\u00eda llegar tan pronto como hayamos llamado a vfs_setlease. Una interrupci\u00f3n de la delegaci\u00f3n ejecuta una devoluci\u00f3n de llamada que inmediatamente (en nfsd4_cb_recall_prepare) agrega la delegaci\u00f3n a del_recall_lru. Si luego salimos de nfs4_set_delegation sin aplicar hash a la delegaci\u00f3n, se liberar\u00e1 tan pronto como finalice la devoluci\u00f3n de llamada, sin eliminarse nunca de del_recall_lru. Los s\u00edntomas aparecen m\u00e1s tarde como advertencias de use-after-free o de corrupci\u00f3n en la lista, generalmente en el hilo de la lavander\u00eda. Sospecho que aba2072f4523 \\\"nfsd: otorgar delegaciones de lectura a clientes que tienen escrituras\\\" hizo que este error fuera m\u00e1s f\u00e1cil de corregir, pero mir\u00e9 hasta la versi\u00f3n 3.0 y me parece que ya ten\u00eda el mismo problema. Entonces no estoy seguro de d\u00f3nde se introdujo el error; puede que haya estado ah\u00ed desde el principio.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/348714018139c39533c55661a0c7c990671396b4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/548ec0805c399c65ed66c6641be467f717833ab5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/eeb0711801f5e19ef654371b627682aed3b11373\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...