CVE-2022-50261 (GCVE-0-2022-50261)
Vulnerability from cvelistv5
Published
2025-09-15 14:03
Modified
2025-09-15 14:03
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals: drivers/gpu/drm/sti/sti_hda.c:637:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = sti_hda_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/sti/sti_dvo.c:376:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = sti_dvo_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/sti/sti_hdmi.c:1035:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)' with an expression of type 'int (struct drm_connector *, struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict] .mode_valid = sti_hdmi_connector_mode_valid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ->mode_valid() in 'struct drm_connector_helper_funcs' expects a return type of 'enum drm_mode_status', not 'int'. Adjust the return type of sti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype's to resolve the warning and CFI failure.
Impacted products
Vendor Product Version
Linux Linux Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Create a notification for this product.
   Linux Linux Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/sti/sti_dvo.c",
            "drivers/gpu/drm/sti/sti_hda.c",
            "drivers/gpu/drm/sti/sti_hdmi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b2c92b2a3801b09b709cbefd9a9e4944b72400bf",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "b4307c7d35e346b909edfdc1f280902150570bb6",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "8f9941dea3a70b73f2063f9dcc4aaae6af03c5ba",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "511b48ee8e4aec2d03d2af06b363d9eb3230b017",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "6e3c4d3fa5d458d685561ecbaf8daa9dba14979e",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "a075c21ee026f4a74f9fce5928ea3c8d18a8af13",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "e578b0906b6a81479cd5b5b6c848a7096addf5e9",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "04371a75a58422a301a9ff9ae3babd310ac3bb3f",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "0ad811cc08a937d875cbad0149c1bab17f84ba05",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/sti/sti_dvo.c",
            "drivers/gpu/drm/sti/sti_hda.c",
            "drivers/gpu/drm/sti/sti_hdmi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.337",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.303",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.270",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.229",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.86",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.9.337",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.303",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.270",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.229",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.86",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()\n\nWith clang\u0027s kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),\nindirect call targets are validated against the expected function\npointer prototype to make sure the call target is valid to help mitigate\nROP attacks. If they are not identical, there is a failure at run time,\nwhich manifests as either a kernel panic or thread getting killed. A\nproposed warning in clang aims to catch these at compile time, which\nreveals:\n\n  drivers/gpu/drm/sti/sti_hda.c:637:16: error: incompatible function pointer types initializing \u0027enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)\u0027 with an expression of type \u0027int (struct drm_connector *, struct drm_display_mode *)\u0027 [-Werror,-Wincompatible-function-pointer-types-strict]\n          .mode_valid = sti_hda_connector_mode_valid,\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  drivers/gpu/drm/sti/sti_dvo.c:376:16: error: incompatible function pointer types initializing \u0027enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)\u0027 with an expression of type \u0027int (struct drm_connector *, struct drm_display_mode *)\u0027 [-Werror,-Wincompatible-function-pointer-types-strict]\n          .mode_valid = sti_dvo_connector_mode_valid,\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  drivers/gpu/drm/sti/sti_hdmi.c:1035:16: error: incompatible function pointer types initializing \u0027enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)\u0027 with an expression of type \u0027int (struct drm_connector *, struct drm_display_mode *)\u0027 [-Werror,-Wincompatible-function-pointer-types-strict]\n          .mode_valid = sti_hdmi_connector_mode_valid,\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n-\u003emode_valid() in \u0027struct drm_connector_helper_funcs\u0027 expects a return\ntype of \u0027enum drm_mode_status\u0027, not \u0027int\u0027. Adjust the return type of\nsti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype\u0027s to\nresolve the warning and CFI failure."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-09-15T14:03:04.439Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b2c92b2a3801b09b709cbefd9a9e4944b72400bf"
        },
        {
          "url": "https://git.kernel.org/stable/c/b4307c7d35e346b909edfdc1f280902150570bb6"
        },
        {
          "url": "https://git.kernel.org/stable/c/8f9941dea3a70b73f2063f9dcc4aaae6af03c5ba"
        },
        {
          "url": "https://git.kernel.org/stable/c/511b48ee8e4aec2d03d2af06b363d9eb3230b017"
        },
        {
          "url": "https://git.kernel.org/stable/c/6e3c4d3fa5d458d685561ecbaf8daa9dba14979e"
        },
        {
          "url": "https://git.kernel.org/stable/c/a075c21ee026f4a74f9fce5928ea3c8d18a8af13"
        },
        {
          "url": "https://git.kernel.org/stable/c/e578b0906b6a81479cd5b5b6c848a7096addf5e9"
        },
        {
          "url": "https://git.kernel.org/stable/c/04371a75a58422a301a9ff9ae3babd310ac3bb3f"
        },
        {
          "url": "https://git.kernel.org/stable/c/0ad811cc08a937d875cbad0149c1bab17f84ba05"
        }
      ],
      "title": "drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50261",
    "datePublished": "2025-09-15T14:03:04.439Z",
    "dateReserved": "2025-09-15T13:58:00.974Z",
    "dateUpdated": "2025-09-15T14:03:04.439Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50261\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-15T14:15:36.997\",\"lastModified\":\"2025-09-15T15:22:27.090\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()\\n\\nWith clang\u0027s kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),\\nindirect call targets are validated against the expected function\\npointer prototype to make sure the call target is valid to help mitigate\\nROP attacks. If they are not identical, there is a failure at run time,\\nwhich manifests as either a kernel panic or thread getting killed. A\\nproposed warning in clang aims to catch these at compile time, which\\nreveals:\\n\\n  drivers/gpu/drm/sti/sti_hda.c:637:16: error: incompatible function pointer types initializing \u0027enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)\u0027 with an expression of type \u0027int (struct drm_connector *, struct drm_display_mode *)\u0027 [-Werror,-Wincompatible-function-pointer-types-strict]\\n          .mode_valid = sti_hda_connector_mode_valid,\\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n  drivers/gpu/drm/sti/sti_dvo.c:376:16: error: incompatible function pointer types initializing \u0027enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)\u0027 with an expression of type \u0027int (struct drm_connector *, struct drm_display_mode *)\u0027 [-Werror,-Wincompatible-function-pointer-types-strict]\\n          .mode_valid = sti_dvo_connector_mode_valid,\\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n  drivers/gpu/drm/sti/sti_hdmi.c:1035:16: error: incompatible function pointer types initializing \u0027enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)\u0027 with an expression of type \u0027int (struct drm_connector *, struct drm_display_mode *)\u0027 [-Werror,-Wincompatible-function-pointer-types-strict]\\n          .mode_valid = sti_hdmi_connector_mode_valid,\\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\\n-\u003emode_valid() in \u0027struct drm_connector_helper_funcs\u0027 expects a return\\ntype of \u0027enum drm_mode_status\u0027, not \u0027int\u0027. Adjust the return type of\\nsti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype\u0027s to\\nresolve the warning and CFI failure.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/04371a75a58422a301a9ff9ae3babd310ac3bb3f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/0ad811cc08a937d875cbad0149c1bab17f84ba05\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/511b48ee8e4aec2d03d2af06b363d9eb3230b017\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6e3c4d3fa5d458d685561ecbaf8daa9dba14979e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8f9941dea3a70b73f2063f9dcc4aaae6af03c5ba\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a075c21ee026f4a74f9fce5928ea3c8d18a8af13\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b2c92b2a3801b09b709cbefd9a9e4944b72400bf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b4307c7d35e346b909edfdc1f280902150570bb6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e578b0906b6a81479cd5b5b6c848a7096addf5e9\",\"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…