Vulnerability in Kernel package: rtc: mt6397
Summary
GSD-2022-1002980: rtc: mt6397: check return value after calling platform_get_resource(). Affects Kernel versions >= fc2979118f3f5193475cb53d5df7bdaa7e358a42, < 58a729c55ce3a432eb827fdaa24c7909cd3b0a6b. 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 Kernel package is a crucial component of the Linux operating system, responsible for managing the system's core functionality. It provides essential services, including device drivers, process management, and memory management. The rtc: mt6397 vulnerability affects this package and specifically targets the mt6397 RTC driver. The RTC (Real-Time Clock) driver is responsible for managing the real-time clock hardware on MediaTek MT6397 SoCs. This vulnerability arises from a failure to check the return value after calling platform_get_resource().
Vulnerability Detail
The vulnerability in the rtc: mt6397 driver arises due to a lack of proper error handling. When platform_get_resource() is called, the return value is not checked, potentially leading to a null pointer dereference or other undefined behavior. An attacker could exploit this vulnerability to cause a denial-of-service (DoS) condition or potentially execute arbitrary code with kernel privileges. The impact and attack plausibility of this vulnerability have not been proven yet.
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 apply the patch provided in commit 58a729c55ce3a432eb827fdaa24c7909cd3b0a6b manually. The patch introduces the required error handling in the rtc: mt6397 driver. Here is an example of the code changes:
- // Existing code without error handling
+ // Updated code with error handling
+
+ struct resource *res;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ // Handle error condition
+ return -ENOMEM;
+ }
Conclusion
In conclusion, the rtc: mt6397 vulnerability in the Kernel package poses a potential security risk. It is recommended to update the Linux Kernel to the latest version to mitigate this vulnerability. Applying the provided patch or using Vulert's playground can also help address this issue. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability could range from a denial-of-service (DoS) condition to potential execution of arbitrary code with kernel privileges. However, the actual impact and attack plausibility have not been proven yet.
You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
Yes, a workaround is available. Users can manually apply the patch provided in commit 58a729c55ce3a432eb827fdaa24c7909cd3b0a6b. This patch introduces the necessary error handling in the rtc: mt6397 driver.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.17.15 or later. The fix for this vulnerability was implemented in commit 58a729c55ce3a432eb827fdaa24c7909cd3b0a6b.
You can find more information about this vulnerability in the Open Source Vulnerability database maintained by the Cloud Security Alliance. The vulnerability ID is GSD-2022-1002980.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.