[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024121332-earplugs-monkhood-745d@gregkh>
Date: Fri, 13 Dec 2024 12:14:08 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: haixiao.yan.cn@....windriver.com
Cc: nathanl@...ux.ibm.com, mpe@...erman.id.au, benh@...nel.crashing.org,
paulus@...ba.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
haixiao.yan.cn@...driver.com
Subject: Re: [PATCH] powerpc/rtas: Prevent Spectre v1 gadget construction in
sys_rtas()
On Fri, Dec 13, 2024 at 11:44:22AM +0800, haixiao.yan.cn@....windriver.com wrote:
> From: Nathan Lynch <nathanl@...ux.ibm.com>
>
> [ Upstream commit 0974d03eb479384466d828d65637814bee6b26d7 ]
>
> Smatch warns:
>
> arch/powerpc/kernel/rtas.c:1932 __do_sys_rtas() warn: potential
> spectre issue 'args.args' [r] (local cap)
>
> The 'nargs' and 'nret' locals come directly from a user-supplied
> buffer and are used as indexes into a small stack-based array and as
> inputs to copy_to_user() after they are subject to bounds checks.
>
> Use array_index_nospec() after the bounds checks to clamp these values
> for speculative execution.
>
> Signed-off-by: Nathan Lynch <nathanl@...ux.ibm.com>
> Reported-by: Breno Leitao <leitao@...ian.org>
> Reviewed-by: Breno Leitao <leitao@...ian.org>
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
> Link: https://msgid.link/20240530-sys_rtas-nargs-nret-v1-1-129acddd4d89@linux.ibm.com
> Signed-off-by: Haixiao Yan <haixiao.yan.cn@...driver.com>
> ---
> This commit is backporting 0974d03eb479 to the branch linux-5.15.y to
> solve the CVE-2024-46774.
Now deleted, please see:
https://lore.kernel.org/r/2024121322-conjuror-gap-b542@gregkh
for what you all need to do, TOGETHER, to get this fixed and so that I
can accept patches from your company in the future.
thanks,
greg k-h
Powered by blists - more mailing lists