]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2026 15:16:31 +0000 (17:16 +0200)
commit6abd3a4417cb73a7d0db7e25bf11fae1074bdba3
treecbe4ecf03a5d899b8f47c3bf4001719319d219e7
parent5f30028f2853a2a35553d99909f0f5bcb7f87120
drm/amdkfd: validate SVM ioctl nattr against buffer size

commit 045e0ff208f0838a246c10204105126611b267a1 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h