{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99874","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.440Z","datePublished":"2026-11-30T13:17:51.900Z","dateUpdated":"2026-12-01T05:43:59.059Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:43:59.059Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Validate the control stack of a restored queue\n\nkfd_criu_restore_queue() takes the control stack size from the\ncheckpoint image without the topology check create-queue does in\nkfd_queue_acquire_buffers(), which restore stopped calling in\ncommit 1cafa8b29e02 (\"drm/amdkfd: Don't acquire buffers\nduring CRIU queue restore.\"). An image size of 0x300000 is accepted and\nsizes the MQD allocation, and 0xFFFFFFFF trips a page allocator warning\nin kmalloc().\n\nrestore_mqd() also keeps the image's cp_hqd_cntl_stack_size,\ncp_hqd_cntl_stack_offset and cp_hqd_wg_state_offset. With offset > size\nor wave state offset < size, get_wave_state() returns wrapped sizes.\n\nTake the per-XCC size from topology, 0 for queues without a control\nstack, and reject larger images. In restore_mqd(), set the size to it\nand bound both offsets as init_mqd() does.\n\n(cherry picked from commit 92249023caee17bfc6f29c71d6aaa5f2298cf507)"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Bad data enters through the AMDKFD_IOC_CRIU_OP KFD_CRIU_OP_RESTORE ioctl on /dev/kfd (kfd_ioctl_criu -> criu_restore -> kfd_criu_restore_queue -> pqm_create_queue -> restore_mqd), where q_data->ctl_stack_size and the MQD's cp_hqd_cntl_stack_size/offset come from the caller's priv_data blob. No network protocol carries them.\nAC:L - The caller supplies both the BO-sizing q_data->ctl_stack_size (e.g. 0, a one-page v9 MQD BO) and an independent large cp_hqd_cntl_stack_size in one restore blob. Then KFD_CRIU_OP_PROCESS_INFO and CHECKPOINT on the still-inactive queue make checkpoint_mqd() read past the BO deterministically, with no race and without running the GPU.\nPR:L - kfd_ioctl() admits CRIU_OP only with capable(CAP_CHECKPOINT_RESTORE) or capable(CAP_SYS_ADMIN) in the init namespace, so user namespaces don't reach it. CAP_CHECKPOINT_RESTORE is the narrow capability meant for delegation to non-root CRIU tooling, which matches the PR:L given to the sibling CRIU-restore CVEs.\nUI:N - The attacker restores, pauses and checkpoints its own KFD process with its own /dev/kfd and render-node fds; nobody else has to mount, open or approve anything.\nS:U - The over-read and the oops stay in host kernel memory (the vmap'd/kmap'd MQD BO and its neighbours) within the same kernel authority. No VM, IOMMU or sandbox boundary is crossed.\nC:H - checkpoint_mqd() clamps only to topology mm->ctl_stack_size, not the image-sized BO. On arm64/ppc64 drm_arch_can_wc_memory() masks USWC, so the one-page BO is kmap'd from the direct map and the next physical page is copied to the user's checkpoint buffer. In trees before CVE-2026-97496 (all 6.1.y), v9 get_wave_state() copy_to_user()s the unclamped cp_hqd_cntl_stack_size.\nI:N - CPU-side restore_mqd() copies the image control stack into a BO that allocate_mqd() sized from the same qp->ctl_stack_size, so nothing is written out of bounds. The wrapped get_wave_state() header sizes only go into the caller's own buffer, and any GPU CP overrun from the bogus MQD fields is firmware behaviour that can't be shown from the kernel code.\nA:H - On x86 the USWC MQD BO is vmap'd with a guard page, so checkpoint_mqd()'s memcpy from mqd+4K past a one-page BO faults and oopses with dqm_lock held, wedging KFD queue management. A ctl_stack_size of 0xFFFFFFFF also hits the page allocator's WARN in kmalloc(), which panics under panic_on_warn."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c","drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c"],"versions":[{"version":"626f7b3190b4c07917f0262162cb7fef7272c34d","lessThan":"a3e9af053b5e881025eb9358946a51ab4c61d22a","status":"affected","versionType":"git"},{"version":"626f7b3190b4c07917f0262162cb7fef7272c34d","lessThan":"250e92ce55aa3c37ab0a7a6b8aad688e7bb8b25e","status":"affected","versionType":"git"},{"version":"626f7b3190b4c07917f0262162cb7fef7272c34d","lessThan":"9cfce679d88f6f83d15e99fdba0d5769120f0faf","status":"affected","versionType":"git"},{"version":"626f7b3190b4c07917f0262162cb7fef7272c34d","lessThan":"90d91a192751cd9a7d9d2286299bc72ec1c28179","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c","drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c","drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c"],"versions":[{"version":"5.18","status":"affected"},{"version":"0","lessThan":"5.18","status":"unaffected","versionType":"semver"},{"version":"6.12.119","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/a3e9af053b5e881025eb9358946a51ab4c61d22a"},{"url":"https://git.kernel.org/stable/c/250e92ce55aa3c37ab0a7a6b8aad688e7bb8b25e"},{"url":"https://git.kernel.org/stable/c/9cfce679d88f6f83d15e99fdba0d5769120f0faf"},{"url":"https://git.kernel.org/stable/c/90d91a192751cd9a7d9d2286299bc72ec1c28179"}],"title":"drm/amdkfd: Validate the control stack of a restored queue","x_generator":{"engine":"bippy-1.2.0"}}}}