From: Greg KH <gregkh@linuxfoundation.org>
To: haixiao.yan.cn@eng.windriver.com
Cc: nathanl@linux.ibm.com, mpe@ellerman.id.au,
benh@kernel.crashing.org, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, haixiao.yan.cn@windriver.com
Subject: Re: [PATCH] powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas()
Date: Fri, 13 Dec 2024 12:14:08 +0100 [thread overview]
Message-ID: <2024121332-earplugs-monkhood-745d@gregkh> (raw)
In-Reply-To: <20241213034422.2916981-1-haixiao.yan.cn@eng.windriver.com>
On Fri, Dec 13, 2024 at 11:44:22AM +0800, haixiao.yan.cn@eng.windriver.com wrote:
> From: Nathan Lynch <nathanl@linux.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@linux.ibm.com>
> Reported-by: Breno Leitao <leitao@debian.org>
> Reviewed-by: Breno Leitao <leitao@debian.org>
> Signed-off-by: Michael Ellerman <mpe@ellerman.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@windriver.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
next prev parent reply other threads:[~2024-12-13 11:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 3:44 [PATCH] powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas() haixiao.yan.cn
2024-12-13 11:14 ` Greg KH [this message]
2024-12-13 11:15 ` Greg KH
2024-12-13 15:13 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024121332-earplugs-monkhood-745d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=benh@kernel.crashing.org \
--cc=haixiao.yan.cn@eng.windriver.com \
--cc=haixiao.yan.cn@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nathanl@linux.ibm.com \
--cc=paulus@samba.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox