Skip to contentSkip to conversation

CVE-2022-49635: drm/i915/selftests: fix subtraction overflow bug

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

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

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

drm/i915/selftests: fix subtraction overflow bug

On some machines hole_end can be small enough to cause subtraction overflow. On the other side (addr + 2 * min_alignment) can overflow in case of mock tests. This patch should handle both cases.

(cherry picked from commit ab3edc679c552a466e4bf0b11af3666008bd65a2)

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

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

	Issue introduced in 4.12 with commit e1c5f754067b594de58d387aa5873dec83b6c9fd and fixed in 5.18.13 with commit e8997d2d6b8d764e12489f1af2a1ce1d7384ca2a
	Issue introduced in 4.12 with commit e1c5f754067b594de58d387aa5873dec83b6c9fd and fixed in 5.19 with commit 333991c4e66b3d4b5613315f18016da80344f659

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-49635

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/i915/selftests/i915_gem_gtt.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/e8997d2d6b8d764e12489f1af2a1ce1d7384ca2a
	https://git.kernel.org/stable/c/333991c4e66b3d4b5613315f18016da80344f659