Skip to contentSkip to conversation

CVE-2022-50867: drm/msm/a6xx: Replace kcalloc() with kvzalloc()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 30, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

drm/msm/a6xx: Replace kcalloc() with kvzalloc()

In order to reduce chance of allocation failure while capturing a6xx gpu state, use kvzalloc() instead of kcalloc() in state_kcalloc().

Indirectly, this patch helps to fix leaking memory allocated for gmu_debug object.

Patchwork: https://patchwork.freedesktop.org/patch/505074/

The Linux kernel CVE team has assigned CVE-2022-50867 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.17 with commit b859f9b009bbfbc236d9b076c64c59ccb41b8737 and fixed in 6.0.7 with commit ecd63b2fbabc8fd6e5355c25fe1e186a74fa5272
	Issue introduced in 5.17 with commit b859f9b009bbfbc236d9b076c64c59ccb41b8737 and fixed in 6.1 with commit ec8f1813bf8d0737898f99a8c1c69df0cde0d7dd

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-2022-50867

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/a6xx_gpu_state.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/ecd63b2fbabc8fd6e5355c25fe1e186a74fa5272
	https://git.kernel.org/stable/c/ec8f1813bf8d0737898f99a8c1c69df0cde0d7dd