[PATCH] dwfl: fix potential overflow when reporting on kernel modules

2021-11-18 Thread Matthias Maennich via Elfutils-devel
dwfl_linux_kernel_report_modules_ has an outstanding ancient bug when reading kernel module information from a modules list file. The target buffer for the module name was sized too small to hold potential values. Fix that by increasing the value to account for the null termination. In practice, t

Re: [PATCH v2] libelf: {de,}compress: ensure zlib resource cleanup

2020-04-27 Thread Matthias Maennich via Elfutils-devel
On Sat, Apr 25, 2020 at 01:28:33AM +0200, Mark Wielaard wrote: Hi, On Fri, Mar 20, 2020 at 12:17:55PM +0100, Matthias Maennich via Elfutils-devel wrote: __libelf_decompress would only cleanup zlib resources via inflateEnd() in case inflating was successful, but would leak memory if not. Fix

[PATCH v2] libelf: {de,}compress: ensure zlib resource cleanup

2020-03-20 Thread Matthias Maennich via Elfutils-devel
__libelf_decompress would only cleanup zlib resources via inflateEnd() in case inflating was successful, but would leak memory if not. Fix this by calling inflateEnd() unconditionally. __libelf_decompress did this all the time already, but called deflateEnd() twice. That is not a (known) issue, bu

Re: [PATCH] libelf: decompress: ensure zlib resource cleanup

2020-03-15 Thread Matthias Maennich via Elfutils-devel
Hi Mark! Thanks for the quick response! On Mon, Mar 16, 2020 at 12:10:51AM +0100, Mark Wielaard wrote: Hi Matthias, On Sun, 2020-03-15 at 23:03 +0100, Matthias Maennich via Elfutils-devel wrote: __libelf_decompress would only cleanup zlib resources via inflateEnd() in case inflating was

[PATCH] libelf: decompress: ensure zlib resource cleanup

2020-03-15 Thread Matthias Maennich via Elfutils-devel
__libelf_decompress would only cleanup zlib resources via inflateEnd() in case inflating was successful, but would leak memory if not. Fix this by calling inflateEnd() in the error case as well. Fixes: 272018bba1f2 ("libelf: Add elf_compress and elf_compress_gnu.") Signed-off-by: Matthias Maennich

Re: oss-fuzz

2020-01-06 Thread Matthias Maennich via elfutils-devel
Hi everyone! On Thu, Dec 26, 2019 at 11:50:48PM +0100, Mark Wielaard wrote: Hi Berkeley, On Mon, Dec 23, 2019 at 08:06:54AM +0200, Berkeley Churchill wrote: Great, thanks for the feedback! One of my first tasks will be to support llvm/clang builds. I've seen some prior discussion on what's n