[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a1e709c5-53a6-4cfe-9958-3e26c8009414@huaweicloud.com>
Date: Mon, 16 Jun 2025 15:57:33 +0800
From: Tengda Wu <wutengda@...weicloud.com>
To: Will Deacon <will@...nel.org>
Cc: Oleg Nesterov <oleg@...hat.com>, Catalin Marinas
<catalin.marinas@....com>, "David A . Long" <dave.long@...aro.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] arm64/ptrace: Fix stack-out-of-bounds read in
regs_get_kernel_stack_nth()
On 2025/6/13 0:33, 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...
>
> Will
Sorry, I just received this email as there have been some issues
with my mailbox recently. I was about to send the v2 version with
the '*' mark, but I found out you have already fixed and applied
it to the linux-next. Thank you for your tolerance.
Tengda
Powered by blists - more mailing lists