Vulnerability in drm/virtio package: Null Pointer Dereference in virtio_gpu_array_put_free()
Summary
GSD-2022-1001334: drm/virtio: Ensure that objs is not NULL in virtio_gpu_array_put_free(). Affects Kernel versions >= 377f8331d0565e6f71ba081c894029a92d0c7e77, < abc9ad36df16e27ac1c665085157f1a082d39bac. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The drm/virtio package is a component of the Linux Kernel that provides support for the VirtIO GPU device. VirtIO is a standard interface for virtualized environments, allowing guest operating systems to communicate with virtual devices. The virtio_gpu_array_put_free() function is responsible for freeing memory associated with GPU arrays. However, a vulnerability exists in this function that allows a null pointer dereference, potentially leading to a system crash or privilege escalation.
Vulnerability Detail
The vulnerability arises from a lack of proper validation in the virtio_gpu_array_put_free() function. When called with a null pointer as the 'objs' parameter, the function attempts to dereference it, leading to a null pointer dereference. An attacker with local access to the system may exploit this vulnerability to crash the system or potentially execute arbitrary code with elevated privileges. The vulnerability was introduced in version v5.13 of the Linux Kernel and has been fixed in version v5.17.1.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.17.1 or later. This can be done by downloading the latest stable version of the Linux Kernel from the official repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) and following the installation instructions provided. Additionally, it is advisable to regularly update the kernel to ensure the latest security patches are applied.
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 avoid the null pointer dereference by ensuring that the 'objs' parameter passed to the virtio_gpu_array_put_free() function is not null. This can be achieved by adding appropriate null checks before calling the function. Here is an example code snippet:
if (objs != NULL) {
virtio_gpu_array_put_free(objs);
}
Conclusion
In conclusion, the vulnerability in the drm/virtio package allows for a null pointer dereference in the virtio_gpu_array_put_free() function. This can be exploited by an attacker with local access to the system to crash the system or potentially execute arbitrary code with elevated privileges. It is crucial to update the Linux Kernel to version v5.17.1 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can potentially lead to a system crash or privilege escalation if exploited by an attacker with local access to the system.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file and the Vulert Playground will analyze it for any open-source vulnerabilities, including this one.
Yes, the vulnerability has been fixed in version v5.17.1 of the Linux Kernel. It is recommended to update to this version or later to mitigate the vulnerability.
Yes, as a workaround, you can ensure that the 'objs' parameter passed to the virtio_gpu_array_put_free() function is not null by adding appropriate null checks in your code.
You can find more information about this vulnerability in the GSD-2022-1001334.json file available in the GSD database repository (https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1001xxx/GSD-2022-1001334.json).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.