lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_PxyGj115MbVTW6yMqPYhJ6PmJVX4rpqU6k2ZqyvMVy=A@mail.gmail.com>
Date: Fri, 30 May 2025 17:08:12 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Arvind Yadav <arvind.yadav@....com>, Alex Deucher <alexander.deucher@....com>, 
	Christian König <christian.koenig@....com>, 
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	Shashank Sharma <shashank.sharma@....com>, 
	Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@....com>, Yunxiang Li <Yunxiang.Li@....com>, 
	Frank Min <Frank.Min@....com>, Kent Russell <kent.russell@....com>, amd-gfx@...ts.freedesktop.org, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu: Fix integer overflow in amdgpu_gem_add_input_fence()

Applied.  Thanks!

Alex

On Fri, May 23, 2025 at 12:34 PM Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> The "num_syncobj_handles" is a u32 value that comes from the user via the
> ioctl.  On 32bit systems the "sizeof(uint32_t) * num_syncobj_handles"
> multiplication can have an integer overflow.  Use size_mul() to fix that.
>
> Fixes: 38c67ec9aa4b ("drm/amdgpu: Add input fence to sync bo map/unmap")
> Cc: stable@...r.kernel.org
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 2c68118fe9fd..0ecc88df7208 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -58,7 +58,7 @@ amdgpu_gem_add_input_fence(struct drm_file *filp,
>                 return 0;
>
>         syncobj_handles = memdup_user(u64_to_user_ptr(syncobj_handles_array),
> -                                     sizeof(uint32_t) * num_syncobj_handles);
> +                                     size_mul(sizeof(uint32_t), num_syncobj_handles));
>         if (IS_ERR(syncobj_handles))
>                 return PTR_ERR(syncobj_handles);
>
> --
> 2.47.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ