summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/pointer/git@radix-linux.su:pub
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2026-06-13 05:22:04 +0300
committerAlex Deucher <alexander.deucher@amd.com>2026-06-18 01:19:37 +0300
commit8fa5655da368d0306c03e9dc9cda8ae2a7840926 (patch)
tree42d7e34100783b353d695e54f6bbaa9c7697b013 /rust/zerocopy/src/pointer/git@radix-linux.su:pub
parentf896e86273dbbebb5eac966b4a201b5c62a02e9a (diff)
downloadlinux-8fa5655da368d0306c03e9dc9cda8ae2a7840926.tar.xz
drm/amdkfd: fix list_del corruption in kfd_criu_resume_svm
The cleanup tail of kfd_criu_resume_svm() walks svms->criu_svm_metadata_list and kfree()s each struct criu_svm_metadata without removing it from the list. The list head is left pointing at freed kmalloc-96 objects. A second AMDKFD_IOC_CRIU_OP from the same process re-enters: list_empty() reads the dangling ->next (use-after-free), the loop walks freed entries, and each is kfree()'d again (double-free). This is reachable by an unprivileged render-group user via /dev/kfd with no capabilities required. Add list_del() before the kfree() so the list is properly emptied. The list_for_each_entry_safe() iterator already caches the next pointer, so unlinking during the walk is safe. Fixes: 2a909ae71871 ("drm/amdkfd: CRIU resume shared virtual memory ranges") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 6322d278a298e2c1430b9d2697743d3a04b788b1)
Diffstat (limited to 'rust/zerocopy/src/pointer/git@radix-linux.su:pub')
0 files changed, 0 insertions, 0 deletions