summaryrefslogtreecommitdiff
path: root/kernel/bpf/stackmap.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-03-08 18:39:24 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-11 16:21:34 +0100
commit93f3aff1d910c5363a42c2c18dec9939cb0d58c2 (patch)
tree23ad162a5b5474d79e675955d9ea4132d9ab2568 /kernel/bpf/stackmap.c
parentd77763dc70c4afa451b33f80013910d502bf3bb7 (diff)
mpls, nospec: Sanitize array index in mpls_label_ok()
commit 3968523f855050b8195134da951b87c20bd66130 upstream. mpls_label_ok() validates that the 'platform_label' array index from a userspace netlink message payload is valid. Under speculation the mpls_label_ok() result may not resolve in the CPU pipeline until after the index is used to access an array element. Sanitize the index to zero to prevent userspace-controlled arbitrary out-of-bounds speculation, a precursor for a speculative execution side channel vulnerability. Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 4.4: - mpls_label_ok() doesn't take an extack parameter - Drop change in mpls_getroute()] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/bpf/stackmap.c')
0 files changed, 0 insertions, 0 deletions