Re: [PATCH] libelf: Add n_namesz offset overflow check to gelf_get_note.

2019-05-04 Thread Mark Wielaard
On Wed, May 01, 2019 at 03:55:59PM +0200, Mark Wielaard wrote: > During fuzzing of the new xlate_notes testcase I noticed that > gelf_get_note didn't check whether the n_namesz of a note was > too big. This could lead to offset wrapping around. Causing an > infinite loop going over all ELF notes. F

[PATCH] libelf: Add n_namesz offset overflow check to gelf_get_note.

2019-05-01 Thread Mark Wielaard
During fuzzing of the new xlate_notes testcase I noticed that gelf_get_note didn't check whether the n_namesz of a note was too big. This could lead to offset wrapping around. Causing an infinite loop going over all ELF notes. Fix by adding an overflow check before updating offset. Signed-off-by: