lkml.org 
[lkml]   [2018]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] libahci: Fix possible Spectre-v1 pmp indexing in ahci_led_store()
On Fri, Jun 08, 2018 at 06:26:33PM +0800, John Garry wrote:
> Currently smatch warns of possible Spectre-V1 issue in ahci_led_store():
> drivers/ata/libahci.c:1150 ahci_led_store() warn: potential spectre issue 'pp->em_priv' (local cap)
>
> Userspace controls @pmp from following callchain:
> em_message->store()
> ->ata_scsi_em_message_store()
> -->ap->ops->em_store()
> --->ahci_led_store()
>
> After the mask+shift @pmp is effectively an 8b value, which is used to
> index into an array of length 8, so sanitize the array index.
>
> Signed-off-by: John Garry <john.garry@huawei.com>

Applied to libata/for-4.18-fixes.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2018-06-18 20:05    [W:0.067 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site