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] [day] [month] [year] [list]
Date:   Sat, 19 May 2018 08:58:48 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com,
        syzbot <syzbot+30d675e3ca03c1c351e7@...kaller.appspotmail.com>,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH] uprobes/x86: remove the wrong WARN_ON() in
 uprobe_init_insn()

On Fri, 18 May 2018 18:27:39 +0200
Oleg Nesterov <oleg@...hat.com> wrote:

> insn_get_length() has the side-effect of processing the entire instruction
> but only if it was decoded successfully, otherwise insn_complete() can fail
> and in this case we need to just return an error without warning.
> 

This looks good to me.

Reviewed-by: Masami Hiramatsu <mhiramat@...nel.org>

Thanks!

> Reported-by: syzbot+30d675e3ca03c1c351e7@...kaller.appspotmail.com
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
>  arch/x86/kernel/uprobes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
> index 85c7ef2..efd7ee9 100644
> --- a/arch/x86/kernel/uprobes.c
> +++ b/arch/x86/kernel/uprobes.c
> @@ -293,7 +293,7 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool
>  	insn_init(insn, auprobe->insn, sizeof(auprobe->insn), x86_64);
>  	/* has the side-effect of processing the entire instruction */
>  	insn_get_length(insn);
> -	if (WARN_ON_ONCE(!insn_complete(insn)))
> +	if (!insn_complete(insn))
>  		return -ENOEXEC;
>  
>  	if (is_prefix_bad(insn))
> -- 
> 2.5.0
> 
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ