This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] elflint: Add various low-level checks.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Sat, 03 Jan 2015 00:37:11 +0100
- Subject: Re: [PATCH] elflint: Add various low-level checks.
On Wed, Dec 31, 2014 at 01:02:37AM +0100, Mark Wielaard wrote:
> elflint could crash or hang because it didn't check some low level issues.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1170810
>
> Reported-by: Alexander Cherepanov <cherepan@mccme.ru>
> Signed-off-by: Mark Wielaard <mjw@redhat.com>
> [...]
> @@ -2033,7 +2051,7 @@ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"),
>
> size_t maxidx = nchain;
>
> - if (symshdr != NULL)
> + if (symshdr != NULL && shdr->sh_entsize != 0)
> {
> size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
>
After 2.5 days afl-fuzz found this typo. The check is against the wrong
shdr, should be symshdr.
Patch fixed on mjw/pending branch.
Cheers,
Mark