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: <dc2fb87e-67f0-4fa9-c920-515a6609a04d@codeaurora.org>
Date:   Fri, 5 Feb 2021 12:11:10 +0530
From:   Akhil P Oommen <akhilpo@...eaurora.org>
To:     Rob Clark <robdclark@...il.com>, dri-devel@...ts.freedesktop.org
Cc:     Rob Clark <robdclark@...omium.org>,
        "open list:DRM DRIVER FOR MSM ADRENO GPU" 
        <freedreno@...ts.freedesktop.org>, David Airlie <airlied@...ux.ie>,
        "open list:DRM DRIVER FOR MSM ADRENO GPU" 
        <linux-arm-msm@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "Kristian H. Kristensen" <hoegsberg@...gle.com>,
        Sean Paul <sean@...rly.run>,
        Emil Velikov <emil.velikov@...labora.com>
Subject: Re: [PATCH] drm/msm: Fix legacy relocs path

On 2/5/2021 4:26 AM, Rob Clark wrote:
> From: Rob Clark <robdclark@...omium.org>
> 
> In moving code around, we ended up using the same pointer to
> copy_from_user() the relocs tables as we used for the cmd table
> entry, which is clearly not right.  This went unnoticed because
> modern mesa on non-ancent kernels does not actually use relocs.
> But this broke ancient mesa on modern kernels.
> 
> Reported-by: Emil Velikov <emil.velikov@...labora.com>
> Fixes: 20224d715a88 ("drm/msm/submit: Move copy_from_user ahead of locking bos")
> Signed-off-by: Rob Clark <robdclark@...omium.org>
> ---
>   drivers/gpu/drm/msm/msm_gem_submit.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
> index d04c349d8112..5480852bdeda 100644
> --- a/drivers/gpu/drm/msm/msm_gem_submit.c
> +++ b/drivers/gpu/drm/msm/msm_gem_submit.c
> @@ -198,6 +198,8 @@ static int submit_lookup_cmds(struct msm_gem_submit *submit,
>   		submit->cmd[i].idx  = submit_cmd.submit_idx;
>   		submit->cmd[i].nr_relocs = submit_cmd.nr_relocs;
>   
> +		userptr = u64_to_user_ptr(submit_cmd.relocs);
> +
>   		sz = array_size(submit_cmd.nr_relocs,
>   				sizeof(struct drm_msm_gem_submit_reloc));
>   		/* check for overflow: */
> 

Reviewed-by: Akhil P Oommen <akhilpo@...eaurora.org>

-Akhil.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ