CVE-2021-47447: drm/msm/a3xx: fix error handling in a3xx_gpu_init()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/a3xx: fix error handling in a3xx_gpu_init()
These error paths returned 1 on failure, instead of a negative error code. This would lead to an Oops in the caller. A second problem is that the check for "if (ret != -ENODATA)" did not work because "ret" was set to 1.
The Linux kernel CVE team has assigned CVE-2021-47447 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.11 with commit 5785dd7a8ef0 and fixed in 5.14.14 with commit d59e44e7821a Issue introduced in 5.11 with commit 5785dd7a8ef0 and fixed in 5.15 with commit 3eda90199537
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2021-47447
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/msm/adreno/a3xx_gpu.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/d59e44e7821a8f2bb6f2e846b9167397a5f01608 https://git.kernel.org/stable/c/3eda901995371d390ef82d0b6462f4ea8efbcfdf