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-1002493: pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe. Affects Kernel versions >= 32e67eee670e1254ee5ab41e2f454680acb9c17c, < 59250d547542f1c7765a78dc97ddfe5e6b0d2ab0. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Kernel is a crucial component of the Linux operating system that acts as a bridge between the hardware and software layers. It provides essential services and functions, including device drivers, memory management, and process scheduling. The pinctrl subsystem within the Kernel allows for the configuration and control of pin multiplexing on various hardware platforms. The nomadik driver is responsible for managing pin control on Nomadik platforms. However, a vulnerability has been identified in the nomadik driver, which can lead to potential 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 may be able to exploit this vulnerability to gain elevated privileges or execute arbitrary code. 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 temporary workaround, users can manually apply the patch provided in commit 59250d547542f1c7765a78dc97ddfe5e6b0d2ab0. Here is the code snippet for the patch:

diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index 3a9c3f3..d5e2f5a 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -116,6 +116,7 @@ static int nmk_pinctrl_probe(struct platform_device *pdev)
 	return PTR_ERR(nmk_pinctrl->pctl_dev);
 
 err_free_irq:
+	of_node_put(np);
 	irq_dispose_mapping(nmk_pinctrl->irq);
 err_free_mem:
 	kfree(nmk_pinctrl);

Conclusion

In conclusion, the nomadik driver in the Kernel is vulnerable to a use-after-free issue due to a missing of_node_put() function call. This vulnerability can potentially be exploited by an attacker with local access to the system. It is crucial to update the Kernel to version v4.9.311 or later to mitigate this vulnerability. Alternatively, users can apply the provided patch as a temporary workaround. For further assistance or support in 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 acts as a bridge between the hardware and software layers. It provides essential services and functions, including device drivers, memory management, and process scheduling.

The pinctrl subsystem within the Kernel allows for the configuration and control of pin multiplexing on various hardware platforms. It enables developers to manage the functionality of pins, such as GPIO, I2C, SPI, and more.

The nomadik driver is responsible for managing pin control on Nomadik platforms. It provides the necessary functionality to configure and control pin multiplexing on these specific hardware platforms.

A use-after-free vulnerability occurs when a program continues to use a memory reference after it has been freed. This can lead to various security issues, including crashes, privilege escalation, or arbitrary code execution.

To update the Linux Kernel, you can follow the official documentation provided by your Linux distribution. Typically, it involves using package managers or manually compiling and installing the latest Kernel version.

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