diff options
| author | Jeremy Cline <jcline@redhat.com> | 2018-08-14 01:23:13 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-22 08:44:55 +0300 |
| commit | aa89bd0eba99867a5578c3c46b4ed5c07085d7cd (patch) | |
| tree | d2a9916ac4efd79d0a68504bc138c47caddca6f6 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 445bff409b8170b1abb06d4932840a7c708292a1 (diff) | |
| download | linux-aa89bd0eba99867a5578c3c46b4ed5c07085d7cd.tar.xz | |
net: sock_diag: Fix spectre v1 gadget in __sock_diag_cmd()
[ Upstream commit 66b51b0a0341fd42ce657739bdae0561b0410a85 ]
req->sdiag_family is a user-controlled value that's used as an array
index. Sanitize it after the bounds check to avoid speculative
out-of-bounds array access.
This also protects the sock_is_registered() call, so this removes the
sanitize call there.
Fixes: e978de7a6d38 ("net: socket: Fix potential spectre v1 gadget in sock_is_registered")
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: konrad.wilk@oracle.com
Cc: jamie.iles@oracle.com
Cc: liran.alon@oracle.com
Cc: stable@vger.kernel.org
Signed-off-by: Jeremy Cline <jcline@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
