[syslinux] [PATCH] efi: off-by-one in gdt allocation

Sylvain Gault sylvain.gault at gmail.com
Sat Feb 22 08:09:51 PST 2014


2014-02-22 9:05 UTC+01:00, H. Peter Anvin <hpa at zytor.com>:
> On 02/21/2014 06:30 PM, celelibi at gmail.com wrote:
>> From: Sylvain Gault <sylvain.gault at gmail.com>
>>
>> The assembly instruction lgdt take a segment limit that is one less than
>> the actual size, so that base+limit points to the last byte.
>>
>> Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
>
> This patch is of course correct (and will be applied); the bug is real,
> but it is (fortunately) harmless, as the extra byte at the end of the
> GDT cannot actually be accessed since it doesn't fit a full descriptor.
>
> 	-hpa

Yes, I know. I just found this while hunting another bug and thought
this was worth a patch.


Celelibi


More information about the Syslinux mailing list