drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails
Calling a6xx_destroy() before adreno_gpu_init() leads to a null pointer dereference on:
msm_gpu_cleanup() : platform_set_drvdata(gpu->pdev, NULL);
as gpu->pdev is only assigned in:
a6xx_gpu_init() |_ adreno_gpu_init |_ msm_gpu_init()
Instead of relying on handwavy null checks down the cleanup chain, explicitly de-allocate the LLC data and free a6xx_gpu instead.
Patchwork: https://patchwork.freedesktop.org/patch/588919/
From the CVE record · Linux
The Linux kernel drm/msm/a6xx driver can dereference a null pointer during cleanup if speedbin setting fails before GPU initialization completes. The input does not specify whether an attacker can trigger this condition or whether access or user interaction is required.
Engineers running the Linux kernel with the drm/msm/a6xx driver should check their kernel versions; affected versions are not specified.