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:   Wed, 27 Nov 2019 01:07:55 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Alexei Starovoitov <ast@...nel.org>, davem@...emloft.net
Cc:     dan.carpenter@...cle.com, netdev@...r.kernel.org,
        bpf@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH bpf-next] bpf: fix static checker warning

On 11/27/19 12:01 AM, Alexei Starovoitov wrote:
> kernel/bpf/btf.c:4023 btf_distill_func_proto()
>          error: potentially dereferencing uninitialized 't'.
> 
> kernel/bpf/btf.c
>    4012          nargs = btf_type_vlen(func);
>    4013          if (nargs >= MAX_BPF_FUNC_ARGS) {
>    4014                  bpf_log(log,
>    4015                          "The function %s has %d arguments. Too many.\n",
>    4016                          tname, nargs);
>    4017                  return -EINVAL;
>    4018          }
>    4019          ret = __get_type_size(btf, func->type, &t);
>                                                         ^^
> t isn't initialized for the first -EINVAL return
> 
> This is unlikely path, since BTF should have been validated at this point.
> Fix it by returning 'void' BTF.
> 
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Alexei Starovoitov <ast@...nel.org>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ