Re: [PATCH] drm/i915/kvmgt: Fix potential Spectre v1
From: Gustavo A. R. Silva
Date: Tue Aug 07 2018 - 12:58:11 EST
Hi Zhenyu,
On 8/6/18 9:26 PM, Zhenyu Wang wrote:
> On 2018.08.02 22:40:19 -0500, Gustavo A. R. Silva wrote:
>> info.index 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/i915/gvt/kvmgt.c:1232 intel_vgpu_ioctl() warn:
>> potential spectre issue 'vgpu->vdev.region' [r]
>>
>> Fix this by sanitizing info.index before indirectly using it to index
>> vgpu->vdev.region
>
> Thanks for catching this! Applied.
>
Glad to help. :)
Thanks
--
Gustavo