mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-11 11:50:06 +00:00
x86/CET: Don't parse beyond the note end
Simply check if "ptr < ptr_end" since "ptr" is always incremented by 8. Reviewed-by: Carlos O'Donell <carlos@redhat.com> * sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Don't parse beyond the note end.
This commit is contained in:
parent
97f2237efa
commit
4591b7db23
@ -1,3 +1,8 @@
|
||||
2018-07-27 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Don't
|
||||
parse beyond the note end.
|
||||
|
||||
2018-07-27 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/tst-ofdlocks.c: Return unsupported if
|
||||
|
@ -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;
|
||||
|
||||
while (1)
|
||||
while (ptr < ptr_end)
|
||||
{
|
||||
unsigned int type = *(unsigned int *) ptr;
|
||||
unsigned int datasz = *(unsigned int *) (ptr + 4);
|
||||
|
Loading…
Reference in New Issue
Block a user