Function Prototype Mismatch Vulnerability in Linux Kernel Affecting rtc: msc313
CVE-2022-50322

Currently unrated

Key Information:

Vendor

Linux

Status
Vendor
CVE Published:
15 September 2025

What is CVE-2022-50322?

A function prototype mismatch was identified in the Linux kernel, specifically within the rtc: msc313 component. This vulnerability could lead to runtime failures, such as kernel panics or unintended thread termination, when indirect function calls are misaligned due to type prototype mismatches. This misalignment was brought to attention through Clang's -Wcast-function-type-strict flag, which is designed to catch stricter type casting issues during development. The identified issue arose from improper passing of clk_disable_unprepare() within the msc313_rtc_probe() function, which lacked compatibility with devm_add_action_or_reset()'s expected callback argument prototype. Corrective measures involved refactoring the function to properly utilize devm_clk_get_enabled(), ensuring that type integrity is maintained and enhancing overall system stability.

Affected Version(s)

Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 5affaaf3334c9274131dae889ed79ea0553d61b4

Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2

Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 21b8a1dd56a163825e5749b303858fb902ebf198

References

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.