Null Return of kmalloc_array() in drm/amdkfd
Summary
GSD-2022-1000974: drm/amdkfd: Check for potential null return of kmalloc_array(). Affects Kernel versions < 0a692c625e373fef692ffbc7fc41f8a025f01cb7. 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/amdkfd package is a component of the Linux Kernel that provides support for AMD GPUs in the kernel's Direct Rendering Manager (DRM) subsystem. It allows user-space applications to access and control AMD GPUs. The kmalloc_array() function is used in the package to allocate memory for an array of objects. However, there is a vulnerability in the code that can potentially result in a null return from kmalloc_array().
Vulnerability Detail
The vulnerability in drm/amdkfd arises from the lack of proper error handling when kmalloc_array() returns null. This can lead to various issues, such as null pointer dereferences, memory corruption, and system crashes. An attacker may be able to exploit this vulnerability to execute arbitrary code or cause a denial-of-service (DoS) condition. The vulnerability has been fixed in Linux Kernel version v5.17.4 by commit 0a692c625e373fef692ffbc7fc41f8a025f01cb7.
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
There is no specific workaround mentioned for this vulnerability.
Conclusion
The vulnerability in drm/amdkfd that allows for a null return of kmalloc_array() can have serious security implications. It is crucial to update the Linux Kernel to version v5.17.4 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service (DoS) condition.
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 vulnerabilities.
Yes, the vulnerability has been fixed in Linux Kernel version v5.17.4 by commit 0a692c625e373fef692ffbc7fc41f8a025f01cb7. It is recommended to update to this version or later.
The exact exploitability of this vulnerability is not yet proven. However, in general, if an attacker can execute arbitrary code on a system, they may be able to exploit this vulnerability remotely.
This vulnerability was discovered by an automated ID intended to aid in the discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.