]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
accel/qaic: Fix integer overflow in qaic_validate_req()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 7 Mar 2025 08:41:48 +0000 (11:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Mar 2025 21:03:29 +0000 (22:03 +0100)
commitb362fc904d264a88b4af20baae9e82491c285e9c
tree334336264528b78fc7892e896e18d440ef5a673d
parenta99f1254b11eaadd0794b74a8178bad92ab01cae
accel/qaic: Fix integer overflow in qaic_validate_req()

commit 67d15c7aa0864dfd82325c7e7e7d8548b5224c7b upstream.

These are u64 variables that come from the user via
qaic_attach_slice_bo_ioctl().  Use check_add_overflow() to ensure that
the math doesn't have an integer wrapping bug.

Cc: stable@vger.kernel.org
Fixes: ff13be830333 ("accel/qaic: Add datapath")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/176388fa-40fe-4cb4-9aeb-2c91c22130bd@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/accel/qaic/qaic_data.c