Re: Fwd: [PATCH] powerpc/ptrace: Fix buffer overflow when handling PTRACE_PEEKUSER and PTRACE_POKEUSER

2023-09-27 Thread Ariel Miculas
On Wed, Sep 27, 2023 at 7:01 PM Christophe Leroy wrote: > > > > Le 27/09/2023 à 17:27, Ariel Miculas a écrit : > > I've forwarded this old email thread for visibility and discussion's > > sake around my recent blog post [1][2] > > Ah, right, it's been superseded by

Re: Fwd: [PATCH] powerpc/ptrace: Fix buffer overflow when handling PTRACE_PEEKUSER and PTRACE_POKEUSER

2023-09-27 Thread Ariel Miculas
I've forwarded this old email thread for visibility and discussion's sake around my recent blog post [1][2] Regards, Ariel [1] https://news.ycombinator.com/item?id=37671991 [2]

Fwd: [PATCH] powerpc/ptrace: Fix buffer overflow when handling PTRACE_PEEKUSER and PTRACE_POKEUSER

2023-09-27 Thread Ariel Miculas
-- Forwarded message - From: Ariel Miculas Date: Thu, Jun 9, 2022 at 1:31 PM Subject: Fwd: [PATCH] powerpc/ptrace: Fix buffer overflow when handling PTRACE_PEEKUSER and PTRACE_POKEUSER To: Forwarded Conversation Subject: [PATCH] powerpc/ptrace: Fix buffer overflow when

[PATCH] powerpc/32: Fix FPR index validation and fpscr access

2022-06-10 Thread Ariel Miculas
s of fpscr into high part and low part. Signed-off-by: Ariel Miculas --- arch/powerpc/kernel/ptrace/ptrace-fpu.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-fpu.c b/arch/powerpc/kernel/ptrace/ptrace-f

[PATCH] powerpc/32: Fix FPR index validation and fpscr access

2022-06-10 Thread Ariel Miculas
From: Ariel Miculas On PPC32, there are two indexes used for each FPR. The last two indexes into the imaginary address space "USER area" are used to access fpscr instead of the FPR registers. Fix the validation condition so that the access of the FPR array doesn't overflow into fp

[PATCH] powerpc/32: Fix FPR index validation and fpscr access

2022-06-10 Thread Ariel Miculas
s of fpscr into high part and low part. Signed-off-by: Ariel Miculas --- arch/powerpc/kernel/ptrace/ptrace-fpu.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-fpu.c b/arch/powerpc/kernel/ptrace/ptrace-f

[PATCH] powerpc/32: Fix FPR index validation and fpscr access

2022-06-10 Thread Ariel Miculas
s of fpscr into high part and low part. Signed-off-by: Ariel Miculas --- arch/powerpc/kernel/ptrace/ptrace-fpu.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-fpu.c b/arch/powerpc/kernel/ptrace/ptrace-f

[PATCH] powerpc/32: Fix FPR index validation and fpscr access

2022-06-10 Thread Ariel Miculas
s of fpscr into high part and low part. Signed-off-by: Ariel Miculas --- arch/powerpc/kernel/ptrace/ptrace-fpu.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-fpu.c b/arch/powerpc/kernel/ptrace/ptrace-f

[PATCH] powerpc/32: Fix FPR index validation and fpscr access

2022-06-10 Thread Ariel Miculas
s of fpscr into high part and low part. Signed-off-by: Ariel Miculas --- arch/powerpc/kernel/ptrace/ptrace-fpu.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-fpu.c b/arch/powerpc/kernel/ptrace/ptrace-f

[PATCH] powerpc/ptrace: Fix buffer overflow when handling PTRACE_PEEKUSER and PTRACE_POKEUSER

2022-06-10 Thread Ariel Miculas
ok to assume that TS_FPRWIDTH is 1 because CONFIG_VSX is PPC64 specific. TS_FPROFFSET can be safely ignored, thus the assumption that fpr is an array of 32 elements of type u64 holds true. Solution taken from arch/powerpc/kernel/ptrace32.c Signed-off-by: Ariel Miculas --- arch/powerpc/kernel/ptr