{"id":"CVE-2022-49963","state":"PUBLISHED","title":"drm/i915/ttm: fix CCS handling","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/i915/ttm: fix CCS handling\n\nCrucible + recent Mesa seems to sometimes hit:\n\nGEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER)\n\nAnd it looks like we can also trigger this with gem_lmem_swapping, if we\nmodify the test to use slightly larger object sizes.\n\nLooking closer it looks like we have the following issues in\nmigrate_copy():\n\n  - We are using plain integer in various places, which we can easily\n    overflow with a large object.\n\n  - We pass the entire object size (when the src is lmem) into\n    emit_pte() and then try to copy it, which doesn't work, since we\n    only have a few fixed sized windows in which to map the pages and\n    perform the copy. With an object > 8M we therefore aren't properly\n    copying the pages. And then with an object > 64M we trigger the\n    GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER).\n\nSo it looks like our copy handling for any object > 8M (which is our\nCHUNK_SZ) is currently broken on DG2.\n\nTestcase: igt@gem_lmem_swapping\n(cherry picked from commit 8676145eb2f53a9940ff70910caf0125bd8a4bc2)","publishedAt":"2025-06-18T11:00:24.021Z","updatedAt":"2026-10-15T21:31:17.741Z","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":"da0595ae91da837929a00470ab40546090e5b9ae","status":"affected","lessThan":"97434cb55bd884bd268626ec41489f79b261b2d4","versionType":"git"},{"version":"da0595ae91da837929a00470ab40546090e5b9ae","status":"affected","lessThan":"8d905254162965c8e6be697d82c7dbf5d08f574d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/i915/gt/intel_migrate.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"5.19.8","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","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/gt/intel_migrate.c"]}],"references":["https://git.kernel.org/stable/c/97434cb55bd884bd268626ec41489f79b261b2d4","https://git.kernel.org/stable/c/8d905254162965c8e6be697d82c7dbf5d08f574d"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49963.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49963","state":"PUBLISHED","datePublished":"2025-06-18T11:00:24.021Z","dateUpdated":"2026-10-15T21:31:17.741Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.384Z"},"containers":{"cna":{"title":"drm/i915/ttm: fix CCS handling","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/i915/ttm: fix CCS handling\n\nCrucible + recent Mesa seems to sometimes hit:\n\nGEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER)\n\nAnd it looks like we can also trigger this with gem_lmem_swapping, if we\nmodify the test to use slightly larger object sizes.\n\nLooking closer it looks like we have the following issues in\nmigrate_copy():\n\n  - We are using plain integer in various places, which we can easily\n    overflow with a large object.\n\n  - We pass the entire object size (when the src is lmem) into\n    emit_pte() and then try to copy it, which doesn't work, since we\n    only have a few fixed sized windows in which to map the pages and\n    perform the copy. With an object > 8M we therefore aren't properly\n    copying the pages. And then with an object > 64M we trigger the\n    GEM_BUG_ON(num_ccs_blks > NUM_CCS_BLKS_PER_XFER).\n\nSo it looks like our copy handling for any object > 8M (which is our\nCHUNK_SZ) is currently broken on DG2.\n\nTestcase: igt@gem_lmem_swapping\n(cherry picked from commit 8676145eb2f53a9940ff70910caf0125bd8a4bc2)"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"da0595ae91da837929a00470ab40546090e5b9ae","status":"affected","lessThan":"97434cb55bd884bd268626ec41489f79b261b2d4","versionType":"git"},{"version":"da0595ae91da837929a00470ab40546090e5b9ae","status":"affected","lessThan":"8d905254162965c8e6be697d82c7dbf5d08f574d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/i915/gt/intel_migrate.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"5.19.8","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","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/gt/intel_migrate.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/97434cb55bd884bd268626ec41489f79b261b2d4"},{"url":"https://git.kernel.org/stable/c/8d905254162965c8e6be697d82c7dbf5d08f574d"}],"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 reached via i915 GEM ioctls on a local DRM render node (GEM_CREATE_EXT of lmem-only objects plus TTM eviction into intel_context_migrate_copy), not via network packet processing.\nAC:L - An attacker can reliably create Flat-CCS lmem objects larger than CHUNK_SZ (8M) and force lmem pressure to trigger eviction; the failure is deterministic once migrate_copy runs on such an object, as shown by gem_lmem_swapping and Mesa/Crucible hits.\nPR:L - Triggering requires only unprivileged access to /dev/dri/renderD* (DRM_RENDER_ALLOW for GEM_CREATE_EXT and related ioctls), not root or init-namespace capabilities.\nUI:N - The attacker opens the render node and allocates/evicts their own objects; no separate victim action is required.\nS:U - Impact stays within the host kernel/GPU driver authority (migration PPGTT corruption and GEM buffer corruption), not a guest-to-host or IOMMU-boundary escape.\nC:H - Oversized blits past the fixed 8M windows can read the migrate VM’s self-mapped PTE region and adjacent mappings into attacker-readable smem backup pages, and can mishandle CCS/metadata during eviction of other clients’ buffers under memory pressure.\nI:H - The same oversized XY copy can write past the destination window into the migration page tables and leave incomplete/incorrect main and CCS copies, corrupting GPU PTEs and buffer contents with no CCS-capable CPU memcpy fallback.\nA:H - Out-of-bounds GTT access and invalid CCS transfer sizing can hang or wedge the GPU (and trip GEM_BUG_ON on debug builds), denying GPU service to the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:56:54.694Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"5.19.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-49963","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:29:52.414458Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:31:17.741Z"}}]}}}