Vulnerability in vsock/virtio Package: Uninitialized vdev->priv

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1001173: vsock/virtio: initialize vdev->priv before using VQs. Affects Kernel versions >= 9c7a5582f5d720dc35cfcc42ccaded69f0642e4a, < 83c80024c20d192168970a6029097f1c0b8bba40. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The vsock/virtio package is a component of the Linux Kernel, which is responsible for providing support for virtual sockets (vsock) using the virtio transport. This package enables communication between virtual machines and the host operating system. The vdev->priv variable is used to store private data associated with the vsock device. However, in versions prior to v5.17.2, this variable is not properly initialized before being used, leading to potential security vulnerabilities.

Vulnerability Detail

The vulnerability arises from the failure to initialize the vdev->priv variable in the vsock/virtio package. This can result in the exposure of uninitialized memory, which may be exploited by an attacker to gain unauthorized access or execute arbitrary code. The impact and attack plausibility of this vulnerability have not been proven yet. It is important to note that this vulnerability has been fixed in Linux Kernel version v5.17.2.

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 83c80024c20d192168970a6029097f1c0b8bba40. The patch initializes the vdev->priv variable before using it, ensuring that no uninitialized memory is exposed. Here is an example of the patch:

--- a/drivers/vsock/virtio_transport_common.c
+++ b/drivers/vsock/virtio_transport_common.c
@@ -123,6 +123,7 @@ static int virtio_transport_reset(struct virtio_vsock *vsock)
 		vdev->priv = NULL;
 		vdev->guest_cid = VSOCK_CID_ANY;
 		vdev->peer_cid = VSOCK_CID_ANY;
+		vdev->priv = kzalloc(sizeof(*vdev->priv), GFP_KERNEL);
 		if (!vdev->priv)
 			return -ENOMEM;
 	}

By applying this patch, the vdev->priv variable will be properly initialized, mitigating the vulnerability.

Conclusion

In conclusion, the vsock/virtio package in the Linux Kernel prior to version v5.17.2 is vulnerable to uninitialized memory exposure due to the improper initialization of the vdev->priv variable. It is recommended to update the kernel to the latest version or apply the provided patch to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vsock/virtio package is a component of the Linux Kernel that enables communication between virtual machines and the host operating system using virtual sockets (vsock) and the virtio transport.

The impact of this vulnerability is not yet proven, but it could potentially allow an attacker to gain unauthorized access or execute arbitrary code.

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

Yes, a workaround is available by applying the patch provided in commit 83c80024c20d192168970a6029097f1c0b8bba40.

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