drm/amdkfd: validate SVM ioctl nattr against buffer size
authorAlysa Liu <Alysa.Liu@amd.com>
Tue, 21 Apr 2026 14:18:28 +0000 (10:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 Apr 2026 15:11:29 +0000 (11:11 -0400)
commit045e0ff208f0838a246c10204105126611b267a1
treeff0beb9512263e666602a3b4030f1cf5b7ee4311
parent47776ac1e3f4a2aefcf7fe7c7e4a11151b676222
drm/amdkfd: validate SVM ioctl nattr against buffer size

Validate nattr field against the buffer size, preventing
out-of-bounds buffer access via user-controlled attribute count.

Reviewed-by: Amir Shetaia <Amir.Shetaia@amd.com>
Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5eca8bfdfa456c3304ca77523718fe24254c172f)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h