lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Jun 2018 17:46:28 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...ive.com>
To:     Jim Wilson <jimw@...ive.com>
CC:     linux-riscv@...ts.infradead.org, Jim Wilson <jimw@...ive.com>,
        oleg@...hat.com, albert@...ive.com, linux-kernel@...r.kernel.org
Subject:     Re: [PATCH] RISC-V: Fix PTRACE_SETREGSET bug.

On Mon, 11 Jun 2018 14:48:22 PDT (-0700), Jim Wilson wrote:
> In riscv_gpr_set, pass regs instead of &regs to user_regset_copyin to fix
> gdb segfault.
>
> Signed-off-by: Jim Wilson <jimw@...ive.com>
> ---
>  arch/riscv/kernel/ptrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
> index ba3e80712797..9f82a7e34c64 100644
> --- a/arch/riscv/kernel/ptrace.c
> +++ b/arch/riscv/kernel/ptrace.c
> @@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target,
>  	struct pt_regs *regs;
>
>  	regs = task_pt_regs(target);
> -	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0, -1);
> +	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
>  	return ret;
>  }

Whoops, that's embarassing :).  I poked around and didn't see this anywhere 
else, so I'm not sure where we managed to obtain this particular pathology.

Thanks for the patch!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ