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_Nwf_bDVmT3fXTHFcxwfK1qzBP2Bi3mfYdSAHD5q9G=CQ@mail.gmail.com>
Date:   Tue, 7 Jun 2022 14:33:35 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Xiaohui Zhang <xiaohuizhang@....edu.cn>
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian Koenig <christian.koenig@....com>,
        xinhui pan <Xinhui.Pan@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] drm/radeon: integer overflow in radeon_mode_dumb_create()

Applied.  Thanks!

Alex

On Tue, Jun 7, 2022 at 12:05 PM Xiaohui Zhang <xiaohuizhang@....edu.cn> wrote:
>
> Similar to the handling of amdgpu_mode_dumb_create in commit 54ef0b5461c0
> ("drm/amdgpu: integer overflow in amdgpu_mode_dumb_create()"),
> we thought a patch might be needed here as well.
>
> args->size is a u64.  arg->pitch and args->height are u32.  The
> multiplication will overflow instead of using the high 32 bits as
> intended.
>
> Signed-off-by: Xiaohui Zhang <xiaohuizhang@....edu.cn>
> ---
>  drivers/gpu/drm/radeon/radeon_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
> index 8c01a7f0e027..84843b3b3aef 100644
> --- a/drivers/gpu/drm/radeon/radeon_gem.c
> +++ b/drivers/gpu/drm/radeon/radeon_gem.c
> @@ -833,7 +833,7 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,
>
>         args->pitch = radeon_align_pitch(rdev, args->width,
>                                          DIV_ROUND_UP(args->bpp, 8), 0);
> -       args->size = args->pitch * args->height;
> +       args->size = (u64)args->pitch * args->height;
>         args->size = ALIGN(args->size, PAGE_SIZE);
>
>         r = radeon_gem_object_create(rdev, args->size, 0,
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ