Vulnerability in Kernel package: rtc: mt6397

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback