summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-10-16 11:55:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-20 10:13:03 +0100
commit3f951709eb2412974077d50b8e14cbc675b246a4 (patch)
tree2292e9124a391c8dca26e9a04627190a0cea98d5 /scripts
parentdc5e8c99975bb1a1561de884a83b3c19e4ac7ada (diff)
drm/bufs: Fix Spectre v1 vulnerability
[ Upstream commit a37805098900a6e73a55b3a43b7d3bcd987bb3f4 ] 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 <gustavo@embeddedor.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20181016095549.GA23586@embeddedor.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions