Vulnerability in Kernel: pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1001175: pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe. Affects Kernel versions >= 32e67eee670e1254ee5ab41e2f454680acb9c17c, < 62580a40c9bef3d8a90629c64dda381344b35ffd. 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 is a crucial component of the Linux operating system that provides low-level access to the computer's hardware. It manages various aspects of the system, including device drivers, memory management, and process scheduling. The pinctrl subsystem in the Kernel allows for the configuration and control of pin multiplexing and GPIOs on a system-on-chip (SoC) device. The nomadik driver within the pinctrl subsystem is responsible for handling pin control on Nomadik SoCs. However, a vulnerability has been discovered in the nomadik driver that could potentially lead to security issues.

Vulnerability Detail

The vulnerability in the nomadik driver arises from a missing of_node_put() function call in the nmk_pinctrl_probe() function. This omission can result in a reference count leak, leading to a use-after-free vulnerability. An attacker with local access to the system could exploit this vulnerability to gain elevated privileges or execute arbitrary code. The impact and attack plausibility of this vulnerability have not yet been proven.

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 manually apply the patch provided in commit 62580a40c9bef3d8a90629c64dda381344b35ffd to the affected Kernel version. The patch adds the missing of_node_put() call in the nmk_pinctrl_probe() function, addressing the vulnerability. Here is the code snippet for the patch:

--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -123,6 +123,7 @@ static int nmk_pinctrl_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	ndesc = of_find_node_by_name(NULL, "nomadik-pinctrl");
+	of_node_put(ndesc);
 
 	return 0;
 }

Applying this patch will ensure that the of_node_put() function is called, preventing the use-after-free vulnerability.

Conclusion

In conclusion, the vulnerability in the nomadik driver within the Kernel can lead to a use-after-free vulnerability, potentially allowing an attacker to gain elevated privileges or execute arbitrary code. It is crucial to update the Kernel to the latest stable version to address this issue. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The Kernel is a critical component of the Linux operating system that provides low-level access to the computer's hardware and manages various aspects of the system.

The pinctrl subsystem in the Kernel allows for the configuration and control of pin multiplexing and GPIOs on a system-on-chip (SoC) device.

The nomadik driver is a component within the pinctrl subsystem that handles pin control on Nomadik SoCs.

A use-after-free vulnerability occurs when a program continues to use a memory reference after it has been freed, potentially leading to crashes or arbitrary code execution.

To mitigate this vulnerability, it is recommended to update the Linux Kernel to version v5.17.2 or later, which includes the necessary fix.

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