drm/amdkfd: clamp v9 CRIU control stack checkpoint copy to BO size
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.1147.1.67.2In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: clamp v9 CRIU control stack checkpoint copy to BO size
CRIU checkpoint copies the MQD control stack using cp_hqd_cntl_stack_size from hardware without bounding it to the allocated BO region. If the HW field is larger than the queue's control stack allocation, memcpy reads past the BO into adjacent GTT memory and can leak kernel data to userspace.
Store the page-aligned control stack BO size in mqd_manager and clamp checkpoint copies and reported checkpoint sizes to min(cp_hqd_cntl_stack_size, mm->ctl_stack_size). Apply the same bound for multi-XCC v9.4.3 checkpoint layout.
(cherry picked from commit 6c2abd0ec09e86c6323010673766f76050e28aa3)
From the CVE record · Linux
The Linux kernel’s drm/amdkfd CRIU checkpoint code can copy a control stack beyond its allocated buffer when a hardware-reported size is too large. A local user triggering a checkpoint could receive adjacent kernel data in userspace.
Engineers running Linux kernels with drm/amdkfd should check their kernel’s status for this vulnerability; affected versions were not specified.