linux-yocto/drivers/misc/sgi-gru
Gustavo A. R. Silva 16c233b9b6 drivers/misc/sgi-gru: fix Spectre v1 vulnerability
commit fee05f455c upstream.

req.gid can be indirectly controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

vers/misc/sgi-gru/grukdump.c:200 gru_dump_chiplet_request() warn:
potential spectre issue 'gru_base' [w]

Fix this by sanitizing req.gid before calling macro GID_TO_GRU, which
uses it to index gru_base.

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:10:51 +01:00
..
gru_instructions.h
gru.h
grufault.c
grufile.c
gruhandles.c
gruhandles.h
grukdump.c drivers/misc/sgi-gru: fix Spectre v1 vulnerability 2018-11-27 16:10:51 +01:00
grukservices.c
grukservices.h
grulib.h
grumain.c
gruprocfs.c
grutables.h
grutlbpurge.c sgi-gru: update to new mmu_notifier semantic 2017-08-31 16:13:00 -07:00
Makefile