{"id":"CVE-2022-50322","aliases":["CVE-2022-50322"],"related":[],"kind":"vulnerability","state":"published","title":"rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nrtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()\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.\n\nmsc313_rtc_probe() was passing clk_disable_unprepare() directly, which\ndid not have matching prototypes for devm_add_action_or_reset()'s\ncallback argument. Refactor to use devm_clk_get_enabled() instead.\n\nThis was found as a result of Clang's new -Wcast-function-type-strict\nflag, which is more sensitive than the simpler -Wcast-function-type,\nwhich only checks for type width mismatches.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nrtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()\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.\n\nmsc313_rtc_probe() was passing clk_disable_unprepare() directly, which\ndid not have matching prototypes for devm_add_action_or_reset()'s\ncallback argument. Refactor to use devm_clk_get_enabled() instead.\n\nThis was found as a result of Clang's new -Wcast-function-type-strict\nflag, which is more sensitive than the simpler -Wcast-function-type,\nwhich only checks for type width mismatches.","source":"cvelist"}],"published":"2025-09-15T14:48:55.905Z","modified":"2026-11-05T20:17:34.787Z","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":"be7d9c9161b9c76edeff15e79edc2f256568fe05","fixed":"5affaaf3334c9274131dae889ed79ea0553d61b4","status":"affected"},{"type":"git","introduced":"be7d9c9161b9c76edeff15e79edc2f256568fe05","fixed":"ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0","status":"affected"},{"type":"git","introduced":"be7d9c9161b9c76edeff15e79edc2f256568fe05","fixed":"21b8a1dd56a163825e5749b303858fb902ebf198","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.16","status":"unaffected"},{"type":"semver","introduced":"6.0.17","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.3","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","introduced":"5.16","fixed":"6.0.17"},{"status":"affected","introduced":"6.1","fixed":"6.1.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/5affaaf3334c9274131dae889ed79ea0553d61b4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/21b8a1dd56a163825e5749b303858fb902ebf198","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T20:09:53.214Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50322","url":"https://www.cve.org/CVERecord?id=CVE-2022-50322","licence":"CVE Terms of Use","modified":"2026-11-05T20:10:35.194Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50322","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50322","licence":"Public domain","modified":"2026-11-05T20:17:34.787Z"}],"updatedAt":"2026-11-25T22:58:21.164Z","epss":{"score":0.00164,"percentile":0.05858,"date":"2026-12-02T12:00:21.000Z"}}