cve-2024-26672
Vulnerability from cvelistv5
Published
2024-04-02 06:49
Modified
2024-08-02 00:14
Severity ?
Summary
drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()'
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26672",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-04-02T15:55:06.193007Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:48:15.541Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:14:12.752Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/7b5d58c07024516c0e81b95e98f37710cf402c53"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/4f32504a2f85a7b40fe149436881381f48e9c0c0"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "7b5d58c07024",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "4f32504a2f85",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.4",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.8",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: Fix variable \u0027mca_funcs\u0027 dereferenced before NULL check in \u0027amdgpu_mca_smu_get_mca_entry()\u0027\n\nFixes the below:\n\ndrivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check \u0027mca_funcs\u0027 (see line 368)\n\n357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev,\n\t\t\t\t     enum amdgpu_mca_error_type type,\n358                                  int idx, struct mca_bank_entry *entry)\n359 {\n360         const struct amdgpu_mca_smu_funcs *mca_funcs =\n\t\t\t\t\t\tadev-\u003emca.mca_funcs;\n361         int count;\n362\n363         switch (type) {\n364         case AMDGPU_MCA_ERROR_TYPE_UE:\n365                 count = mca_funcs-\u003emax_ue_count;\n\nmca_funcs is dereferenced here.\n\n366                 break;\n367         case AMDGPU_MCA_ERROR_TYPE_CE:\n368                 count = mca_funcs-\u003emax_ce_count;\n\nmca_funcs is dereferenced here.\n\n369                 break;\n370         default:\n371                 return -EINVAL;\n372         }\n373\n374         if (idx \u003e= count)\n375                 return -EINVAL;\n376\n377         if (mca_funcs \u0026\u0026 mca_funcs-\u003emca_get_mca_entry)\n\t        ^^^^^^^^^\n\nChecked too late!"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:20:35.031Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/7b5d58c07024516c0e81b95e98f37710cf402c53"
        },
        {
          "url": "https://git.kernel.org/stable/c/4f32504a2f85a7b40fe149436881381f48e9c0c0"
        }
      ],
      "title": "drm/amdgpu: Fix variable \u0027mca_funcs\u0027 dereferenced before NULL check in \u0027amdgpu_mca_smu_get_mca_entry()\u0027",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26672",
    "datePublished": "2024-04-02T06:49:14.653Z",
    "dateReserved": "2024-02-19T14:20:24.150Z",
    "dateUpdated": "2024-08-02T00:14:12.752Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-26672\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-04-02T07:15:43.900\",\"lastModified\":\"2024-04-02T12:50:42.233\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/amdgpu: Fix variable \u0027mca_funcs\u0027 dereferenced before NULL check in \u0027amdgpu_mca_smu_get_mca_entry()\u0027\\n\\nFixes the below:\\n\\ndrivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check \u0027mca_funcs\u0027 (see line 368)\\n\\n357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev,\\n\\t\\t\\t\\t     enum amdgpu_mca_error_type type,\\n358                                  int idx, struct mca_bank_entry *entry)\\n359 {\\n360         const struct amdgpu_mca_smu_funcs *mca_funcs =\\n\\t\\t\\t\\t\\t\\tadev-\u003emca.mca_funcs;\\n361         int count;\\n362\\n363         switch (type) {\\n364         case AMDGPU_MCA_ERROR_TYPE_UE:\\n365                 count = mca_funcs-\u003emax_ue_count;\\n\\nmca_funcs is dereferenced here.\\n\\n366                 break;\\n367         case AMDGPU_MCA_ERROR_TYPE_CE:\\n368                 count = mca_funcs-\u003emax_ce_count;\\n\\nmca_funcs is dereferenced here.\\n\\n369                 break;\\n370         default:\\n371                 return -EINVAL;\\n372         }\\n373\\n374         if (idx \u003e= count)\\n375                 return -EINVAL;\\n376\\n377         if (mca_funcs \u0026\u0026 mca_funcs-\u003emca_get_mca_entry)\\n\\t        ^^^^^^^^^\\n\\nChecked too late!\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/amdgpu: corrige la variable \u0027mca_funcs\u0027 desreferenciada antes de la comprobaci\u00f3n NULL en \u0027amdgpu_mca_smu_get_mca_entry()\u0027 Corrige lo siguiente: drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() advertencia: variable desreferenciada antes de verificar \u0027mca_funcs\u0027 (ver l\u00ednea 368) 357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev, enum amdgpu_mca_error_type type, 358 int idx, struct mca_bank_entry *entry) 359 { 360 const struct amdgpu_mca_smu_funcs *mca_funcs = adev- \u0026gt;mca.mca_funcs; 361 recuentos internacionales; 362 363 interruptor (tipo) { 364 caso AMDGPU_MCA_ERROR_TYPE_UE: 365 recuento = mca_funcs-\u0026gt;max_ue_count; Aqu\u00ed se elimina la referencia a mca_funcs. 366 descanso; 367 caso AMDGPU_MCA_ERROR_TYPE_CE: 368 recuento = mca_funcs-\u0026gt;max_ce_count; Aqu\u00ed se elimina la referencia a mca_funcs. 369 descanso; 370 predeterminado: 371 retorno -EINVAL; 372 } 373 374 si (idx \u0026gt;= recuento) 375 retorno -EINVAL; 376 377 if (mca_funcs \u0026amp;\u0026amp; mca_funcs-\u0026gt;mca_get_mca_entry) ^^^^^^^^^ \u00a1Comprobado demasiado tarde!\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/4f32504a2f85a7b40fe149436881381f48e9c0c0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7b5d58c07024516c0e81b95e98f37710cf402c53\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...