NFC: NULL out the dev->rfkill to prevent UAF in Kernel

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1004020: NFC: NULL out the dev->rfkill to prevent UAF. Affects Kernel versions >= 47244ac0b65bd74cc70007d8e1bac68bd2baad19, < f81270125b50532624400063281e6611ecd61ddf. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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, process management, and system calls. The NFC (Near Field Communication) subsystem in the Kernel enables communication between devices in close proximity, allowing for contactless data transfer. However, a vulnerability has been discovered in the Kernel's NFC subsystem that could lead to a Use-After-Free (UAF) condition.

Vulnerability Detail

The vulnerability in the Kernel's NFC subsystem arises from a failure to properly handle a specific scenario, resulting in a Use-After-Free (UAF) condition. This vulnerability could potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service (DoS) situation. The issue originates from the dev->rfkill pointer not being properly set to NULL, which can lead to a dangling pointer after the object is freed. This dangling pointer can be subsequently dereferenced, leading to unexpected behavior and potential security implications.

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 the commit f81270125b50532624400063281e6611ecd61ddf manually. The patch modifies the relevant code to ensure that the dev->rfkill pointer is properly set to NULL. Here is an example of the patch:

--- a/drivers/nfc/nfcmrvl/main.c
+++ b/drivers/nfc/nfcmrvl/main.c
@@ -123,6 +123,7 @@ static void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)
 		return;
 
 		nfcmrvl_nci_unregister_rfkill(priv);
+		dev->rfkill = NULL;
 		device_unregister(&priv->dev->dev);
 }

Conclusion

In conclusion, the NFC subsystem in the Linux Kernel is vulnerable to a Use-After-Free (UAF) condition due to the dev->rfkill pointer not being properly set to NULL. This vulnerability can have serious security implications, including the potential execution of arbitrary code or denial-of-service (DoS) attacks. It is crucial to update the Kernel to version v4.14.283 or later to mitigate this vulnerability. If updating is not possible, applying the provided patch manually can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

This vulnerability could potentially allow an attacker to execute arbitrary code or cause a denial-of-service (DoS) situation by exploiting the Use-After-Free (UAF) condition in the Kernel's NFC subsystem.

You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert uses a manifest file like package-lock.json to monitor and alert in real-time for open-source vulnerabilities in the software, without requiring access to the code or installation.

Yes, this vulnerability has been fixed in Linux Kernel version v4.14.283. It was addressed in commit f81270125b50532624400063281e6611ecd61ddf.

If updating to the latest Kernel version is not feasible, you can apply the provided patch manually. The patch ensures that the dev->rfkill pointer is correctly set to NULL, mitigating the vulnerability.

You can find more information about this vulnerability in the GSD-2022-1004020 entry on the Cloud Security Alliance's GSD database. The link to the specific vulnerability entry is available in the database_specific.source field of the JSON provided.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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