diff options
| author | Matthew Auld <[email protected]> | 2024-08-28 10:43:42 +0000 |
|---|---|---|
| committer | Lucas De Marchi <[email protected]> | 2024-09-12 17:29:30 +0000 |
| commit | 83dcf232cc7919725a331359a300fb3929651b6e (patch) | |
| tree | 0a73f30db4a8f61f26ac2903854f839bf2a6b617 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
| parent | Merge v6.11-rc7 into drm-next (diff) | |
| download | kernel-83dcf232cc7919725a331359a300fb3929651b6e.tar.gz kernel-83dcf232cc7919725a331359a300fb3929651b6e.zip | |
drm/xe: prevent potential UAF in pf_provision_vf_ggtt()
The node ptr can point to an already freed ptr, if we hit the path with
an already allocated node. We later dereference that pointer with:
xe_gt_assert(gt, !xe_ggtt_node_allocated(node));
which is a potential UAF. Fix this by not stashing the ptr for node.
Also since it is likely a bad idea to leave config->ggtt_region pointing
to a stale ptr, also set that to NULL by calling
pf_release_vf_config_ggtt() instead of pf_release_ggtt().
Fixes: 34e804220f69 ("drm/xe: Make xe_ggtt_node struct independent")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 89076b5a8b4e0a01040585e156a0b014cd472fd3)
Signed-off-by: Lucas De Marchi <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
0 files changed, 0 insertions, 0 deletions
