Summary: | eu-elflint: memory allocation failure in xcalloc (xmalloc.c) | ||
---|---|---|---|
Product: | elfutils | Reporter: | Agostino Sarubbo <ago> |
Component: | tools | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elfutils-devel, mark |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | stacktrace |
Description
Agostino Sarubbo
2017-03-27 10:46:41 UTC
The allocation failure is caused by the insane large ph_num. We can limit the amount of memory we need by first checking we can at least read the headers and only allocate/check that number (and do the same for shnum). https://sourceware.org/ml/elfutils-devel/2017-q1/msg00133.html commit 4314716cd498bb51639db717bd7ce6182de33322 Author: Mark Wielaard <mark@klomp.org> Date: Tue Mar 28 01:25:34 2017 +0200 elflint: Sanity check the number of phdrs and shdrs available. Make sure we can at least read the shnum sections or phnum segments. Limit the number we do check to those we can actually read. https://sourceware.org/bugzilla/show_bug.cgi?id=21312 Signed-off-by: Mark Wielaard <mark@klomp.org> |