Messages in this thread | | | Date | Fri, 4 May 2018 11:49:28 +0100 | From | Mark Rutland <> | Subject | Re: [PATCH] bpf: fix possible spectre-v1 in find_and_alloc_map() |
| |
On Fri, May 04, 2018 at 02:16:31AM +0200, Daniel Borkmann wrote: > On 05/03/2018 06:04 PM, Mark Rutland wrote: > > It's possible for userspace to control attr->map_type. Sanitize it when > > using it as an array index to prevent an out-of-bounds value being used > > under speculation. > > > > Found by smatch. > > > > Signed-off-by: Mark Rutland <mark.rutland@arm.com> > > Cc: Alexei Starovoitov <ast@kernel.org> > > Cc: Dan Carpenter <dan.carpenter@oracle.com> > > Cc: Daniel Borkmann <daniel@iogearbox.net> > > Cc: Peter Zijlstra <peterz@infradead.org> > > Cc: netdev@vger.kernel.org > > Applied to bpf tree, thanks Mark!
Cheers!
> I've also just submitted one for BPF progs > (http://patchwork.ozlabs.org/patch/908385/) which is same situation.
That looks good to me. That case doesn't show up in my smatch results so far, but I might just need a few more build iterations.
Thanks, Mark.
| |