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: <d300506c-ab82-4cc1-b750-61e54ec2ad9e@linux.intel.com>
Date:   Thu, 2 Nov 2023 11:32:43 +0000
From:   Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
To:     chentao <chentao@...inos.cn>, jani.nikula@...ux.intel.com,
        joonas.lahtinen@...ux.intel.com, rodrigo.vivi@...el.com,
        airlied@...il.com, daniel@...ll.ch, andi.shyti@...ux.intel.com,
        robdclark@...omium.org, jonathan.cavitt@...el.com,
        andrzej.hajda@...el.com, chris.p.wilson@...el.com,
        alan.previn.teres.alexis@...el.com
Cc:     intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, kunwu.chan@...mail.com
Subject: Re: [PATCH] drm/i915: Fix potential spectre vulnerability


On 02/11/2023 10:16, chentao wrote:
> Fix smatch warning:
> drivers/gpu/drm/i915/gem/i915_gem_context.c:847 set_proto_ctx_sseu()
> warn: potential spectre issue 'pc->user_engines' [r] (local cap)
> 
> Signed-off-by: chentao <chentao@...inos.cn>

I don't know if this is actually exploitable given the time deltas between the index is read from userspace and acted upon here, which is at least two ioctls apart. But I suppose no harm in fixing and for safety so we need to add:

Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)")
Cc: <stable@...r.kernel.org> # v5.15+

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index 9a9ff84c90d7..b2fdfc7ca4de 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> @@ -843,7 +843,7 @@ static int set_proto_ctx_sseu(struct drm_i915_file_private *fpriv,
>   
>   		if (idx >= pc->num_user_engines)
>   			return -EINVAL;
> -

Just please refrain from random whitespace modifications like this blank line removal. If you resend without that you can add my r-b.

Regards,

Tvrtko

> +		idx = array_index_nospec(idx, pc->num_user_engines);
>   		pe = &pc->user_engines[idx];
>   
>   		/* Only render engine supports RPCS configuration. */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ