[PATCH 4.16 179/279] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-06-18 Thread Greg Kroah-Hartman
4.16-stable review patch. If anyone has any objections, please let me know. -- From: Mark Rutland [ Upstream commit 9ef09e35e521bf0df5325cc9cffa726a8f5f3c1b ] It's possible for userspace to control attr->map_type. Sanitize it when using it as an array index to prevent an

[PATCH 4.16 179/279] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-06-18 Thread Greg Kroah-Hartman
4.16-stable review patch. If anyone has any objections, please let me know. -- From: Mark Rutland [ Upstream commit 9ef09e35e521bf0df5325cc9cffa726a8f5f3c1b ] It's possible for userspace to control attr->map_type. Sanitize it when using it as an array index to prevent an