This is the mail archive of the
mailing list for the elfutils project.
Re: [patch 3/3] Access deleted files by /dev/PID/mem
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 03 Mar 2014 17:08:26 +0100
- Subject: Re: [patch 3/3] Access deleted files by /dev/PID/mem
On Sun, 2014-03-02 at 22:39 +0100, Jan Kratochvil wrote:
> I could zero out the headers but I find that redundant to existing
> maximum_size protection, therefore I will implement it only upon further
If you can detect that the shdrs aren't valid then zeroing them out is
the right thing to do. There are a couple of places in libdwfl that will
try to use them instead of phdrs if the exist (also because, at least
for debuginfo files, phdrs might not be trusted). For example
dwfl_module_build_id () might not be able to find the build-id if it
sees a corrupt shdr for the main ELF file.