Commit 09bda260 authored by Dave Airlie's avatar Dave Airlie Committed by Xiang Yang
Browse files

amdkfd: use calloc instead of kzalloc to avoid integer overflow

stable inclusion
from stable-v4.19.312
commit e6721ea845fcb93a764a92bd40f1afc0d6c69751
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9GE8D
CVE: CVE-2024-26817

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e6721ea845fcb93a764a92bd40f1afc0d6c69751



--------------------------------

commit 3b0daecfeac0103aba8b293df07a0cbaf8b43f29 upstream.

This uses calloc instead of doing the multiplication which might
overflow.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarXiang Yang <xiangyang3@huawei.com>
parent d4f6b526
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment