{"id":"CVE-2022-50261","aliases":["CVE-2022-50261"],"related":[],"kind":"vulnerability","state":"published","title":"drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()","summary":"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's 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 '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]\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 '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]\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 '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]\n          .mode_valid = sti_hdmi_connector_mode_valid,\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n->mode_valid() in 'struct drm_connector_helper_funcs' expects a return\ntype of 'enum drm_mode_status', not 'int'. Adjust the return type of\nsti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype's to\nresolve the warning and CFI failure.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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's 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 '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]\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 '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]\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 '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]\n          .mode_valid = sti_hdmi_connector_mode_valid,\n                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n->mode_valid() in 'struct drm_connector_helper_funcs' expects a return\ntype of 'enum drm_mode_status', not 'int'. Adjust the return type of\nsti_{dvo,hda,hdmi}_connector_mode_valid() to match the prototype's to\nresolve the warning and CFI failure.","source":"cvelist"}],"published":"2025-09-15T14:03:04.439Z","modified":"2026-06-17T05:23:06.087Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"b2c92b2a3801b09b709cbefd9a9e4944b72400bf","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"b4307c7d35e346b909edfdc1f280902150570bb6","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"8f9941dea3a70b73f2063f9dcc4aaae6af03c5ba","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"511b48ee8e4aec2d03d2af06b363d9eb3230b017","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"6e3c4d3fa5d458d685561ecbaf8daa9dba14979e","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"a075c21ee026f4a74f9fce5928ea3c8d18a8af13","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"e578b0906b6a81479cd5b5b6c848a7096addf5e9","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"04371a75a58422a301a9ff9ae3babd310ac3bb3f","status":"affected"},{"type":"git","introduced":"5402626c83a2f19da14859e2bab231a53e16ee74","fixed":"0ad811cc08a937d875cbad0149c1bab17f84ba05","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.17","status":"unaffected"},{"type":"semver","introduced":"4.9.337","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.303","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.270","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.229","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.163","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.86","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.16","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.2","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.9.337"},{"status":"affected","introduced":"4.10","fixed":"4.14.303"},{"status":"affected","introduced":"4.15","fixed":"4.19.270"},{"status":"affected","introduced":"4.20","fixed":"5.4.229"},{"status":"affected","introduced":"5.5","fixed":"5.10.163"},{"status":"affected","introduced":"5.11","fixed":"5.15.86"},{"status":"affected","introduced":"5.16","fixed":"6.0.16"},{"status":"affected","introduced":"6.1","fixed":"6.1.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/b2c92b2a3801b09b709cbefd9a9e4944b72400bf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b4307c7d35e346b909edfdc1f280902150570bb6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8f9941dea3a70b73f2063f9dcc4aaae6af03c5ba","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/511b48ee8e4aec2d03d2af06b363d9eb3230b017","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6e3c4d3fa5d458d685561ecbaf8daa9dba14979e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a075c21ee026f4a74f9fce5928ea3c8d18a8af13","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e578b0906b6a81479cd5b5b6c848a7096addf5e9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/04371a75a58422a301a9ff9ae3babd310ac3bb3f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ad811cc08a937d875cbad0149c1bab17f84ba05","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50261","url":"https://www.cve.org/CVERecord?id=CVE-2022-50261","licence":"CVE Terms of Use","modified":"2026-05-11T19:15:53.926Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50261","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50261","licence":"Public domain","modified":"2026-06-17T05:23:06.087Z"}],"updatedAt":"2026-11-25T22:58:21.135Z","epss":{"score":0.0017,"percentile":0.06663,"date":"2026-12-01T12:00:22.000Z"}}