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

Published Nov 8, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

posix-clock: Fix missing timespec64 check in pcclocksettime()

As Andrew pointed out, it will make sense that the PTP core checked timespec64 struct's tvsec and tvnsec range before calling ptp->info->settime64().

As the man manual of clocksettime() said, if tp.tvsec is negative or tp.tvnsec 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 timespec64valid(). As Thomas suggested, timespec64valid() only check the timespec is valid, but not ensure that the time is in a valid range, so check it ahead using timespec64validstrict() in pcclocksettime() and return -EINVAL if not valid.

There are some drivers that use tp->tvsec and tp->tvnsec 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 hclgeptpsettime(), igbptpsettimei210(), rcargen4ptpsettime(), and some drivers can remove the checks of itself.

Other sources

In the Linux kernel, the following vulnerability has been resolved:

posix-clock: Fix missing timespec64 check in pcclocksettime()

As Andrew pointed out, it will make sense that the PTP core checked timespec64 struct's tvsec and tvnsec range before calling ptp-info-settime64().

As the man manual of clocksettime() said, if tp.tvsec is negative or tp.tvnsec 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 timespec64valid(). As Thomas suggested, timespec64valid() only check the timespec is valid, but not ensure that the time is in a valid range, so check it ahead using timespec64validstrict() in pcclocksettime() and return -EINVAL if not valid.

There are some drivers that use tp-tvsec and tp-tvnsec 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 hclgeptpsettime(), igbptpsettimei210(), rcargen4ptpsettime(), and some drivers can remove the checks of itself.

IBM

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

21 affected componentsFixes available
Linux Linux kernel>=2.6.39<4.19.323
Linux Linux kernel>=4.20<5.4.285
Linux Linux kernel>=5.5<5.10.228
Linux Linux kernel>=5.11<5.15.169
Linux Linux kernel>=5.16<6.1.114
Linux Linux kernel>=6.2<6.6.58
Linux Linux kernel>=6.7<6.11.5
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1
Microsoft azl3 kernel 6.6.64.2-1
Microsoft cbl2 kernel 5.15.173.1-1
Microsoft cbl2 kernel 5.15.167.1-2
Microsoft azl3 kernel 6.6.57.1-7
Microsoft cbl2 kernel 5.15.167.1-2
IBM Verify Identity Access<=11.0 - 11.0.2
IBM Security Verify Access<=10.0 - 10.0.9.1
IBM Verify Identity Access Container<=11.0 - 11.0.2
IBM Security Verify Access Container<=10.0 - 10.0.9.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1

Event History

Nov 8, 2024
CVE Published
via MITRE·05:54 AM
Data Sourced
via MITRE·05:54 AM
Description
Data Sourced
via NVD·06:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·01:44 PM
DescriptionSeverityAffected Software
Dec 12, 2024
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
DescriptionSeverity
Updated
via Microsoft·08:00 AM
Description
Feb 20, 2025
Data Sourced
via Launchpad·12:45 AM
Description
Apr 29, 2025
Data Sourced
via Ubuntu·01:00 AM
RemedyDescriptionSeverityAffected Software
Jul 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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

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

5

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203