Re: [PATCH] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-05-04 Thread Mark Rutland
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. > > > > Foun

Re: [PATCH] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-05-03 Thread Daniel Borkmann
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 > Cc: Alexei Starovoitov > Cc

Re: [PATCH] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-05-03 Thread David Miller
From: Mark Rutland Date: Thu, 3 May 2018 17:04:59 +0100 > 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 Acked-by: Davi

[PATCH] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-05-03 Thread Mark Rutland
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 Cc: Alexei Starovoitov Cc: Dan Carpenter Cc: Daniel Borkmann Cc: Peter Zijlstra Cc: