CVE-2024-50195
MediumIn 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.
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-754CVE-2024-50195 is classified as CWE-754
See CWE-754 on MITRE CWE for full details on this weakness type.
Affected versions
Linux kernel versions
2.6.39
and later are affected. Fixed in
4.19.323,
5.4.285,
5.10.228,
5.15.169,
6.1.114,
6.6.58,
6.11.5,
6.12
and their respective stable series.
References
The following references provide additional information about CVE-2024-50195 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
-
-
PatchKernel patch commithttps://git.kernel.org/stable/c/1ff7247101af723731ea42ed565d54fb8f341264
-
PatchKernel patch commithttps://git.kernel.org/stable/c/27abbde44b6e71ee3891de13e1a228aa7ce95bfe
-
PatchKernel patch commithttps://git.kernel.org/stable/c/29f085345cde24566efb751f39e5d367c381c584
Frequently asked questions
-
What is CVE-2024-50195?
CVE-2024-50195 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 . It affects Linux kernel versions from 2.6.39 onward and has been patched in 4.19.323, 5.4.285, 5.10.228 and others. CVE-2024-50195 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-50195?
CVE-2024-50195 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2024-50195?
Yes — CVE-2024-50195 has been patched. Fixed versions include 4.19.323, 5.4.285, 5.10.228 and others. If you are running Linux kernel 2.6.39 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2024-50195 actively exploited?
No — CVE-2024-50195 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.