V3 [PATCH] x86/CET: Fix property note parser [BZ #23467]
Adhemerval Zanella
adhemerval.zanella@linaro.org
Mon Jul 30 19:10:00 GMT 2018
On 30/07/2018 15:56, H.J. Lu wrote:
>>> +
>>> + test (bar);
>>> +
>>> + return EXIT_FAILURE;
>>> +}
>>
>>> diff --git a/sysdeps/x86/dl-prop.h b/sysdeps/x86/dl-prop.h
>>> index 35d3f16a23..d9e0770e29 100644
>>> --- a/sysdeps/x86/dl-prop.h
>>> +++ b/sysdeps/x86/dl-prop.h
>>> @@ -73,7 +73,7 @@ _dl_process_cet_property_note (struct link_map *l,
>>> unsigned char *ptr = (unsigned char *) (note + 1) + 4;
>>> unsigned char *ptr_end = ptr + note->n_descsz;
>>>
>>
>> Should we care for overflow here (I guess not since we don't really
>> protected against ill-formed elf files in general)?
>
> We do protect against ill-formed notes. When we get here, the whole
> note has been loaded into memory. There won't be overflow.
Indeed, LGTM to me then.
More information about the Libc-alpha
mailing list