CWE
754
Advisory Published
Updated

CVE-2024-50195: posix-clock: Fix missing timespec64 check in pc_clock_settime()

First published: Fri Nov 08 2024(Updated: )

In the Linux kernel, the following vulnerability has been resolved: posix-clock: Fix missing timespec64 check in pc_clock_settime() As Andrew pointed out, it will make sense that the PTP core checked timespec64 struct's tv_sec and tv_nsec range before calling ptp->info->settime64(). As the man manual of clock_settime() said, if tp.tv_sec is negative or tp.tv_nsec is outside the range [0..999,999,999], it should return EINVAL, which include dynamic clocks which handles PTP clock, and the condition is consistent with timespec64_valid(). As Thomas suggested, timespec64_valid() only check the timespec is valid, but not ensure that the time is in a valid range, so check it ahead using timespec64_valid_strict() in pc_clock_settime() and return -EINVAL if not valid. There are some drivers that use tp->tv_sec and tp->tv_nsec directly to write registers without validity checks and assume that the higher layer has checked it, which is dangerous and will benefit from this, such as hclge_ptp_settime(), igb_ptp_settime_i210(), _rcar_gen4_ptp_settime(), and some drivers can remove the checks of itself.

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Linux Kernel>=2.6.39<4.19.323
Linux Kernel>=4.20<5.4.285
Linux Kernel>=5.5<5.10.228
Linux Kernel>=5.11<5.15.169
Linux Kernel>=5.16<6.1.114
Linux Kernel>=6.2<6.6.58
Linux Kernel>=6.7<6.11.5
Linux Kernel=6.12-rc1
Linux Kernel=6.12-rc2
Linux Kernel=6.12-rc3

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2024-50195?

    The severity of CVE-2024-50195 is determined to be moderate due to its potential impact on the Linux kernel's timing operations.

  • How do I fix CVE-2024-50195?

    To fix CVE-2024-50195, update your Linux kernel to a version that includes the security patch addressing this vulnerability.

  • Which Linux kernel versions are affected by CVE-2024-50195?

    CVE-2024-50195 affects Linux kernel versions from 2.6.39 to 6.12-rc3, encompassing a wide range of releases.

  • What component of the Linux kernel is impacted by CVE-2024-50195?

    CVE-2024-50195 impacts the posix-clock component within the Linux kernel.

  • Can CVE-2024-50195 lead to denial of service?

    While CVE-2024-50195 primarily affects timing operations, it could potentially lead to a denial of service under certain conditions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203