Re: Issue 442253757: elfutils:fuzz-libdwfl: Heap-buffer-overflow in __libelf_set_data_list_rdlock

2025-09-04 Thread buganizer-system
Replying to this email means your email address will be shared with the team that works on this product. https://issues.oss-fuzz.com/issues/442253757 Changed ev...@gmail.com added comment #3: Sorry! The comment isn't related to OSS-Fuzz. I opened https://github.com/google/oss-fuzz/issues/13937 t

Re: [PATCH 10/13 v2] doc: Add elf_newscn.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:40PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: fix function declaration in SYNOPSIS. Clarify that the null > section is added automatically if absent and never returned. > Remove comment about requiring ELF_C_WRITE or ELF_C_RDWR. >

Re: [PATCH 13/13 v4] doc: Add elf_next.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:43PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v4: Minor rewording in DESCRIPTION and code comment in EXAMPLES > > doc/Makefile.am | 1 + > doc/elf_next.3 | 120 > 2 files changed, 1

Re: [PATCH 12/13 v2] doc: Add elf_rawdata.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:42PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Some rewording. Describe differences between elf_rawdata and > elf_getdata. Also mention that the returned Elf_Data is owned by > libelf and should not be manually freed. > > doc/Mak

Re: [PATCH 09/13 v2] doc: Add elf_newdata.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:39PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Describe default field values of Elf_Data returned by elf_newdata. > Minor rewording changes > > doc/Makefile.am | 1 + > doc/elf_newdata.3 | 92 +++

Re: [PATCH 08/13 v2] doc: Add elf_gnu_hash.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:38PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Minor rewording in description and synopsis > > doc/Makefile.am| 1 + > doc/elf_gnu_hash.3 | 1 + > doc/elf_hash.3 | 19 --- > 3 files changed, 18 insertions

Re: [PATCH 07/13 v2] doc: Add elf_getshdrstrndx.3 and elf_getshstrndx.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:37PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Mark elf_getshstrndx as deprecated in SYNOPSIS. > Add note to HISTORY about reason for introducing elf_getshdrndx. > Explain how to use with elf_strptr and Elf{32,64}_getshdr. > > doc

Re: [PATCH 06/13 v2] doc: Add elf_getshdrnum.3 and elf_getshnum.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, Aug 04, 2025 at 11:24:36PM -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: mark elf_getshnum as obsolete in SYNOPSIS. Describe extended section > headers breifly. Clarify that elf can be NULL, dst cannot be NULL. > Mention reason for elf_getshnum deprication a

Re: [PATCH v2] __libdw_dieabbrev: Replace rwlock with __atomic builtins

2025-09-04 Thread Frank Ch. Eigler
Hi - > > > Maybe we just have to say that you cannot share Dwarf_Die references > > > between threads? So if you want to use a Dwarf_Die from another thread > > > you have to copy it instead by passing it by reference? [...] > > (Exactly. The Dwarf_Die object is small enough, 4 pointers, to be >

Re: [PATCH v2] __libdw_dieabbrev: Replace rwlock with __atomic builtins

2025-09-04 Thread Frank Ch. Eigler
Hi - > > Maybe we just have to say that you cannot share Dwarf_Die references > > between threads? So if you want to use a Dwarf_Die from another thread > > you have to copy it instead by passing it by reference? [...] (Exactly. The Dwarf_Die object is small enough, 4 pointers, to be simply copi

Re: [PATCH 03/13 v2] doc: Add elf_getdata_rawchunk.3

2025-09-04 Thread Aaron Merey
Hi Mark, On Thu, Sep 4, 2025 at 1:12 PM Mark Wielaard wrote: > > Hi Aaron, > > On Mon, 2025-08-04 at 23:24 -0400, Aaron Merey wrote: > > Signed-off-by: Aaron Merey > > --- > > v2: Remove mention of implementation details. Mention that conversion > > to native byte order and direct access alignme

[PATCH] elf_getdata_rawchunk.c: Fix dummy chunk insertion race condition

2025-09-04 Thread Aaron Merey
When elf_getdata_rawchunk aquires a new chunk for the first time, it inserts a stack-allocated dummy chunk into a search_tree with an rdlock held. When the real chunk is prepared to replace the dummy chunk, the rdlock is released and a wrlock is then held while replacing the dummy with the real ch

Re: [PATCH v2] __libdw_dieabbrev: Replace rwlock with __atomic builtins

2025-09-04 Thread Aaron Merey
Hi Mark, On Thu, Sep 4, 2025 at 10:40 AM Mark Wielaard wrote: > > Hi Aaron, > > On Mon, 2025-09-01 at 20:31 -0400, Aaron Merey wrote: > > __libdw_dieabbrev uses the abbrev_lock rwlock to synchronize access to the > > Dwarf_Die abbrev field as well as its lazy loading. Calls to rwlock_wrlock > >

Re: [RFC] updated api for libdwfl_stacktrace

2025-09-04 Thread Mark Wielaard
Hi Serhei, On Wed, 2025-09-03 at 10:14 -0400, Serhei Makarov wrote: > Initial response from what I know, pending being actually sure about the > answers. > > On Wed, Sep 3, 2025, at 9:51 AM, Mark Wielaard wrote: > > Could you explain again why we have the first set of arguments? > > Dwfl *dwfl

Re: [PATCH 05/13 v2] doc: Add elf_getphdrnum.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-08-04 at 23:24 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Clarify that return value will not exceed bounds of > elf32_getphdr/elf64_getphdr array when used as an index. > > doc/Makefile.am | 1 + > doc/elf_getphdrnum.3 | 81 ++

Re: [PATCH 04/13 v2] doc: Add elf_getident.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-08-04 at 23:24 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: some minor rewording. mention EI_* macros by name. > > doc/Makefile.am| 1 + > doc/elf_getident.3 | 95 ++ > 2 files changed, 96 insertions(+

Re: [PATCH 03/13 v2] doc: Add elf_getdata_rawchunk.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-08-04 at 23:24 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Remove mention of implementation details. Mention that conversion > to native byte order and direct access alignment resembles elf_getdata. > Mention elf_errmsg. > > On Mon, Jul 7, 2025 at 1:

Re: [PATCH 02/13 v2] doc: Add elf_flag*.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-08-04 at 23:24 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: Mention that ELF_F_LAYOUT and ELF_F_PERMISSIVE are used with > elf_flagelf only and mention which fields may be manually modified. > Clarify when an error code is set. Explain exactly which ch

Re: [PATCH 01/13 v2] doc: Add elf_memory.3

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-08-04 at 23:24 -0400, Aaron Merey wrote: > Signed-off-by: Aaron Merey > --- > v2: replace "open memory buffer" with "open file descriptor". Clarify > behavior when image is NULL as well as the minimum size of the image. > > doc/Makefile.am | 1 + > doc/elf_memory.3 | 85

Re: [PATCH v2] __libdw_dieabbrev: Replace rwlock with __atomic builtins

2025-09-04 Thread Mark Wielaard
Hi Aaron, On Mon, 2025-09-01 at 20:31 -0400, Aaron Merey wrote: > __libdw_dieabbrev uses the abbrev_lock rwlock to synchronize access to the > Dwarf_Die abbrev field as well as its lazy loading. Calls to rwlock_wrlock > and unlock incur significant performance overhead even in single-threaded > c