{"id":"CVE-2023-52913","state":"PUBLISHED","title":"drm/i915: Fix potential context UAFs","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/i915: Fix potential context UAFs\n\ngem_context_register() makes the context visible to userspace, and which\npoint a separate thread can trigger the I915_GEM_CONTEXT_DESTROY ioctl.\nSo we need to ensure that nothing uses the ctx ptr after this.  And we\nneed to ensure that adding the ctx to the xarray is the *last* thing\nthat gem_context_register() does with the ctx pointer.\n\n[tursulin: Stable and fixes tags add/tidy.]\n(cherry picked from commit bed4b455cf5374e68879be56971c1da563bcd90c)","publishedAt":"2024-08-21T06:10:54.540Z","updatedAt":"2026-08-05T09:11:58.161Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eb4dedae920a07c485328af3da2202ec5184fb17","status":"affected","lessThan":"ae278887193110dfeb857ea63e243a3851fbb0bc","versionType":"git"},{"version":"eb4dedae920a07c485328af3da2202ec5184fb17","status":"affected","lessThan":"b696c627b3f56e173f7f70b8487d66da8ff22506","versionType":"git"},{"version":"eb4dedae920a07c485328af3da2202ec5184fb17","status":"affected","lessThan":"afce71ff6daa9c0f852df0727fe32c6fb107f0fa","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/i915/gem/i915_gem_context.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.15.171","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.7","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/i915/gem/i915_gem_context.c"]}],"references":["https://git.kernel.org/stable/c/ae278887193110dfeb857ea63e243a3851fbb0bc","https://git.kernel.org/stable/c/b696c627b3f56e173f7f70b8487d66da8ff22506","https://git.kernel.org/stable/c/afce71ff6daa9c0f852df0727fe32c6fb107f0fa"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52913.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52913","state":"PUBLISHED","datePublished":"2024-08-21T06:10:54.540Z","dateUpdated":"2026-08-05T09:11:58.161Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-21T06:07:11.017Z"},"containers":{"cna":{"title":"drm/i915: Fix potential context UAFs","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/i915: Fix potential context UAFs\n\ngem_context_register() makes the context visible to userspace, and which\npoint a separate thread can trigger the I915_GEM_CONTEXT_DESTROY ioctl.\nSo we need to ensure that nothing uses the ctx ptr after this.  And we\nneed to ensure that adding the ctx to the xarray is the *last* thing\nthat gem_context_register() does with the ctx pointer.\n\n[tursulin: Stable and fixes tags add/tidy.]\n(cherry picked from commit bed4b455cf5374e68879be56971c1da563bcd90c)"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eb4dedae920a07c485328af3da2202ec5184fb17","status":"affected","lessThan":"ae278887193110dfeb857ea63e243a3851fbb0bc","versionType":"git"},{"version":"eb4dedae920a07c485328af3da2202ec5184fb17","status":"affected","lessThan":"b696c627b3f56e173f7f70b8487d66da8ff22506","versionType":"git"},{"version":"eb4dedae920a07c485328af3da2202ec5184fb17","status":"affected","lessThan":"afce71ff6daa9c0f852df0727fe32c6fb107f0fa","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/i915/gem/i915_gem_context.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.15.171","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.7","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/i915/gem/i915_gem_context.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ae278887193110dfeb857ea63e243a3851fbb0bc"},{"url":"https://git.kernel.org/stable/c/b696c627b3f56e173f7f70b8487d66da8ff22506"},{"url":"https://git.kernel.org/stable/c/afce71ff6daa9c0f852df0727fe32c6fb107f0fa"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is triggered through local DRM ioctls (I915_GEM_CONTEXT_CREATE_EXT / I915_GEM_CONTEXT_DESTROY) on an i915 render node (/dev/dri/renderD*), not via network or adjacent protocols.\nAC:L - The attacker fully controls both sides of the race by issuing concurrent create and destroy ioctls on the same DRM file from multiple threads, and can retry until the post-xa_store use of ctx wins against context_close.\nPR:L - Both ioctls are marked DRM_RENDER_ALLOW and require only an open render node, which unprivileged local users routinely have on Intel GPU systems (desktop render group, ChromeOS, Android), not real root or init-namespace admin.\nUI:N - Exploitation requires no victim action; the attacker opens the render node and issues the racing ioctls themselves.\nS:U - Impact stays within the host kernel authority as a local privilege-escalation style memory-corruption bug; it does not cross VM, IOMMU, or other security boundaries.\nC:H - This is a use-after-free of struct i915_gem_context (freed via context_close -> kref_put -> kfree_rcu), which per scoring guidance enables reclaim and arbitrary kernel read primitives.\nI:H - The UAF races list_add against list_del/free on ctx client and global context lists, enabling heap corruption and write/control-flow hijack primitives consistent with High integrity impact for UAFs.\nA:H - Use-after-free of the GEM context reliably yields kernel oops/panic or list corruption crashes even when not fully exploited for code execution."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:11:58.161Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.15.171"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.1.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-52913","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:34:42.812004Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-12T17:33:12.564Z"}}]}}}