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:   Sat, 29 Jul 2017 16:17:35 +0800
From:   Martin KaFai Lau <iamkafai@...il.com>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     davem@...emloft.net, kafai@...com, alexei.starovoitov@...il.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH net] bpf: don't indicate success when copy_from_user fails

On Fri, Jul 28, 2017 at 3:02 AM, Daniel Borkmann <daniel@...earbox.net> wrote:
> err in bpf_prog_get_info_by_fd() still holds 0 at that time from prior
> check_uarg_tail_zero() check. Explicitly return -EFAULT instead, so
> user space can be notified of buggy behavior.
Thanks for fixing it. (I am on PTO and cannot use my usual email account).

Acked-by: Martin KaFai Lau <kafai@...com>

>
> Fixes: 1e2709769086 ("bpf: Add BPF_OBJ_GET_INFO_BY_FD")
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> ---
>  kernel/bpf/syscall.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 045646d..84bb399 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -1289,7 +1289,7 @@ static int bpf_prog_get_info_by_fd(struct bpf_prog *prog,
>         info_len = min_t(u32, sizeof(info), info_len);
>
>         if (copy_from_user(&info, uinfo, info_len))
> -               return err;
> +               return -EFAULT;
>
>         info.type = prog->type;
>         info.id = prog->aux->id;
> --
> 1.9.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ