Sourceware infrastructure updates for Q1 2025

2025-04-22 Thread Mark Wielaard
ailman/listinfo/overseers Please see https://sourceware.org/donate.html if you want to financially support Sourceware. Sourceware PLC, Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor, Tom Tromey, Jon Turney, Mark J. Wielaard, Elena Zannoni

scraperbot protection - Patchwork and Bunsen behind Anubis

2025-04-21 Thread Mark Wielaard
of their patrons as thank you. https://xeiaso.net/notes/2025/anubis-works/ https://xeiaso.net/patrons/ Cheers, Mark

Re: [PATCH] src/readelf.c: Access symbol and version data only if available

2025-04-15 Thread Mark Wielaard
icitly also check that (or file a bug report to check that in the future)? Thanks, Mark > Suggested-by: Constantine Bytensky > Signed-off-by: Aaron Merey > --- > src/readelf.c | 50 +++--- > 1 file changed, 31 insertions(+), 19 deletion

Re: [PATCH] libdw: Add Nim language and dwarf_srclang tests

2025-04-08 Thread Mark Wielaard
on't have to create a whole valid ELF/Dwarf file. But that proved trickier than I thought. It does however seem pretty nice for these kind of tests. Cheers, Mark

Re: [PATCH] Avoid double-including config.h

2025-04-06 Thread Mark Wielaard
Hi Dmitry, On Fri, Apr 04, 2025 at 04:07:26PM +0300, Dmitry V. Levin wrote: > On Fri, Apr 04, 2025 at 01:55:48PM +0200, Mark Wielaard wrote: > > So to be (pedantically) correct should we include the attached? > > Yes, this should be fine, along with > > --- a/lib/crc32.

Re: [PATCH 1/3] Add some supporting framework for C11-style atomics.

2025-04-06 Thread Mark Wielaard
Hi Dmitry, On Fri, Apr 04, 2025 at 04:04:21PM +0300, Dmitry V. Levin wrote: > On Fri, Apr 04, 2025 at 01:38:01PM +0200, Mark Wielaard wrote: > > But maybe we should just use AC_CHECK_HEADERS([stdatomic.h]) and drop > > the AC_COMPILE_IFELSE trick? > > Sure. And if we want

Re: [PATCH 1/1] debuginfod: add --http-addr option

2025-04-05 Thread Mark Wielaard
sten-local only (assuming that makes sense). Cheers, Mark > --- > debuginfod/debuginfod.cxx | 115 ++ > doc/debuginfod.8 | 5 ++ > 2 files changed, 84 insertions(+), 36 deletions(-) > > diff --git a/debuginfod/debuginfod.cxx

Re: [PATCH 1/3] Add some supporting framework for C11-style atomics.

2025-04-04 Thread Mark Wielaard
Hi Dmitry, On Thu, 2025-04-03 at 19:09 +0300, Dmitry V. Levin wrote: > On Thu, Aug 29, 2019 at 03:16:12PM +0200, Mark Wielaard wrote: > > From: Jonathon Anderson > > > > Uses the stdatomic.h provided by FreeBSD when GCC doesn't (ie. GCC < 4.9) > > &

Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (main)

2025-04-04 Thread Mark Wielaard
't seen it fail in armhf for a year, but in the last 9 days it has failed 3 times already :{ https://builder.sourceware.org/buildbot/#/builders/elfutils-debian-armhf H, Mark

Re: [PATCH] Avoid double-including config.h

2025-04-04 Thread Mark Wielaard
> of including config.h twice for all files that include both > and "system.h". So to be (pedantically) correct should we include the attached? Thanks, Mark From f14c00adb24bf15059821ca972e5d20a58b893fa Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 4 Apr 2025 13:50:04 +02

[Bug general/29571] Add 'Key to Flags' to eu-readelf output

2025-04-04 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29571 Mark Wielaard changed: What|Removed |Added Status|NEW |RESOLVED Resolution

Re: [PATCH v2] Add 'Key to Flags' to eu-readelf output [bz 29571]

2025-04-04 Thread Mark Wielaard
tests/run-readelf-z.sh: Add Key to Flags to expected output. * tests/run-retain.sh: Likewise. * tests/run-strip-remove-keep.sh: Likewise. https://sourceware.org/bugzilla/show_bug.cgi?id=29571 Signed-off-by: Samuel Zeter Cheers, Mark

[PATCH] libdw: Add Nim language and dwarf_srclang tests

2025-04-02 Thread Mark Wielaard
CHECK. (main): Likewise. Signed-off-by: Mark Wielaard --- libdw/Makefile.am | 11 libdw/dwarf.h | 2 + libdw/dwarf_default_lower_bound.c | 2 + libdw/dwarf_srclang.c | 87 ++- 4 files changed, 101 insertions(

Re: [PATCH] debuginfod: add --listen-address option

2025-03-28 Thread Mark Wielaard
> doc/debuginfod.8 | 5 ++ > 2 files changed, 84 insertions(+), 36 deletions(-) Looks good, pushed as is. Thanks, Mark

Re: Sourceware Survey 2025

2025-03-28 Thread Mark Wielaard
On Fri, Mar 14, 2025 at 01:40:42AM +0100, Mark Wielaard wrote: > The Sourceware Project Leadership Committee would like to know who our > users are, which hosted projects they feel part of, what services they > rely on and what the priorities should be for new initiatives. &

Re: [PATCH] debuginfod: add --listen-address option

2025-03-27 Thread Mark Wielaard
d-off-by line to show they have the right to and grand others rights to use their contribution. See the CONTRIBUTING file: https://sourceware.org/cgit/elfutils/tree/CONTRIBUTING#n15 Thanks, Mark

Re: [COMMITTED] libdw/libdw_findcu.c: Fix TOCTOU race condition in __libdw_findcu

2025-03-27 Thread Mark Wielaard
en there are more places that might need extra guarding (or we have to write better eu-search wrappers?) Thanks, Mark > Signed-off-by: Aaron Merey > --- > libdw/libdw_findcu.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/libdw/libdw_findcu

[COMMITTED] tests/thread-safety-subr.sh: Change if [[ ]] to if [ ]

2025-03-26 Thread Mark Wielaard
Using [[ is a bashism. We can just use [ since this is a simple comparision. * tests/thread-safety-subr.sh: Use if [ instead of if [[. Signed-off-by: Mark Wielaard --- tests/thread-safety-subr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/thread-safety

Re: [PATCH 1/1] debuginfod: add --http-addr option

2025-03-26 Thread Mark Wielaard
Hi Michael, On Thu, Mar 20, 2025 at 02:58:34PM +, Trapp, Michael wrote: > > Am 19.03.2025 um 13:35 schrieb Mark Wielaard : > > The code itself does look ok, although I think it could be simplified a > > little if we go for something like --listen-local only (assuming th

Re: [PATCH 3/9 v4] libdwP.h: Add locking to str_offsets_base_off

2025-03-26 Thread Mark Wielaard
looks good. I believe that means the whole series is finally fully reviewed and approved. So please do push it. Cheers, Mark

Re: [PATCH 2/9 v4] libdw: Add locking to dwarf_getsrcfiles, dwarf_getsrclines, dwarf_macro_getsrcfiles

2025-03-26 Thread Mark Wielaard
Hi Aaron, On Sun, 2025-03-16 at 21:51 -0400, Aaron Merey wrote: > * libdw/dwarf_begin_elf.c (dwarf_begin_elf): Init macro_lock. > * libdw/dwarf_end.c (cu_free): Free src_lock. > (dwarf_end): Free macro_lock. > * libdw/dwarf_getsrcfiles.c (dwarf_getsrcfiles): Use src_lock. >

Re: [PATCH 05/13] libdwfl [5/13]: introduce Dwfl_Process_Tracker

2025-03-20 Thread Mark Wielaard
it slightly more intuitive to use. Cheers, Mark > * libdwfl/libdwfl.h (Dwfl_Process_Tracker): New struct. > (dwfl_process_tracker_begin): New function. > (dwfl_begin_with_tracker): New function. > (dwfl_process_tracker_end): New function. > * libdw/libdw.map: Add new functions.

Re: [PATCH 02/13] libdwfl [2/13]: expose setfunc callback for libdwfl+libebl clients

2025-03-20 Thread Mark Wielaard
libdwfl function with the above changes, but I think it is simpler/less work to just make it an internal libdwflP.h helper function. Cheers, Mark

Re: [PATCH 04/13] libdwfl [4/13]: add dwfl_perf_sample_preferred_regs_mask

2025-03-19 Thread Mark Wielaard
Hi Serhei, On Sun, Mar 16, 2025 at 07:14:11PM -0400, Serhei Makarov wrote: > Since libebl is a private interface, subsequent patches in the series > introduce another api wrapping the libebl perf register handling. In > this patch, add an interface to access the preferred set of registers > that

Re: [PATCH 03/13] libebl [3/13]: eu-stacktrace: use new register handling api

2025-03-19 Thread Mark Wielaard
tch 01/13 (it could even be folded into it. Cheers, Mark > --- > src/Makefile.am | 4 ++-- > src/stacktrace.c | 48 +--- > 2 files changed, 15 insertions(+), 37 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am

Re: [PATCH 01/13] libebl [1/13]: api for perf register handling, start with x86_64

2025-03-19 Thread Mark Wielaard
his is used by some backends, where the > return_address_register actually contains the call address. */ > diff --git a/libebl/libeblP.h b/libebl/libeblP.h > index c408ed97..29c2402d 100644 > --- a/libebl/libeblP.h > +++ b/libebl/libeblP.h > @@ -1,5 +1,5 @@ > /* Internal definitions for interface for libebl. > - Copyright (C) 2000-2009, 2013, 2014 Red Hat, Inc. > + Copyright (C) 2000-2009, 2013, 2014, 2025 Red Hat, Inc. > This file is part of elfutils. > > This file is free software; you can redistribute it and/or modify > @@ -60,6 +60,11 @@ struct ebl > Ebl architecture can unwind iff FRAME_NREGS > 0. */ >size_t frame_nregs; > > + /* Preferred sample_regs_user mask to request from linux perf_events > + to allow unwinding. Ebl architecture supports unwinding from > + perf_events sample data iff PERF_FRAME_REGS_MASK > 0. */ > + uint32_t perf_frame_regs_mask; > + In all other places the mask is an uint64_t Also the libebl interface is very verbose for this mask. Clearly copied from how frame_nregs is done. So fine for now. But we might want to look into something simpler for both of these. Both fetching frame_nregs and perf_frame_regs_mask feel very inefficient. Cheers, Mark

Re: Question about elf symbol's file offset

2025-03-19 Thread Mark Wielaard
located the symbol and/or section addresses (so whether you are reading the values from memory or on disk). Cheers, Mark

Re: [PATCH] Add 'Key to Flags' to eu-readelf output [bz 29571]

2025-03-19 Thread Mark Wielaard
(" L (link order), N (extra OS processing required), G (group), T > (TLS),"); > + puts (" C (compressed), O (ordered), R (GNU retain), E (exclude)"); > +} > > /* Print the program header. */ > static void The patch itself does look correct. These are the flags that print_shdr prints if the corresponding shdr->sh_flags are set. Cheers, Mark

[Bug general/29571] Add 'Key to Flags' to eu-readelf output

2025-03-19 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29571 --- Comment #7 from Mark Wielaard --- (In reply to Sam Zeter from comment #6) > I also noticed in libelf/elf.h that we define these flags but do not print > them in readelf: > > #define SHF_MASKOS 0x0ff0 /*

Re: [PATCH 01/13] libebl [1/13]: api for perf register handling, start with x86_64

2025-03-18 Thread Mark Wielaard
that coding like this triggers -Werror=unused-parameter on non-x86. > I plan to fix this in the next version of the patch. In some other situations that is "solved" with marking the function arguments with __attribute__ ((unused)) (which isn't true for x86_64, but the compiler is fine with that). Cheers, Mark

Sourceware Survey 2025

2025-03-15 Thread Mark Wielaard
your local timezone: $ date -d "Fri Mar 14 16:00 UTC 2025" Thanks, Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor, Tom Tromey, Jon Turney, Mark J. Wielaard, Elena Zannoni

[PATCH 2/4] libdw: Add dwarf_language and dwarf_language_lower_bound functions.

2025-03-15 Thread Mark Wielaard
. * tests/Makefile.am (check_PROGRAMS): Add dwarf_language_lower_bound. (TESTS): Likewise. (dwarf_language_lower_bound_LDADD): New variable. Signed-off-by: Mark Wielaard --- NEWS | 2 + libdw/dwarf_aggregate_size.c | 8 +- libdw

[PATCH 3/4] libdw: Make dwarf_srclang forward compatible with DW_AT_language_name

2025-03-11 Thread Mark Wielaard
. (dwarf_srclang): If there is no DW_AT_language, try DW_AT_language_name and DW_AT_language_version, use language_to_srclang. Signed-off-by: Mark Wielaard --- libdw/dwarf_srclang.c | 221 +- 1 file changed, 218 insertions(+), 3 deletions

[PATCH 4/4] readelf: Add support for printing DW_AT_language_name DW_LNAMEs

2025-03-11 Thread Mark Wielaard
dwarf_lname_name. * run-readelf-lnames.sh: New test. * testfile-lnames.bz2: New testfile. * tests/Makefile.am (TESTS): Add run-readelf-lnames.sh. (EXTRA_DIST): Add run-readelf-lnames.sh and testfile-lnames.bz2. Signed-off-by: Mark Wielaard --- libdw/dwarf.h

[PATCH 1/4] dwarf.h: Add DWARF v6 langauge attributes and DW_LNAME constants

2025-03-11 Thread Mark Wielaard
-dwarf.awk: Handle DW_LNAME. * libdw/dwarf.h: Add DW_AT_language_name and DW_AT_language_version plus all currently defined DW_LNAME constants. Add DW_LANG_V and DW_LANG_Algol68. * libdw/dwarf_default_lower_bound.c: Add DW_LANG_V and DW_LANG_Algol68. Signed-off-by: Mark Wielaard

[Bug debuginfod/31862] debuginfod client should cache received x-debuginfod-* headers

2025-03-09 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31862 Mark Wielaard changed: What|Removed |Added Resolution|--- |FIXED CC

Re: [PATCH 4/9 v3] Add configure option --enable-helgrind

2025-02-28 Thread Mark Wielaard
v3 changes: Add --track-fds to valgrind_cmd when USE_HELGRIND is true. Looks OK. Once this is in we should add a buildbot with this enabled. Thanks, Mark

Re: [PATCH 2/9 v3] libdw: Add locking to dwarf_getsrcfiles, dwarf_getsrclines, dwarf_macro_getsrcfiles

2025-02-28 Thread Mark Wielaard
f > *correctness* now, and only complicating locking later when > serious contention hits to performance are indicated.) Sure. But I think the current locking proposal, using an indirect lock from a "parent" object, feels like it is harder to proof correct than having the lock in the object itself. Cheers, Mark

Re: [PATCH 3/9 v3] libdwP.h: Add locking to str_offsets_base_off

2025-02-27 Thread Mark Wielaard
se_lock); } return off; > } > diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c > index 613f61c8..1e96110b 100644 > --- a/libdw/libdw_findcu.c > +++ b/libdw/libdw_findcu.c > @@ -179,6 +179,7 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) >eu_search_tree_init (&newp->locs_tree); >rwlock_init (newp->abbrev_lock); >rwlock_init (newp->split_lock); > + mutex_init (newp->str_off_base_lock); > >/* v4 debug type units have version == 4 and unit_type == DW_UT_type. */ >if (debug_types) OK. Cheers, Mark

Re: [PATCH 2/9 v3] libdw: Add locking to dwarf_getsrcfiles, dwarf_getsrclines, dwarf_macro_getsrcfiles

2025-02-27 Thread Mark Wielaard
e dwarf_macro_getsrclines locking added in this patch. That makes sense. > On Wed, Feb 12, 2025 at 8:17 AM Mark Wielaard wrote: > > > > Hi Aaron, > > > > On Tue, 2025-02-04 at 16:50 -0500, Aaron Merey wrote: > > >       * libdw/dwarf_getsrcfiles.

Re: [PATCH 1/9 v3] Change type of dwarf_lock from rwlock to mutex

2025-02-27 Thread Mark Wielaard
* libdw/libdwP.h (struct Dwarf): Ditto. > * libdw/libdw_findcu.c (__libdw_findcu): Ditto. > > Signed-off-by: Aaron Merey > > --- > v3 changes: More specific comment for dwarf_lock declaration. Still not a fan of these recursive mutexes, but the changes themselves look correct and the extra comments are helpful. Cheers, Mark

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in unstrip.c

2025-02-27 Thread Mark Wielaard
o create symbol table"); If you check this why not at the point where elf_getdata is called (symstrdata is assigned?). And then you should also check the other elf_getdata call at the same time here: symdata = elf_getdata (unstripped_symtab, NULL); symstrdata = elf_getdata (unstripped_strtab, NULL); Thanks, Mark

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in readelf.c in

2025-02-27 Thread Mark Wielaard
r, is pass down that ehdr from handle_notes through the various handle_* functions. Cheers, Mark > Corrections explained: > - Added a NULL check for the ehdr variable > > Triggers found by static analyzer Svace. > > Signed-off-by: Anton Moryakov > --- > src/readelf.c

Re: [PATCH] src: fix DEREF_OF_NULL.RET.STAT in readelf.c in

2025-02-27 Thread Mark Wielaard
x27;t think scnname can be NULL. But this code is different from any other print_debug_* code. All other code uses section_name (Ebl *ebl, GElf_Shdr *shdr) to get the section name. So what we could do to make the static analyzer happy is simply do the same here. I pushed the attached. Cheers, Ma

Re: [PATCH] src: fix DEREF_OF_NULL.RET in readelf.c

2025-02-27 Thread Mark Wielaard
member '%s' contains:\n"), h->ar_name); > > elf_end (subelf); Again subject isn't super helpful and indentation is incorrect. Also it is easier to switch the check around to: + if (h != NULL) + printf (_("Archive member '%s' contains:\n"), h->ar_name); I made those changes and checked this in. Thanks, Mark

Re: [PATCH] scr: fix DEREF_OF_NULL.RET.STAT in ar.c

2025-02-27 Thread Mark Wielaard
oper_insert (int oper, const char *arfname, char > **argv, int argc, >while ((subelf = elf_begin (fd, cmd, elf)) != NULL) > { >Elf_Arhdr *arhdr = elf_getarhdr (subelf); > + > + if (arhdr == NULL) > + goto next; Likewise. Thanks, Mark

[PATCH] libelf: Rewrite elf_scnshndx, extended index table handling

2025-02-23 Thread Mark Wielaard
st-manyfuncs.sh: Likewise. * tests/test-manyfuncs.c: New test. Signed-off-by: Mark Wielaard --- libelf/elf32_getshdr.c | 14 -- libelf/elf_begin.c | 26 --- libelf/elf_scnshndx.c| 52 - libelf/libelf.h | 9 +- libelf/libelfP.h

[Bug backends/32684] aarch64 linux 4 build failure: struct user_pac_mask not defined

2025-02-23 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32684 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution

Re: [PATCH] aarch64: define struct user_pac_mask if needed

2025-02-23 Thread Mark Wielaard
lt against older kernel headers will still be fully > functional if used on a newer system This looks very nice. I added a reference to https://sourceware.org/bugzilla/show_bug.cgi?id=32684 to the commit message and pushed your commit. Thanks, Mark

Re: ☠ Buildbot (Sourceware): elfutils-snapshots-coverage - failed test (failure) (main)

2025-02-23 Thread Mark Wielaard
rage report snapshot work again: https://snapshots.sourceware.org/elfutils/coverage/latest/ Cheers, Mark

Re: [obv] [patch] debuginfod-client memory hygiene

2025-02-23 Thread Mark Wielaard
ating various fixes since 0.192. Fedora is carrying 8 backports (plus an odd s390x endian fixup, that is probably not necessary anymore). https://src.fedoraproject.org/rpms/elfutils/tree/rawhide Cheers, Mark

[COMMITTED] elfutils_[try_]fedora_s390x_builder: Don't use valgrind factory

2025-02-22 Thread Mark Wielaard
One of the (libcurl) libraries tries to close invalid file descriptors on fedora s390. Skip running the testsuite under valgrind for now. --- builder/master.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/master.cfg b/builder/master.cfg index 0ccd23df9800..7a55e

[Bug libdw/32713] elfutils fails to symbolize core dumps created by Linux 6.12+

2025-02-19 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32713 --- Comment #2 from Mark Wielaard --- See also this kernel thread: https://lore.kernel.org/all/39fc2866-dff3-43c9-9d40-e8ff30a21...@juniper.net/ Looks like the kernel people believe this in "in spec" so doesn't really b

[Bug libdw/32713] elfutils fails to symbolize core dumps created by Linux 6.12+

2025-02-19 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32713 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

Re: [obv] [patch] debuginfod-client memory hygiene

2025-02-19 Thread Mark Wielaard
x27;t guaranteed a valid pointer (or NULL) then this could easily lead to memory leaks. I would at least report it to glibc to see if this is intentional. Cheers, Mark

[Bug tools/32657] eu-readelf SEGV (buffer over read) in print_string_section (src/readelf.c:13363)

2025-02-18 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32657 --- Comment #2 from Mark Wielaard --- Note that someone created CVE-2025-1372 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32650] eu-readelf SEGV (illegal read access) in __libdw_thread_tail(libdw/libdw_alloc.c:112)

2025-02-17 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32650 --- Comment #3 from Mark Wielaard --- Note that someone created CVE-2025-1352 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32654] eu-readelf SEGV (head-buffer-overread) in process_symtab (src/readelf.c:2654)

2025-02-17 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32654 --- Comment #3 from Mark Wielaard --- Note that someone created CVE-2025-1365 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32655] eu-readelf SEGV (buffer over read) in handle_dynamic_symtab (src/readelf.c:2903)

2025-02-17 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32655 --- Comment #3 from Mark Wielaard --- Note that someone created CVE-2025-1371 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32656] eu-readelf SEGV (buffer over read) in dump_data_section (src/readelf.c:13312)

2025-02-17 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32656 --- Comment #4 from Mark Wielaard --- Note that someone created CVE-2025-1372 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-17 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 --- Comment #4 from Mark Wielaard --- Note that someone created CVE-2025-1376 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32673] eu-strip SEGV (illegal read access) in gelf_getsymshndx (libelf/gelf_getsymshndx.c:123)

2025-02-17 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32673 --- Comment #3 from Mark Wielaard --- Note that someone created CVE-2025-1377 for this bug without following our SECURITY policy: https://sourceware.org/cgit/elfutils/tree/SECURITY This is NOT a security issue according to our policy

[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-14 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Mark Wielaard changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution

[Bug tools/32650] eu-readelf SEGV (illegal read access) in __libdw_thread_tail(libdw/libdw_alloc.c:112)

2025-02-14 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32650 Mark Wielaard changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tools/32654] eu-readelf SEGV (head-buffer-overread) in process_symtab (src/readelf.c:2654)

2025-02-14 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32654 Mark Wielaard changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tools/32655] eu-readelf SEGV (buffer over read) in handle_dynamic_symtab (src/readelf.c:2903)

2025-02-14 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32655 Mark Wielaard changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution

[Bug tools/32656] eu-readelf SEGV (buffer over read) in dump_data_section (src/readelf.c:13312)

2025-02-14 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32656 Mark Wielaard changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution

[Bug tools/32673] eu-strip SEGV (illegal read access) in gelf_getsymshndx (libelf/gelf_getsymshndx.c:123)

2025-02-14 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32673 Mark Wielaard changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

Re: [PATCH] libelf, readelf: Use validate_str also to check dynamic symstr data

2025-02-14 Thread Mark Wielaard
Hi Aaron, On Thu, Feb 13, 2025 at 03:35:03PM -0500, Aaron Merey wrote: > On Mon, Feb 10, 2025 at 1:27 PM Mark Wielaard wrote: > > When dynsym/str was read through eu-readelf --dynamic by readelf > > process_symtab the string data was not validated, possibly printing > > un

[Bug libelf/32689] New: Robustify [g]elf functions that take (nobits) Elf_Data arguments

2025-02-13 Thread mark at klomp dot org
Priority: P2 Component: libelf Assignee: unassigned at sourceware dot org Reporter: mark at klomp dot org CC: elfutils-devel at sourceware dot org Target Milestone: --- The Elf_Data returned from a SHT_NOBITS section have their d_size set

[PATCH] strip: Verify symbol table is a real symbol table

2025-02-13 Thread Mark Wielaard
kes a message string to display. (INTERNAL_ERROR): Use INTERNAL_ERROR_MSG with elf_errmsg (-1). (remove_debug_relocations): Check the sh_link referenced section is real and isn't a SHT_NOBITS section. https://sourceware.org/bugzilla/show_bug.cgi?id=32673 Signed-of

[Bug tools/32673] eu-strip SEGV (illegal read access) in gelf_getsymshndx (libelf/gelf_getsymshndx.c:123)

2025-02-13 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32673 Mark Wielaard changed: What|Removed |Added Assignee|unassigned at sourceware dot org |mark at klomp dot org

[Bug backends/32684] aarch64 linux 4 build failure: struct user_pac_mask not defined

2025-02-13 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32684 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[PATCH] libelf: Handle elf_strptr on section without any data

2025-02-12 Thread Mark Wielaard
d yet. * libelf/elf_strptr.c (elf_strptr): Check strscn->rawdata_base is not NULL. https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Signed-off-by: Mark Wielaard --- libelf/elf_strptr.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libelf/elf_

Re: [PATCH 06/10 v2] Add tests/thread-safety-subr.sh

2025-02-12 Thread Mark Wielaard
t let me know if you want more feedback. Cheers, Mark > tests/Makefile.am | 1 + > tests/thread-safety-subr.sh | 33 + > 2 files changed, 34 insertions(+) > create mode 100644 tests/thread-safety-subr.sh > > diff --git a/tests/Makefile.a

Re: [PATCH 05/10 v2] Add configure option --enable-helgrind

2025-02-12 Thread Mark Wielaard
ng helgrind now requires enabling annotations This looks good. It will clash with your recent --track-fds=yes changes. But that should be easy to resolve (--track-fds works with both memcheck and helgrind, so you can simply add it to both valgrind_cmd assignments. Thanks, Mark > configure.ac

Re: [PATCH 04/10 v2] dwarf_offdie.c: Add locking

2025-02-12 Thread Mark Wielaard
; > + >if (result->cu == NULL) > { >/* This should never happen. The input file is malformed. */ Or if it is needed here, should it also be added in other places where __libdw_findcu is called? dwarf_cu_dwp_section_info, dwarf_die_addr_die, dwarf_get_units, dwarf_getaranges, ... Cheers, Mark

Re: [PATCH 03/10 v2] libdw: Add locking to dwarf_getsrcfiles and dwarf_getsrclines

2025-02-12 Thread Mark Wielaard
nlock (cu->dbg->dwarf_lock); > + return -1; > + } > } >else if (cu->lines == (void *) -1l) > -return -1; > +{ > + mutex_unlock (cu->dbg->dwarf_lock); > + return -1; > +} > >*lines = cu->lines; >*nlines = cu->lines->nlines; > > - // XXX Eventually: unlocking here. > - > + mutex_unlock (cu->dbg->dwarf_lock); >return 0; > } > INTDEF(dwarf_getsrclines) As far as I can see the locking and unlocking is correct here. Thanks, Mark

Re: [PATCH 02/10 v2] dwarf_filesrc.c: Add locking

2025-02-12 Thread Mark Wielaard
wP.h > +++ b/libdw/libdwP.h > @@ -305,6 +305,7 @@ struct Dwarf_Abbrev > /* Files in line information records. */ > struct Dwarf_Files_s >{ > + Dwarf *dbg; > unsigned int ndirs; > unsigned int nfiles; > struct Dwarf_Fileinfo_s So the extra Dwarf dbg field is to have a lock (the dwarf_lock dbg field) that is only used in dwarf_filesrc? If so, I think it isn't necessary. But maybe I am confused. Cheers, Mark

Re: [PATCH 01/10 v2] Change type of dwarf_lock from rwlock to mutex

2025-02-12 Thread Mark Wielaard
die_abbrev. */ >rwlock_define(, abbrev_lock); > > - /* Synchronize access to the split member of this Dwarf_CU. */ > + /* Synchronize access to the split member of this Dwarf_CU. > + Covers __libdw_find_split_unit. */ >rwlock_define(, split_lock); > >/* Memory boundaries of this CU. */ > diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c > index ee5d..613f61c8 100644 > --- a/libdw/libdw_findcu.c > +++ b/libdw/libdw_findcu.c > @@ -249,7 +249,7 @@ __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool > v4_debug_types) >if (found != NULL) > return *found; > > - rwlock_wrlock (dbg->dwarf_lock); > + mutex_lock (dbg->dwarf_lock); > >if (start < *next_offset) > __libdw_seterrno (DWARF_E_INVALID_DWARF); > @@ -276,7 +276,7 @@ __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool > v4_debug_types) > } > } > > - rwlock_unlock (dbg->dwarf_lock); > + mutex_unlock (dbg->dwarf_lock); >return result; > } > Thanks, Mark

[Bug general/32682] in configure, __asm__ should be used instead of asm

2025-02-12 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32682 Mark Wielaard changed: What|Removed |Added Resolution|--- |NOTABUG Status

[Bug general/32682] in configure, __asm__ should be used instead of asm

2025-02-11 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32682 --- Comment #6 from Mark Wielaard --- (In reply to Lorinczy Zsigmond from comment #4) > Thank you for help; the problem occured on Centos7.9/amd64, gcc-14.2 > (compiled from source). I have a predefined CFLAGS settings that includes &

[Bug general/32682] in configure, __asm__ should be used instead of asm

2025-02-11 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32682 --- Comment #3 from Mark Wielaard --- Which environment are you using that causes an issue here? I am trying to figure out if this is some theoretical issue or something that actually happens. A concrete example where you are seeing this

[Bug general/32682] in configure, __asm__ should be used instead of asm

2025-02-11 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32682 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

Re: [PATCH] src: fix DEREF_AFTER_NULL.EX in elflint.c

2025-02-11 Thread Mark Wielaard
Hi Anton, On Mon, 2025-02-03 at 14:45 +0100, Mark Wielaard wrote: > So the code path where prefix != NULL also implies suffix != NULL. > > Maybe the code needs a comment, check or assert to verify this? I added an assert. Pushed, Mark From 316077dd4b34c90f7e4c4228395a580e99239347 M

[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-10 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Mark Wielaard changed: What|Removed |Added Assignee|unassigned at sourceware dot org |mark at klomp dot org Last

[PATCH] readelf: Skip trying to uncompress sections without a name

2025-02-10 Thread Mark Wielaard
x27;t try to gnu decompress a section without a name. (print_string_section): Likewise. https://sourceware.org/bugzilla/show_bug.cgi?id=32656 Signed-off-by: Mark Wielaard --- src/readelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/readelf.c b/src/readelf.c

[PATCH] readelf: Handle NULL phdr in handle_dynamic_symtab

2025-02-10 Thread Mark Wielaard
gelf_getphdr returns NULL. https://sourceware.org/bugzilla/show_bug.cgi?id=32655 Signed-off-by: Mark Wielaard --- src/readelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/readelf.c b/src/readelf.c index c43fda35075a..21b92a08a6b6 100644 --- a/src/readelf.c +++ b

[PATCH] libelf, readelf: Use validate_str also to check dynamic symstr data

2025-02-10 Thread Mark Wielaard
://sourceware.org/bugzilla/show_bug.cgi?id=32654 Signed-off-by: Mark Wielaard --- lib/system.h| 27 +++ libelf/elf_strptr.c | 18 -- src/readelf.c | 18 +++--- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/lib/system.h b/lib

[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-10 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[PATCH] libdw: Simplify __libdw_getabbrev and fix dwarf_offabbrev issue

2025-02-10 Thread Mark Wielaard
abbrev into abbrevp on success. * libdw/libdw.h (dwarf_offabbrev): Document return values. * libdw/libdwP.h (__libdw_getabbrev): Don't take Dwarf_Abbrev result argument. https://sourceware.org/bugzilla/show_bug.cgi?id=32650 Signed-off-by: Mark Wielaard --- libdw/dw

[Bug tools/32656] eu-readelf SEGV (buffer over read) in dump_data_section (src/readelf.c:13312)

2025-02-08 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32656 --- Comment #2 from Mark Wielaard --- *** Bug 32657 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are on the CC list for the bug.

[Bug tools/32657] eu-readelf SEGV (buffer over read) in print_string_section (src/readelf.c:13363)

2025-02-08 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32657 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org

[Bug tools/32656] eu-readelf SEGV (buffer over read) in dump_data_section (src/readelf.c:13312)

2025-02-08 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32656 Mark Wielaard changed: What|Removed |Added Last reconfirmed||2025-02-08 CC

[Bug tools/32655] eu-readelf SEGV (buffer over read) in handle_dynamic_symtab (src/readelf.c:2903)

2025-02-08 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32655 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Assignee

[Bug tools/32654] eu-readelf SEGV (head-buffer-overread) in process_symtab (src/readelf.c:2654)

2025-02-08 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32654 Mark Wielaard changed: What|Removed |Added Last reconfirmed||2025-02-08 Assignee

[Bug tools/32650] eu-readelf SEGV (illegal read access) in __libdw_thread_tail(libdw/libdw_alloc.c:112)

2025-02-07 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32650 Mark Wielaard changed: What|Removed |Added Last reconfirmed||2025-02-08 CC

Re: [PATCH] libelf: fix DEREF_OF_NULL.RET in objdump.c

2025-02-07 Thread Mark Wielaard
Hi Anton, I changed the indention from using spaces to tabs and rewrote the subject line to better explain the change. Pushed as attached. Thanks, Mark >From 6c76ce7331e82a6fc6c2004e8e6ae51ca91f51d7 Mon Sep 17 00:00:00 2001 From: Anton Moryakov Date: Wed, 5 Feb 2025 00:50:23 +0300 Subj

Re: [PATCH 4/5] tests/test-elf_cntl_gelf_getshdr.c: Close fd unconditionally

2025-02-07 Thread Mark Wielaard
Hi Aaron, On Tue, Feb 04, 2025 at 05:00:21PM -0500, Aaron Merey wrote: > On Mon, Feb 3, 2025 at 8:36 AM Mark Wielaard wrote: > > So I don't think close should be called unconditionally. Maybe the > > correct solution is to do if (!close_fd) close (fd); after elf_end?

Re: [PATCH] libelf: fix DEREF_OF_NULL.RET in objdump.c

2025-02-03 Thread Mark Wielaard
the same subelf, so eventually you run out of memory. It is probably simpler to just add the check here: >/* Skip over the index entries. */ >if (strcmp (arhdr->ar_name, "/") != 0 > && strcmp (arhdr->ar_name, "//") != 0) if (arhdr != NULL && strcmp (arhdr->ar_name, "/") != 0 && strcmp (arhdr->ar_name, "//") != 0) Cheers, Mark

  1   2   3   4   5   6   7   8   9   10   >