From: Heiko Carstens <hca@linux.ibm.com>
To: Will Deacon <will@kernel.org>
Cc: Tengda Wu <wutengda@huaweicloud.com>,
Oleg Nesterov <oleg@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
"David A . Long" <dave.long@linaro.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth()
Date: Fri, 13 Jun 2025 17:04:35 +0200 [thread overview]
Message-ID: <20250613150435.26153B5d-hca@linux.ibm.com> (raw)
In-Reply-To: <20250612163331.GA13384@willie-the-truck>
On Thu, Jun 12, 2025 at 05:33:32PM +0100, Will Deacon wrote:
> On Wed, Jun 04, 2025 at 12:55:33AM +0000, Tengda Wu wrote:
> > diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
> > index f79b0d5f71ac..fe3f7e554d14 100644
> > --- a/arch/arm64/kernel/ptrace.c
> > +++ b/arch/arm64/kernel/ptrace.c
> > @@ -141,7 +141,7 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
> >
> > addr += n;
> > if (regs_within_kernel_stack(regs, (unsigned long)addr))
> > - return *addr;
> > + return READ_ONCE_NOCHECK(addr);
>
> I think this should be '*addr', but that makes me wonder wtf s390 is
> doing...
That's obviously a brown paper bag bug in our code... will be fixed.
next prev parent reply other threads:[~2025-06-13 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 0:55 [PATCH -next] arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() Tengda Wu
2025-06-11 1:22 ` Tengda Wu
2025-06-12 16:33 ` Will Deacon
2025-06-13 15:04 ` Heiko Carstens [this message]
2025-06-16 7:57 ` Tengda Wu
2025-06-12 17:27 ` Will Deacon
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=20250613150435.26153B5d-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=dave.long@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=oleg@redhat.com \
--cc=will@kernel.org \
--cc=wutengda@huaweicloud.com \
/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;
as well as URLs for NNTP newsgroup(s).