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: <140d1f43-d603-c24e-f72e-878ad10e751c@amd.com>
Date:   Thu, 17 Mar 2022 08:09:58 +0100
From:   Christian König <christian.koenig@....com>
To:     Robert Beckett <bob.beckett@...labora.com>,
        dri-devel@...ts.freedesktop.org, Huang Rui <ray.huang@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     Daniel Vetter <daniel.vetter@...ll.ch>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/ttm: fix uninit ptr deref in range manager alloc
 error path

Am 16.03.22 um 20:50 schrieb Robert Beckett:
> ttm_range_man_alloc would try to ttm_resource_fini the res pointer
> before it is allocated.
>
> Fixes: de3688e469b0 (drm/ttm: add ttm_resource_fini v2)
>
> Signed-off-by: Robert Beckett <bob.beckett@...labora.com>

Reviewed-by: Christian König <christian.koenig@....com>

Good catch, going to push that to drm-misc-fixes.

> ---
>   drivers/gpu/drm/ttm/ttm_range_manager.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
> index 5662627bb933..1b4d8ca52f68 100644
> --- a/drivers/gpu/drm/ttm/ttm_range_manager.c
> +++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
> @@ -89,7 +89,7 @@ static int ttm_range_man_alloc(struct ttm_resource_manager *man,
>   	spin_unlock(&rman->lock);
>   
>   	if (unlikely(ret)) {
> -		ttm_resource_fini(man, *res);
> +		ttm_resource_fini(man, &node->base);
>   		kfree(node);
>   		return ret;
>   	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ