Skip to contentSkip to conversation

CVE-2023-54202: drm/i915: fix race condition UAF in i915_perf_add_config_ioctl

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/i915: fix race condition UAF in i915_perf_add_config_ioctl

Userspace can guess the id value and try to race oa_config object creation with config remove, resulting in a use-after-free if we dereference the object after unlocking the metrics_lock. For that reason, unlocking the metrics_lock must be done after we are done dereferencing the object.

[tursulin: Manually added stable tag.]
(cherry picked from commit 49f6f6483b652108bcb73accd0204a464b922395)

The Linux kernel CVE team has assigned CVE-2023-54202 to this issue.

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

	Issue introduced in 4.14 with commit f89823c212246d0671cc51e69894a3df1a743aee and fixed in 5.15.108 with commit 6eeb1cba4c9dc47656ea328afa34953c28783d8c
	Issue introduced in 4.14 with commit f89823c212246d0671cc51e69894a3df1a743aee and fixed in 6.1.24 with commit 240b1502708858b5e3f10b6dc5ca3f148a322fef
	Issue introduced in 4.14 with commit f89823c212246d0671cc51e69894a3df1a743aee and fixed in 6.2.11 with commit 7eb98f5ac551863efe8be810cea1cd5411d677b1
	Issue introduced in 4.14 with commit f89823c212246d0671cc51e69894a3df1a743aee and fixed in 6.3 with commit dc30c011469165d57af9adac5baff7d767d20e5c

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-2023-54202

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/i915_perf.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/6eeb1cba4c9dc47656ea328afa34953c28783d8c
	https://git.kernel.org/stable/c/240b1502708858b5e3f10b6dc5ca3f148a322fef
	https://git.kernel.org/stable/c/7eb98f5ac551863efe8be810cea1cd5411d677b1
	https://git.kernel.org/stable/c/dc30c011469165d57af9adac5baff7d767d20e5c