CVE-2022-50322
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-15

Last updated on: 2025-12-04

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe() 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. msc313_rtc_probe() was passing clk_disable_unprepare() directly, which did not have matching prototypes for devm_add_action_or_reset()'s callback argument. Refactor to use devm_clk_get_enabled() instead. This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-15
Last Modified
2025-12-04
Generated
2026-05-07
AI Q&A
2025-09-15
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 5.16 (inc) to 6.0.17 (exc)
linux linux_kernel From 6.1 (inc) to 6.1.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-NVD-CWE-noinfo
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a function prototype mismatch in the Linux kernel's msc313_rtc_probe() function. The issue arises because msc313_rtc_probe() was passing clk_disable_unprepare() directly as a callback to devm_add_action_or_reset(), but their function prototypes did not match. With Clang's kernel control flow integrity (kCFI) enabled, indirect call targets must match the expected function pointer prototype to prevent runtime failures such as kernel panics or thread termination. The fix involved refactoring the code to use devm_clk_get_enabled() instead, ensuring the function prototypes align and preventing these runtime failures.


How can this vulnerability impact me? :

If this vulnerability is triggered, it can cause runtime failures in the Linux kernel, such as kernel panics or threads being killed. This can lead to system instability, crashes, or denial of service, impacting the reliability and availability of systems running the affected kernel version.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart