Potential overflow in timeout_to_jiffies() in drm/msm package
Summary
GSD-2021-1002080: drm/msm: Avoid potential overflow in timeout_to_jiffies(). Affects Kernel versions >= 6cedb8b377bba6520508399b74754b9a0ca06edf, < 697ee8c3d3fadfeb3ac270a3a3d2ce42b2c07557. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The drm/msm package is a component of the Linux Kernel that provides support for graphics and display functionality on Qualcomm Snapdragon SoCs. It includes drivers for the Adreno GPUs found in these SoCs. The timeout_to_jiffies() function is used to convert a timeout value in milliseconds to the corresponding jiffies value, which is the unit of time used by the kernel for scheduling and timing purposes.
Vulnerability Detail
The potential overflow vulnerability in timeout_to_jiffies() arises from the improper handling of large timeout values. If a timeout value greater than the maximum representable value for jiffies is passed to the function, an overflow can occur, resulting in a potentially incorrect jiffies value. This can lead to unexpected behavior or system instability. The vulnerability was introduced in version v5.6 of the Linux Kernel and has been fixed in version v5.14.14.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can avoid passing large timeout values to functions that rely on timeout_to_jiffies(). Instead, they can ensure that the timeout values are within the valid range for jiffies. This can be done by either reducing the timeout values or by using a different mechanism for specifying timeouts.
Conclusion
The potential overflow vulnerability in timeout_to_jiffies() in the drm/msm package of the Linux Kernel can lead to unexpected behavior or system instability. It is recommended to update the kernel to version v5.14.14 or later to fix this vulnerability. Users can also implement the provided workaround until the update is applied. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The potential overflow in timeout_to_jiffies() can lead to unexpected behavior or system instability. It may cause timeouts to be calculated incorrectly, resulting in delays or premature completion of operations that rely on accurate timing.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any known vulnerabilities, including this one.
At the time of this report, there is no known exploit for this vulnerability. However, it is important to apply the fix as soon as possible to mitigate any potential risks.
This vulnerability does not have a direct remote exploitation vector. However, if an attacker can execute arbitrary code on the affected system, they may be able to trigger the vulnerability and potentially cause system instability or disrupt normal operations.
If updating the kernel is not immediately feasible, you can implement the provided workaround to reduce the risk of encountering the vulnerability. However, it is still recommended to update to the fixed version of the kernel as soon as possible.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.