CVE-2022-50185 (GCVE-0-2022-50185)
Vulnerability from cvelistv5
Published
2025-06-18 11:03
Modified
2025-06-18 11:03
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers() The last case label can write two buffers 'mc_reg_address[j]' and 'mc_data[j]' with 'j' offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE since there are no checks for this value in both case labels after the last 'j++'. Instead of changing '>' to '>=' there, add the bounds check at the start of the second 'case' (the first one already has it). Also, remove redundant last checks for 'j' index bigger than array size. The expression is always false. Moreover, before or after the patch 'table->last' can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it seems it can be a valid value. Detected using the static analysis tool - Svace.
Impacted products
Vendor Product Version
Linux Linux Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Version: 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/radeon/ni_dpm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ea73869df6ef386fc0feeb28ff66742ca835b18f",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "1f341053852be76f82610ce47a505d930512f05c",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "db1a9add3f90ff1c641974d5bb910c16b87af4ef",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "8508d6d23a247c29792ce2fc0df3f3404d6a6a80",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "deb603c5928e546609c0d5798e231d0205748943",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "782e413e38dffd37cc85b08b1ccb982adb4a93ce",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "9faff03617afeced1c4e5daa89e79b3906374342",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            },
            {
              "lessThan": "136f614931a2bb73616b292cf542da3a18daefd5",
              "status": "affected",
              "version": "69e0b57a91adca2e3eb56ed4db39ab90f3ae1043",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/radeon/ni_dpm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.11"
            },
            {
              "lessThan": "3.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.291",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.256",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.211",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.137",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.291",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.256",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.211",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.137",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.61",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.18",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.2",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "3.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()\n\nThe last case label can write two buffers \u0027mc_reg_address[j]\u0027 and\n\u0027mc_data[j]\u0027 with \u0027j\u0027 offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE\nsince there are no checks for this value in both case labels after the\nlast \u0027j++\u0027.\n\nInstead of changing \u0027\u003e\u0027 to \u0027\u003e=\u0027 there, add the bounds check at the start\nof the second \u0027case\u0027 (the first one already has it).\n\nAlso, remove redundant last checks for \u0027j\u0027 index bigger than array size.\nThe expression is always false. Moreover, before or after the patch\n\u0027table-\u003elast\u0027 can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it\nseems it can be a valid value.\n\nDetected using the static analysis tool - Svace."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-18T11:03:32.843Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ea73869df6ef386fc0feeb28ff66742ca835b18f"
        },
        {
          "url": "https://git.kernel.org/stable/c/1f341053852be76f82610ce47a505d930512f05c"
        },
        {
          "url": "https://git.kernel.org/stable/c/db1a9add3f90ff1c641974d5bb910c16b87af4ef"
        },
        {
          "url": "https://git.kernel.org/stable/c/8508d6d23a247c29792ce2fc0df3f3404d6a6a80"
        },
        {
          "url": "https://git.kernel.org/stable/c/deb603c5928e546609c0d5798e231d0205748943"
        },
        {
          "url": "https://git.kernel.org/stable/c/782e413e38dffd37cc85b08b1ccb982adb4a93ce"
        },
        {
          "url": "https://git.kernel.org/stable/c/9faff03617afeced1c4e5daa89e79b3906374342"
        },
        {
          "url": "https://git.kernel.org/stable/c/136f614931a2bb73616b292cf542da3a18daefd5"
        }
      ],
      "title": "drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50185",
    "datePublished": "2025-06-18T11:03:32.843Z",
    "dateReserved": "2025-06-18T10:57:27.427Z",
    "dateUpdated": "2025-06-18T11:03:32.843Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50185\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T11:15:49.030\",\"lastModified\":\"2025-06-18T13:47:40.833\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()\\n\\nThe last case label can write two buffers \u0027mc_reg_address[j]\u0027 and\\n\u0027mc_data[j]\u0027 with \u0027j\u0027 offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE\\nsince there are no checks for this value in both case labels after the\\nlast \u0027j++\u0027.\\n\\nInstead of changing \u0027\u003e\u0027 to \u0027\u003e=\u0027 there, add the bounds check at the start\\nof the second \u0027case\u0027 (the first one already has it).\\n\\nAlso, remove redundant last checks for \u0027j\u0027 index bigger than array size.\\nThe expression is always false. Moreover, before or after the patch\\n\u0027table-\u003elast\u0027 can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it\\nseems it can be a valid value.\\n\\nDetected using the static analysis tool - Svace.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/radeon: corrige un desbordamiento de b\u00fafer potencial en ni_set_mc_special_registers() La \u00faltima etiqueta de caso puede escribir dos b\u00faferes \u0027mc_reg_address[j]\u0027 y \u0027mc_data[j]\u0027 con el desplazamiento \u0027j\u0027 igual a SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ya que no hay comprobaciones para este valor en ambas etiquetas de caso despu\u00e9s del \u00faltimo \u0027j++\u0027. En lugar de cambiar \\\"\u0026gt;\\\" a \\\"\u0026gt;=\\\" all\u00ed, agregue la comprobaci\u00f3n de los l\u00edmites al comienzo del segundo \u0027caso\u0027 (el primero ya lo tiene). Adem\u00e1s, elimine las \u00faltimas comprobaciones redundantes para el \u00edndice \u0027j\u0027 mayor que el tama\u00f1o del arreglo. La expresi\u00f3n siempre es falsa. Adem\u00e1s, antes o despu\u00e9s del parche \u0027table-\u0026gt;last\u0027 puede ser igual a SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE y parece que puede ser un valor v\u00e1lido. Detectado usando la herramienta de an\u00e1lisis est\u00e1tico - Svace.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/136f614931a2bb73616b292cf542da3a18daefd5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1f341053852be76f82610ce47a505d930512f05c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/782e413e38dffd37cc85b08b1ccb982adb4a93ce\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8508d6d23a247c29792ce2fc0df3f3404d6a6a80\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9faff03617afeced1c4e5daa89e79b3906374342\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/db1a9add3f90ff1c641974d5bb910c16b87af4ef\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/deb603c5928e546609c0d5798e231d0205748943\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ea73869df6ef386fc0feeb28ff66742ca835b18f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

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


Loading…

Loading…