{"id":"CVE-2022-50322","summary":"rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()","details":"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.","modified":"2026-04-02T08:28:25.028457Z","published":"2025-09-15T14:48:55.905Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50322.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/21b8a1dd56a163825e5749b303858fb902ebf198"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5affaaf3334c9274131dae889ed79ea0553d61b4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50322.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50322"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"be7d9c9161b9c76edeff15e79edc2f256568fe05"},{"fixed":"5affaaf3334c9274131dae889ed79ea0553d61b4"},{"fixed":"ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0"},{"fixed":"21b8a1dd56a163825e5749b303858fb902ebf198"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50322.json"}}],"schema_version":"1.7.5"}