{"id":"CVE-2022-50322","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 valid…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= be7d9c9161b9c76edeff15e79edc2f256568fe05 < 5affaaf3334c9274131dae889ed79ea0553d61b4","Linux >= be7d9c9161b9c76edeff15e79edc2f256568fe05 < ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0","Linux >= be7d9c9161b9c76edeff15e79edc2f256568fe05 < 21b8a1dd56a163825e5749b303858fb902ebf198","Linux 5.16"],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-05T20:09:53.214185Z"},"published":"2025-09-15","updated":"2026-11-05","sourceUpdated":"2026-11-05T20:10:35.194Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2022-50322","references":[{"url":"https://git.kernel.org/stable/c/5affaaf3334c9274131dae889ed79ea0553d61b4"},{"url":"https://git.kernel.org/stable/c/ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0"},{"url":"https://git.kernel.org/stable/c/21b8a1dd56a163825e5749b303858fb902ebf198"}],"tags":["cve.org"],"epss":0.00157,"epssPercentile":0.04909,"ingestedAt":"2026-11-05T22:38:31.725Z","slug":"CVE-2022-50322","body":"## Overview\n\nIn 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.\n\n## Affected\n\n- `Linux >= be7d9c9161b9c76edeff15e79edc2f256568fe05 < 5affaaf3334c9274131dae889ed79ea0553d61b4`\n- `Linux >= be7d9c9161b9c76edeff15e79edc2f256568fe05 < ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0`\n- `Linux >= be7d9c9161b9c76edeff15e79edc2f256568fe05 < 21b8a1dd56a163825e5749b303858fb902ebf198`\n- `Linux 5.16`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}