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:	Thu, 12 Mar 2015 09:53:59 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Daniel Borkmann <daniel@...earbox.net>, davem@...emloft.net
CC:	challa@...ronetworks.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ebpf: verifier: check that call reg with ARG_ANYTHING
 is initialized

On 3/12/15 9:21 AM, Daniel Borkmann wrote:
> I noticed that a helper function with argument type ARG_ANYTHING does
> not need to have an initialized value (register).
>
> This can worst case lead to unintented stack memory leakage in future
> helper functions if they are not carefully designed, or unintended
> application behaviour in case the application developer was not careful
> enough to match a correct helper function signature in the API.
>
> The underlying issue is that ARG_ANYTHING should actually be split
> into two different semantics:
>
>    1) ARG_DONTCARE for function arguments that the helper function
>       does not care about (in other words: the default for unused
>       function arguments), and
>
>    2) ARG_ANYTHING that is an argument actually being used by a
>       helper function and *guaranteed* to be an initialized register.
>
> The current risk is low: ARG_ANYTHING is only used for the 'flags'
> argument (r4) in bpf_map_update_elem() that internally does strict
> checking.
>
> Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)")
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> ---
>   I'm fine with this going to net-next, but it also applies to net.

Acked-by: Alexei Starovoitov <ast@...mgrid.com>

nice catch. you understood verifier so well :)
Also agree that net-next is enough.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ