CVE-2021-47081
Vulnerability from cvelistv5
Published
2024-03-01 21:15
Modified
2024-11-04 11:59
Severity ?
Summary
habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47081",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-03-04T19:32:29.244809Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:14:15.058Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:24:39.774Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/misc/habanalabs/gaudi/gaudi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b49f5af30b0e",
              "status": "affected",
              "version": "423815bf02e2",
              "versionType": "git"
            },
            {
              "lessThan": "115726c5d312",
              "status": "affected",
              "version": "423815bf02e2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/misc/habanalabs/gaudi/gaudi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.12"
            },
            {
              "lessThan": "5.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.12.*",
              "status": "unaffected",
              "version": "5.12.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nhabanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory\n\nOur code analyzer reported a uaf.\n\nIn gaudi_memset_device_memory, cb is get via hl_cb_kernel_create()\nwith 2 refcount.\nIf hl_cs_allocate_job() failed, the execution runs into release_cb\nbranch. One ref of cb is dropped by hl_cb_put(cb) and could be freed\nif other thread also drops one ref. Then cb is used by cb-\u003eid later,\nwhich is a potential uaf.\n\nMy patch add a variable \u0027id\u0027 to accept the value of cb-\u003eid before the\nhl_cb_put(cb) is called, to avoid the potential uaf."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T11:59:04.126Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7"
        },
        {
          "url": "https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076"
        }
      ],
      "title": "habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47081",
    "datePublished": "2024-03-01T21:15:16.684Z",
    "dateReserved": "2024-02-29T22:33:44.298Z",
    "dateUpdated": "2024-11-04T11:59:04.126Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47081\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-03-01T22:15:47.483\",\"lastModified\":\"2024-03-01T22:22:25.913\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nhabanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory\\n\\nOur code analyzer reported a uaf.\\n\\nIn gaudi_memset_device_memory, cb is get via hl_cb_kernel_create()\\nwith 2 refcount.\\nIf hl_cs_allocate_job() failed, the execution runs into release_cb\\nbranch. One ref of cb is dropped by hl_cb_put(cb) and could be freed\\nif other thread also drops one ref. Then cb is used by cb-\u003eid later,\\nwhich is a potential uaf.\\n\\nMy patch add a variable \u0027id\u0027 to accept the value of cb-\u003eid before the\\nhl_cb_put(cb) is called, to avoid the potential uaf.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux se ha resuelto la siguiente vulnerabilidad: habanalabs/gaudi: Corregir un uso potencial despu\u00e9s de liberar en gaudi_memset_device_memory Nuestro analizador de c\u00f3digo report\u00f3 un uaf. En gaudi_memset_device_memory, cb se obtiene a trav\u00e9s de hl_cb_kernel_create() con 2 refcount. Si hl_cs_allocate_job() falla, la ejecuci\u00f3n se ejecuta en la rama release_cb. hl_cb_put(cb) elimina una referencia de cb y podr\u00eda liberarse si otro hilo tambi\u00e9n elimina una referencia. Luego, cb-\u0026gt;id usa cb m\u00e1s tarde, que es un uaf potencial. Mi parche agrega una variable \u0027id\u0027 para aceptar el valor de cb-\u0026gt;id antes de llamar a hl_cb_put(cb), para evitar el potencial uaf.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.