This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: V3 [PATCH] x86/CET: Fix property note parser [BZ #23467]



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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]