diff options
| author | Gustavo A. R. Silva <[email protected]> | 2018-10-16 11:55:49 +0200 |
|---|---|---|
| committer | Daniel Vetter <[email protected]> | 2018-10-17 09:17:33 +0200 |
| commit | a37805098900a6e73a55b3a43b7d3bcd987bb3f4 (patch) | |
| tree | fb8997e7e2a942d262a63e6f99deb1b037ae3bfe /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
| parent | 871edc96bdab5fd84134320456670e7bfd5ec31a (diff) | |
drm/bufs: Fix Spectre v1 vulnerability
idx 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:
drivers/gpu/drm/drm_bufs.c:1420 drm_legacy_freebufs() warn: potential
spectre issue 'dma->buflist' [r] (local cap)
Fix this by sanitizing idx before using it to index dma->buflist
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
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions