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] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd44e6e66db23505c0275b14805e711e3a75b4d1.camel@imgtec.com>
Date:   Mon, 11 Dec 2023 10:12:30 +0000
From:   Donald Robson <Donald.Robson@...tec.com>
To:     Frank Binns <Frank.Binns@...tec.com>,
        "knaerzche@...il.com" <knaerzche@...il.com>,
        Matt Coster <Matt.Coster@...tec.com>,
        "maarten.lankhorst@...ux.intel.com" 
        <maarten.lankhorst@...ux.intel.com>,
        "mripard@...nel.org" <mripard@...nel.org>,
        "tzimmermann@...e.de" <tzimmermann@...e.de>
CC:     "daniel@...ll.ch" <daniel@...ll.ch>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "airlied@...il.com" <airlied@...il.com>,
        Sarah Walker <Sarah.Walker@...tec.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/imagination: vm: Fix heap lookup condition

Thanks Alex!

Reviewed-by: Donald Robson <donald.robson@...tec.com>

On Fri, 2023-12-08 at 18:08 +0100, Alex Bee wrote:
> *** CAUTION: This email originates from a source not known to Imagination Technologies. Think before you click a link or open an attachment ***
> 
> When conditionally checking for heap existence of a certian address in
> pvr_vm_bind_op_map_init the condition whether the map request comes from a
> user is incorrect: The context must not be the kernel-context to be a
> user(space) context and should be looked up in pvr_heaps.
> 
> That makes addresses coming from userspace not being verfied against the
> defined ranges and prevents firmware loading for meta cores.
> 
> Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
> Signed-off-by: Alex Bee <knaerzche@...il.com>
> ---
>  drivers/gpu/drm/imagination/pvr_vm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c
> index f42345fbe4bf..82690cee978c 100644
> --- a/drivers/gpu/drm/imagination/pvr_vm.c
> +++ b/drivers/gpu/drm/imagination/pvr_vm.c
> @@ -225,7 +225,7 @@ pvr_vm_bind_op_map_init(struct pvr_vm_bind_op *bind_op,
>  			u64 device_addr, u64 size)
>  {
>  	struct drm_gem_object *obj = gem_from_pvr_gem(pvr_obj);
> -	const bool is_user = vm_ctx == vm_ctx->pvr_dev->kernel_vm_ctx;
> +	const bool is_user = vm_ctx != vm_ctx->pvr_dev->kernel_vm_ctx;
>  	const u64 pvr_obj_size = pvr_gem_object_size(pvr_obj);
>  	struct sg_table *sgt;
>  	u64 offset_plus_size;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ