]> git.ipfire.org Git - thirdparty/elfutils.git/log
thirdparty/elfutils.git
4 days agosrc/stacktrace.c: remove in favour of stackprof users/serhei/try-stackprof-fixup
Serhei Makarov [Mon, 13 Apr 2026 19:48:52 +0000 (15:48 -0400)] 
src/stacktrace.c: remove in favour of stackprof

Now that stackprof is added, the existing src/stacktrace.c tool is
officially obsolete as a demo -- it relies on a custom patchset for
Sysprof (communicating via pipe, not contributed to mainline, in
favour of the sysprof-live-unwinder tool which links elfutils as a
library), whereas stackprof pulls data from perf_events directly.

Likewise, stackprof includes all of the eu-stacktrace functionality
for logging/statistics.

* configure.ac: Remove eu-stacktrace related bits.
  The configure checks for stackprof are simpler (just perf_events.h
  and libpfm).
* config/elfutils.spec.in: Remove eu-stacktrace.
* po/POTFILES.in: Remove stacktrace.c.
* src/Makefile.am: Remove eu-stacktrace related bits.
* src/stacktrace.c: Remove.
* .forgejo/workflows/check-fedora.yaml: Remove sysprof-capture-devel.

Co-authored-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Serhei Makarov <serhei@serhei.io>
4 days agodoc/stackprof.1: add man page and NEWS for stackprof
Serhei Makarov [Mon, 13 Apr 2026 18:46:45 +0000 (14:46 -0400)] 
doc/stackprof.1: add man page and NEWS for stackprof

* doc/Makefile.am (dist_man1_MANS): Add stackprof.1.
* doc/stackprof.1: New file.
* NEWS: Add stackprof.

Co-authored-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Serhei Makarov <serhei@serhei.io>
4 days agotests/: add test suite for stackprof
Serhei Makarov [Mon, 13 Apr 2026 18:46:02 +0000 (14:46 -0400)] 
tests/: add test suite for stackprof

Together with the stackprof tool we add some test cases to exercise
it, and the underlying libdwfl_stacktrace functionality as well.

* tests/stackprof-subr.sh: Common subroutines for checking
  perf_events availability and verifying gmon.*.out files.
* tests/run-stackprof-system.sh: New file.
* tests/run-stackprof-system-gprof.sh: New file.
* tests/run-stackprof-user.sh: New file.
* tests/run-stackprof-user-gprof.sh: New file.
* tests/Makefile.am (TESTS): add the new testcases.

Co-authored-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Serhei Makarov <serhei@serhei.io>
4 days agoconfigure.ac, src/: add C++20, add new stackprof tool
Serhei Makarov [Mon, 13 Apr 2026 18:45:32 +0000 (14:45 -0400)] 
configure.ac, src/: add C++20, add new stackprof tool

eu-stackprof is a new tool which profiles processes on a Linux system
using perf_events and outputs gprof gmon.out format program counter
histograms and callgraph-arc profiles; intended as an updated demo of
libdwfl_stacktrace functionality and as a data-gathering tool for the
profiledb initiative.

* configure.ac: Add configure checks for C++20, eu-stackprof
  perf/libpfm dependencies.
* config/elfutils.spec.in: Add stackprof.
* po/POTFILES.in: Add stackprof.cxx.
* src/Makefile.am (bin_PROGRAMS): Add stackprof.
  (stackprof_*): Add stackprof SOURCES, LDADD, and so forth.
* src/stackprof.cxx: New file.

Co-authored-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Serhei Makarov <serhei@serhei.io>
5 days agoeblinitreg_sample.c: guard ebl_set_initial_registers_sample
Serhei Makarov [Wed, 22 Jul 2026 19:23:33 +0000 (15:23 -0400)] 
eblinitreg_sample.c: guard ebl_set_initial_registers_sample

The generic code in ebl_set_initial_registers_sample is meant to be
used on arches with simple/small register files and a contiguous
linear mapping of perf_regs<->dwarf_regs. Make sure to guard it with a
check of ebl->perf_frame_regs_mask (the canonical sign that
sample_regs is supported for this arch).

Otherwise, a hypothetical call to ebl_set_initial_registers_sample()
on an unsupported arch with many regs falls through to the generic
code and ends up writing out of bounds to the dwarf_regs array,
(at least in builds where the assert is also compiled out).

Based on Sayed Kaif's patch and problem report cf
https://sourceware.org/pipermail/elfutils-devel/2026q2/009378.html

* libebl/eblinitreg_sample.c (ebl_set_initial_registers_sample):
  Guard the generic code on ebl->perf_frame_regs_mask != 0.

Reported-by: Sayed Kaif <skaif@digiscrypt.com>
Signed-off-by: Serhei Makarov <serhei@serhei.io>
7 days agostacktrace: label followed by a declaration is a C23 extension
Mark Wielaard [Mon, 20 Jul 2026 15:14:00 +0000 (17:14 +0200)] 
stacktrace: label followed by a declaration is a C23 extension

clang 22 complains about a label followed by a declaration in
src/stacktrace.c because it doesn't default to C23.

src/stacktrace.c:913:3: error: label followed by a declaration is a
C23 extension [-Werror,-Wc23-extensions]
  913 |   bool is_abi32 = (regs->abi == PERF_SAMPLE_REGS_ABI_32);
      |   ^

This isn't a problem with gcc because it is a GNU extension.

* src/stacktrace.c (sysprof_find_dwfl): But declarations after
reuse label into block.

Signed-off-by: Mark Wielaard <mark@klomp.org>
11 days agobackends: define strings for all sparc hwcap bits
Mark Wielaard [Thu, 16 Jul 2026 20:47:18 +0000 (22:47 +0200)] 
backends: define strings for all sparc hwcap bits

Not all sparc hwcaps bits do have a defined meaning. For those that
don't we use the "resvBIT" string, where BIT is 0..31. Bits 29 to 31
weren't defined, but we forgot to add the "resv29" string causing an
off-by one when trying to find the name for bit 30 (called "resv31")
and 31 (not set, so NULL).

* backends/sparc_attrs.c (sparc_check_object_attribute):
insert "resv29" into hwcaps array.

https://sourceware.org/bugzilla/show_bug.cgi?id=34402

Reported-by: nathan auvray <nathan.auvray60@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
11 days agolibelf: Handle truncated symbol archive index
Mark Wielaard [Thu, 16 Jul 2026 14:45:18 +0000 (16:45 +0200)] 
libelf: Handle truncated symbol archive index

When checking the index_size of an / or /SYM64/ symbol archive index
in elf_getarsym we only checked that the index_size contained the
whole offset table, but failed to check there was also room for the
count. Fix this by first making sure to check the index_size is large
enough for the count (4 or 8 bytes), then check that the rest of the
index_size has room for count table offset entries.

https://sourceware.org/bugzilla/show_bug.cgi?id=34401

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agotests: Generate core-ioperm-huge little endian core file on big endian
Mark Wielaard [Mon, 13 Jul 2026 16:33:35 +0000 (18:33 +0200)] 
tests: Generate core-ioperm-huge little endian core file on big endian

The core file generated by the core-ioperm-huge testcase should be
little endian even when executed on a big endian machine. Use
elf64_xlatetof to transform the Elf data structure to ELFDATA2LSB
before writing to disk.

* tests/Makefile.am (core_ioperm_huge_LDADD): Add libelf.
* tests/core-ioperm-huge.c: Call elf64_xlatetof on ehdr, phdr
and nhdr.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agoreadelf: Cap stack allocation for bit-array core notes
Kane Wang [Mon, 13 Jul 2026 09:04:31 +0000 (17:04 +0800)] 
readelf: Cap stack allocation for bit-array core notes

handle_core_item () alloca ()s n_descsz bytes when a core note is a
single bit-array ("b"/"B") item, such as NT_386_IOPERM.  n_descsz is
taken straight from the untrusted ELF/core file with no upper bound, so
a malformed core claiming a multi-megabyte descriptor exhausts the
process stack and crashes readelf (DoS).

Cap the allocation at 64 KiB and derive count/convsize from the capped
size, so convert () cannot write past data either.  Real ioperm
bitmaps (one bit per I/O port, at most 8 KiB) are unaffected; only
pathological inputs are truncated.

* src/readelf.c (handle_core_item): Cap the bit-array alloca at
64 KiB; derive count and convsize from the capped size.
* tests/core-ioperm-huge.c: New generator for a core with a
16 MiB NT_386_IOPERM note (sparse descriptor).
* tests/run-readelf-core-ioperm-huge.sh: New test.
* tests/Makefile.am (check_PROGRAMS, TESTS, EXTRA_DIST): Add
core-ioperm-huge and run-readelf-core-ioperm-huge.sh.
(core_ioperm_huge_LDADD): New.
* tests/.gitignore: Add core-ioperm-huge.

Signed-off-by: Kane Wang <wangqiang1@kylinos.cn>
2 weeks agolibdw: Fix __libdw_read_offset size in dwarf_getpubnames.c get_offsets
Mark Wielaard [Sun, 12 Jul 2026 12:07:05 +0000 (14:07 +0200)] 
libdw: Fix __libdw_read_offset size in dwarf_getpubnames.c get_offsets

There was a typo in the __libdw_read_offset call that meant it only
checked there were 3 bytes available in .debug_info at the given
offset instead of 4. This could result in a 1 byte overread.

* libdw/dwarf_getpubnames.c (get_offsets): Call
__libdw_read_offset with size 4.

https://sourceware.org/bugzilla/show_bug.cgi?id=34392

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agolibdw: Fix out-of-bounds read in DW_FORM_indirect form length parsing
Sayed Kaif [Sun, 12 Jul 2026 05:14:46 +0000 (10:44 +0530)] 
libdw: Fix out-of-bounds read in DW_FORM_indirect form length parsing

__libdw_form_val_compute_len handles DW_FORM_indirect by reading the
real form as an uleb128 and then computing the length of a value of
that form.  The guard that rejects a nested DW_FORM_indirect or a
DW_FORM_implicit_const inspected *valp instead of the decoded form
value u128.

After get_uleb128 the cursor valp may point right at the end of the CU
data (get_uleb128 advances up to the section end), so dereferencing
*valp reads one byte past the buffer.  A DW_FORM_indirect attribute
whose inner form uleb128 ends exactly at cu->endp triggers a one-byte
out-of-bounds read.  This path is reached from dwarf_child() and
dwarf_getattrs() while skipping attribute values, which rely on
__libdw_form_val_len doing a safe bounds check.

Besides the overread, comparing *valp (the first byte of the value
data) rather than u128 (the form) is wrong: it can spuriously reject a
valid attribute whose value happens to start with 0x16 or 0x21.
Compare u128, which is already the decoded form and needs no further
dereference.

* libdw/libdw_form.c (__libdw_form_val_compute_len): Check the
decoded form u128 instead of dereferencing *valp for the nested
DW_FORM_indirect / DW_FORM_implicit_const guard.

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
2 weeks agolibdw: Check there are any header bytes in loclists
Mark Wielaard [Sat, 11 Jul 2026 15:30:15 +0000 (17:30 +0200)] 
libdw: Check there are any header bytes in loclists

We tried to read the loclists header length and only then checked if
there were any bytes left. Make sure to check there are at least 4
bytes for the initial unit length.

* libdw/libdwP.h (__libdw_cu_locs_base): Check before initial
unit_length read.

https://sourceware.org/bugzilla/show_bug.cgi?id=34386

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agolibdw: Check there are any header bytes in rnglists
Mark Wielaard [Sat, 11 Jul 2026 15:23:36 +0000 (17:23 +0200)] 
libdw: Check there are any header bytes in rnglists

We tried to read the rnglists header length and only then checked if
there were any bytes left. Make sure to check there are at least 4
bytes for the initial unit length.

* libdw/libdwP.h (__libdw_cu_ranges_base): Check before initial
unit_length read.

https://sourceware.org/bugzilla/show_bug.cgi?id=34385

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agolibdw: Only read CIE augmentation data if it is there
Mark Wielaard [Sat, 11 Jul 2026 14:35:56 +0000 (16:35 +0200)] 
libdw: Only read CIE augmentation data if it is there

dwarf_next_cfi and intern_new_cie used slightly different methods
parsing the CIE augmentation data. Make sure both only read
augmentation data when it is there.

* libdw/cie.c (intern_new_cie): Check 'z' is the first char of
the augmentation. Only read augmentation data if
cie->sized_augmentation_data is set.
* libdw/dwarf_next_cfi.c (dwarf_next_cfi): Check limit for 'R'.

https://sourceware.org/bugzilla/show_bug.cgi?id=34387

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agolibdw: Check there are any header bytes in str_offsets_base_off
Mark Wielaard [Thu, 9 Jul 2026 20:56:56 +0000 (22:56 +0200)] 
libdw: Check there are any header bytes in str_offsets_base_off

We tried to read the str_offsets header length and only then checked
if there were any bytes left. Make sure to check there are at least 4
bytes for the initial unit length.

* libdw/libdwP.h (str_offsets_base_off): Check before initial
unit_length read.

https://sourceware.org/bugzilla/show_bug.cgi?id=34383

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 weeks agolibdw: Sanity check macros line_offset before reading
Mark Wielaard [Thu, 9 Jul 2026 19:56:56 +0000 (21:56 +0200)] 
libdw: Sanity check macros line_offset before reading

We checked there were enough bytes left after reading the
line_offset. Move the check before the read.

* libdw/dwarf_getmacros.c (get_table_for_offset): Check
offset_bytes before calling read_addr_unaligned_inc.

https://sourceware.org/bugzilla/show_bug.cgi?id=34382

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
3 weeks agolibdw: Fix out-of-bounds read in CFI DW_CFA_advance_loc1 handling
Sayed Kaif [Mon, 6 Jul 2026 07:12:35 +0000 (12:42 +0530)] 
libdw: Fix out-of-bounds read in CFI DW_CFA_advance_loc1 handling

execute_cfi walks a CFI instruction stream delimited by program and end.
The outer loop condition (program < end) only guarantees that the opcode
byte is present.  The DW_CFA_advance_loc1 case then reads a one-byte
operand with

  operand = *program++;

without first checking that another byte is available.  The sibling
cases DW_CFA_advance_loc2/4/8 all guard their fixed-size reads with
cfi_assert (program + N <= end), and readelf's own CFI printer guards
advance_loc1 with an equivalent check, but this path was missing it.

A crafted or truncated FDE/CIE whose instruction stream ends exactly on
a DW_CFA_advance_loc1 opcode therefore causes a one-byte read past the
end of the CFI data buffer.  Add the matching bounds check so malformed
input is rejected with DWARF_E_INVALID_CFI instead.

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
3 weeks agoreadelf: Fix interpretation of offset_size_flag in print_cu_index_section
Mark Wielaard [Mon, 29 Jun 2026 20:43:39 +0000 (22:43 +0200)] 
readelf: Fix interpretation of offset_size_flag in print_cu_index_section

The offset_size_flag is an DWARF 6 extension described in
https://dwarfstd.org/issues/220708.2.html

While writing tests for eu-dwp some issues with the eu-readelf display
of the .debug_cu_index were found. The offset_size_flag was only used
for the offsets table, not the size (lengths) table. And if the flag
was set only 4 bytes of the offset were read (instead of 8 bytes).

* src/readelf.c (print_cu_index_section): Calculate
        lengths_end using off_bytes, use read_8ubyte_unaligned to
        read offsets when offset_size_flag is set, calculate prow
        using off_bytes, read and print sizes based on off_bytes.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 weeks agotests: Enable valgrind for stack trace testcases
Mark Wielaard [Wed, 1 Jul 2026 20:43:21 +0000 (22:43 +0200)] 
tests: Enable valgrind for stack trace testcases

Various stacks that did produced backtraces disabled valgrind in 2015
because of a valgrind bug. https://bugs.kde.org/show_bug.cgi?id=327427
Somewhere in the last 10 years this valgrind bug seems to have been
fixed. So also run these stack tests under valgrind (when enabled).

* tests/run-backtrace-demangle.sh: Don't unset VALGRIND_CMD.
* tests/run-stack-d-test.sh: Likewise.
* tests/run-stack-demangled-test.sh: Likewise.
* tests/run-stack-demangled-test.sh: Likewise.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 weeks agotests: Add ar header only test to ar-getarsym-mem
Mark Wielaard [Fri, 3 Jul 2026 21:44:18 +0000 (23:44 +0200)] 
tests: Add ar header only test to ar-getarsym-mem

The ar-getarsym-mem test for reading an ar header and zero entries to
not crash. Tweak the test a little so it also tests for just having an
ar header without an entry count. This used to crash before commit
3a122a068285 "libelf: Bounds-check archive symbol index count on the
mmap path".

* tests/ar-getarsym-mem.c (build_archive): Add just the
archive header.
(build_archive_count): New function to add the four byte
count.
(main): Add result2. Call build_archive_count for first
test. Add second test with 4 byte smaller image.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 weeks agolibelf: Bounds-check archive symbol index count on the mmap path
Matej Smycka [Fri, 3 Jul 2026 15:20:55 +0000 (17:20 +0200)] 
libelf: Bounds-check archive symbol index count on the mmap path

read_number_entries () reads the archive symbol index entry count.  On
the mmap path it copied w (4 or 8) bytes from the mapping without
checking that those bytes are present:

    if (elf->map_address != NULL)
      memcpy (&u, elf->map_address + *offp, w);
    else if ((size_t) pread_retry (elf->fildes, &u, w, *offp) != w)
      return -1;

The pread path rejects a short read, but the mmap path does not.  The
only preceding size check (SARMAG + sizeof (struct ar_hdr) >
maximum_size) covers the 68-byte index-member header; the count field
sits immediately after it and index_size (the member's real size) is
only validated later.  A mmap'd archive truncated to exactly the index
header (a "/" member with no content) therefore passes the header check,
and read_number_entries () reads w bytes past the end of the mapping.

This is the same defect addressed for the over-wide read in commit
8b192160 ("libelf: fix OOB read in elf_getarsym 32-bit archive index
count"), which narrowed the read from 8 to w bytes but did not add a
bounds check, so a sufficiently truncated archive still over-reads.

Reject the read when the count field lies outside the mapping, matching
the guarantee the pread path already provides.

Reproduced with a guard page: a 68-byte header-only archive built with
elf_memory () and placed at the end of a mapping with an inaccessible
page following it crashes on an unfixed build and returns
ELF_E_NO_INDEX on a fixed build.

Signed-off-by: Matej Smycka <matejsmycka@gmail.com>
3 weeks agoelfclassify: Fix invalid realloc when growing ar member path
Matej Smycka [Fri, 3 Jul 2026 10:30:18 +0000 (12:30 +0200)] 
elfclassify: Fix invalid realloc when growing ar member path

check_ar_members() builds the "ar_path[member]" string in a heap buffer
full_path allocated with malloc().  When a member name does not fit, the
grow path reallocated current_path instead of full_path:

    char *new_path = realloc (current_path, path_size);
    ...
    free (full_path);

On the first archive member current_path still points at ar_path, which
is the caller's path string (an argv[] entry or the getdelim() stdin
buffer), not the malloc'd full_path.  Reallocating that non-owned
pointer is invalid -- it is either not heap-allocated at all or aliases
a buffer owned elsewhere -- and the following free(full_path) then
releases the real buffer, corrupting the heap.  It is reachable with

    eu-elfclassify --elf-archive FILE

on an archive whose first member name is longer than the initial guess
(2 * strlen(ar_path) + 24).

Grow full_path itself and let realloc() release the old block.

Signed-off-by: Matej Smycka <matejsmycka@gmail.com>
3 weeks agodebuginfod: Reject IMA signatures shorter than the signature header
Matej Smycka [Fri, 3 Jul 2026 10:30:17 +0000 (12:30 +0200)] 
debuginfod: Reject IMA signatures shorter than the signature header

debuginfod_validate_imasig() extracts the IMA signature from the
untrusted x-debuginfod-imasignature response header, converts it to
binary (bin_sig_len = strlen(sig_buf) / 2) and passes it on as

    debuginfod_verify_hash(c, ..., &bin_sig[1], bin_sig_len - 1);

The signature length is only bounded from above (MAX_SIGNATURE_SIZE);
nothing checks a lower bound.  In debuginfod_verify_hash() the length is
then used as

    EVP_PKEY_verify(ctx, sig + sizeof(hdr), siglen - sizeof(hdr), ...);

where siglen is an int and sizeof(hdr) a size_t.  When a server sends a
signature shorter than the fixed signature_v2_hdr, siglen - sizeof(hdr)
is evaluated in size_t and underflows to a value near SIZE_MAX, which is
handed to EVP_PKEY_verify() as the signature length, causing a large
out-of-bounds read.  A malicious or man-in-the-middle debuginfod server
can trigger this against any client performing IMA signature
verification.

Reject signatures shorter than the header before it is used.

Signed-off-by: Matej Smycka <matejsmycka@gmail.com>
3 weeks agolibelf: fix OOB read in elf_getarsym 32-bit archive index count
王强 [Fri, 3 Jul 2026 13:20:39 +0000 (15:20 +0200)] 
libelf: fix OOB read in elf_getarsym 32-bit archive index count

read_number_entries () reads the number of entries of an archive symbol
index.  On the mmap path, taken for images created with elf_memory ()
(and for mmap-backed files), it copied sizeof (union u) == 8 bytes
instead of the width-appropriate 4 bytes for a 32-bit ("symdef") index.
For a minimal in-memory archive whose index member holds only the 4-byte
count field, this read 4 bytes past the caller's buffer.  Use w, matching
the pread path and the 64-bit case, so both paths read exactly the bytes
they need.

    * libelf/elf_getarsym.c (read_number_entries): Use w, not sizeof u,
    for the mmap memcpy.
    * tests/ar-getarsym-mem.c: New file.
    * tests/Makefile.am (check_PROGRAMS): Add ar-getarsym-mem.
    (TESTS): Likewise.
    (ar_getarsym_mem_LDADD): New variable.
    * tests/.gitignore: Add ar-getarsym-mem.

Signed-off-by: Kane Wang <wangqiang1@kylinos.cn>
3 weeks agolibelf: Correct the size of the in memory datastructure (off-by-one)
Mark Wielaard [Fri, 3 Jul 2026 14:01:32 +0000 (16:01 +0200)] 
libelf: Correct the size of the in memory datastructure (off-by-one)

Fix the u64 and u32 variable length array bounds. We state they are
[n], but there is actually room for [n+1] symbols. We don't actually
use the [n+1] entry, but we the undefined sanitizer warns about this.

Found by a new testcase by Kane Wang <wangqiang1@kylinos.cn>

* libelf/elf_getarsym.c (elf_getarsym): Mark (*u64) and (*u32)
as [n+1] arrays.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 weeks agotestsuite backtrace-child.c: Fix thread/spawn/coredump race condition.
Frank Ch. Eigler [Tue, 30 Jun 2026 23:35:56 +0000 (19:35 -0400)] 
testsuite backtrace-child.c: Fix thread/spawn/coredump race condition.

Force child process to wait for main thread to advance past
pthread_create in order to avoid triggering signals/coredumps
prematurely.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
4 weeks agolibdw: Fix out-of-bounds read in dwarf_next_cfi CIE augmentation parsing
Sayed Kaif [Sun, 28 Jun 2026 14:59:01 +0000 (20:29 +0530)] 
libdw: Fix out-of-bounds read in dwarf_next_cfi CIE augmentation parsing

dwarf_next_cfi parses CFI entries directly from the (untrusted)
.eh_frame or .debug_frame section data.  When a CIE uses a sized ('z')
augmentation, the loop over the augmentation string characters consumes
an encoding byte for the 'L' and 'P' directives with

    encoding = *bytes++;

without first checking that bytes is still within the entry.  The only
bounds check (bytes > augmentation_data + augmentation_data_size) is done
after the loop, so the read happens before it is validated.

A crafted CIE with augmentation "zL" (or "zP") and an empty augmentation
data area leaves bytes pointing exactly at the end of the section, so
*bytes++ reads one byte past the section buffer.  When the malformed CIE
is the last entry in the section this is a read past the end of the
mapped data.

Add the same "bytes >= limit" check that the surrounding code already
uses for the other reads in this function before consuming the encoding
byte.

The problem was found with AddressSanitizer.  A 16-byte .eh_frame
containing a single CIE

    0c 00 00 00   length = 12
    00 00 00 00   CIE_id = 0
    01            version = 1
    7a 4c 00      augmentation = "zL"
    01            code_alignment_factor = 1
    7f            data_alignment_factor = -1
    00            return_address_register = 0
    00            augmentation_data_size = 0

makes dwarf_next_cfi read one byte past the end:

    ERROR: AddressSanitizer: heap-buffer-overflow ... READ of size 1
        #0 dwarf_next_cfi libdw/dwarf_next_cfi.c:219

With the fix dwarf_next_cfi returns DWARF_E_INVALID_DWARF for that input,
and parsing of the .eh_frame data of normal binaries is unchanged
(libc.so, gcc and libelf.so all iterate without errors).

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
4 weeks agoconfigure: Remove rawmemchr decl check
Mark Wielaard [Sun, 28 Jun 2026 16:41:55 +0000 (18:41 +0200)] 
configure: Remove rawmemchr decl check

Commit b35e1ec43e93 ("libelf: Fix out-of-bounds read in elf_getarsym
for unterminated symbol table") removed the last usage of rawmemchr
from the codebase so we no longer need to check for it.

* configure.ac: Remove rawmemchr AC_CHECK_DECLS.

Signed-off-by: Mark Wielaard <mark@klomp.org>
4 weeks agolibelf: Fix out-of-bounds read in elf_getarsym for unterminated symbol table
Sayed Kaif [Sun, 28 Jun 2026 14:58:32 +0000 (20:28 +0530)] 
libelf: Fix out-of-bounds read in elf_getarsym for unterminated symbol table

elf_getarsym parses the archive symbol table (the "/" or "/SYM64/"
member).  After validating only the size of the index, it walks the
declared number of symbols and, for each one, computes a hash with
_dl_elf_hash and advances to the next name with rawmemchr (or an
open-coded loop on platforms without rawmemchr).  Both of these scan
for a terminating NUL byte without any bound.

Nothing guarantees that the string area following the offset table
actually contains that many NUL-terminated names, or any NUL at all.
A crafted archive whose symbol-table string area is not NUL terminated
makes the name scan run past the end of the heap buffer holding the
string data (or past the mapped file) -- an out-of-bounds read.

Remember the end of the string area and use a bounded memchr to locate
each name terminator.  If a name is not terminated within the string
area the archive is malformed, so fail with ELF_E_INVALID_ARCHIVE
instead of reading out of bounds.

Reproduced under AddressSanitizer with a crafted archive whose string
area contains no NUL byte:

  ==ERROR: AddressSanitizer: heap-buffer-overflow ... READ of size 1
    #0 _dl_elf_hash dl-hash.h:45
    #1 elf_getarsym elf_getarsym.c:294
  0 bytes after 116-byte region ... allocated by elf_getarsym.c:215

The function is reachable from eu-nm -s and eu-readelf, which call
elf_getarsym on untrusted .a files.

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
4 weeks agoPR34309: debuginfod: support relative source paths for reproducible builds
Frank Ch. Eigler [Wed, 24 Jun 2026 18:31:17 +0000 (14:31 -0400)] 
PR34309: debuginfod: support relative source paths for reproducible builds

Relaxed constraint checks in debuginfod-client and debuginfod-find to
allow relative source filenames (e.g. those starting with '.'  or
normal filenames), supporting binaries built with options like
-fdebug-prefix-map as one way to produce reproducible builds.  Note
that such paths will not generally be resolvable by debuginfod within
packages, nor if debuginfod's startup PWD is different from the build
tree.  This is a niche function only.

Added tests/testfile-debug-map{.c,.bz2} compiled with -fdebug-prefix-map
and tests/run-debuginfod-debug-map.sh to verify.

Signed-off-By: Frank Ch. Eigler <fche@redhat.com>
Reviewed-By: Aaron Merey <amerey@redhat.com>
4 weeks agox86: Fix out-of-bounds read of register table in sample_perf_regs_mapping
Naveed Khan [Mon, 22 Jun 2026 14:27:22 +0000 (19:57 +0530)] 
x86: Fix out-of-bounds read of register table in sample_perf_regs_mapping

x86_sample_perf_regs_mapping selects dwarf_to_perf from one of two
tables, regs_i386[] (9 entries) or regs_x86_64[] (17 entries), depending
on the sample ABI.  The final mapping loop was bounded by
ebl->frame_nregs and indexed dwarf_to_perf[i].  For the x86_64 backend
frame_nregs is 17, so when a sample carries PERF_SAMPLE_REGS_ABI_32
(is_abi32 true) the loop reads regs_i386[9..16], eight ints past the end
of the 9-element array.  The resulting out-of-bounds values are then used
to index perf_to_regs[].

The abi value originates from a perf sample and is passed unvalidated
through the public dwflst_perf_sample_getframes() API; it is never
checked against the backend ELF class.  Commit a532f8d hardened the
perf_to_regs[] write side but left this read overflow in place.

Bound the loop by the minimum of frame_nregs and the selected table
length.  Neither bound dominates: an i386 backend (frame_nregs 9)
handling an x86_64-ABI sample has frame_nregs < dwarf_to_perf_len, the
reverse of the overflow above, so MIN() is required rather than the table
length alone.  Computing the limit once also keeps the loop bound
invariant.

* backends/x86_initreg_sample.c: Include system.h for MIN.
(x86_sample_perf_regs_mapping): Compute dwarf_to_perf_len for the
selected table and bound the mapping loop by
MIN (ebl->frame_nregs, dwarf_to_perf_len).

Signed-off-by: Naveed Khan <naveed@digiscrypt.com>
Reviewed-by: Serhei Makarov <serhei@serhei.io>
4 weeks agoreadelf: Fix heap-buffer-overflow reading .debug_cu_index size table
Sujal Tuladhar [Wed, 24 Jun 2026 16:22:34 +0000 (22:07 +0545)] 
readelf: Fix heap-buffer-overflow reading .debug_cu_index size table

print_cu_index_section validated the .debug_cu_index/.debug_tu_index size
table against dataend using only a single row:

  lengths_end = lengths + section_count * 4;

but the size-table print loop iterates one row per used unit, with
prow = lengths + (row - 1) * section_count * 4 for row up to unit_count,
reading up to lengths + unit_count * section_count * 4.  For unit_count >= 2
this reads (unit_count - 1) * section_count * 4 bytes past the validated end
of the section -- a heap-buffer-overflow read reachable from a crafted
.dwp/ELF via 'eu-readelf --debug-dump=cu_index FILE' (or 'eu-readelf -w').

The offset table is not affected: its extent
(unit_count * section_count * off_bytes, which equals lengths) is already
validated against dataend.  Size lengths_end over all unit_count rows to
match, and guard the multiplication against overflow.

* src/readelf.c (print_cu_index_section): Size the size table over
all unit_count rows; add an overflow guard.

https://sourceware.org/bugzilla/show_bug.cgi?id=34317

Signed-off-by: Sujal Tuladhar <sujaltuladhar1231@gmail.com>
4 weeks agodwarf_tag.c: Fix __libdw_findabbrev race condition
Aaron Merey [Mon, 22 Jun 2026 03:44:42 +0000 (23:44 -0400)] 
dwarf_tag.c: Fix __libdw_findabbrev race condition

__libdw_findabbrev tries to prevent a time-of-check to time-of-use race
condition by double-checking whether the target abbrev entry has been read
into cu->abbrev_hash.  This double-check is conditional on all abbrev
entries having already been read (indicated by cu->last_abbrev_offset == -1).

This conditional double-check causes a race condition.  This can happen
when the current thread's first Dwarf_Abbrev_Hash_find call returns NULL
and, before the current thread can acquire the abbrev_lock mutex, another
thread reads the target entry into cu->abbrev_hash but does not end up
reading all entries.

In this case, the current thread skips double-checking cu->abbrev_hash
because cu->last_abbrev_offset != -1.  It then attempts to read any
remaining entries but fails to find the target entry because
cu->last_abbrev_offset has already advanced past it.  __libdw_findabbrev
then returns DWARF_END_ABBREV despite the presence of a valid entry.

Fix this by unconditionally double-checking cu->abbrev_hash after
acquiring abbrev_lock.

Signed-off-by: Aaron Merey <amerey@redhat.com>
5 weeks agotests: Make elf-from-memory testcase work on big endian setups users/mark/try-elf-from-memory-endian
Mark Wielaard [Sun, 21 Jun 2026 15:19:18 +0000 (17:19 +0200)] 
tests: Make elf-from-memory testcase work on big endian setups

We are providing structs for x86_64 (little endian). So make sure the
Ehdr and Phdr are always xlated to ELFDATA2LSB.

* tests/elf-from-memory.c (main): Call elf64_xlatetom.

Signed-off-by: Mark Wielaard <mark@klomp.org>
5 weeks agolibdwfl: fix OOB read in elf_from_remote_memory phdr check
Matej Smycka [Fri, 19 Jun 2026 22:06:50 +0000 (00:06 +0200)] 
libdwfl: fix OOB read in elf_from_remote_memory phdr check

phoff (e_phoff) comes straight from the untrusted file header, and the
sum is computed in unsigned 64-bit with no overflow check.

* libdwfl/elf-from-memory.c (elf_from_remote_memory): Use an
overflow-safe bound when checking whether the phdrs are already
in the initial read.
* tests/elf-from-memory.c: New file.
* tests/Makefile.am (check_PROGRAMS): Add elf-from-memory.
(TESTS): Likewise.
(elf_from_memory_LDADD): New variable.

Signed-off-by: Matej Smycka <matejsmycka@gmail.com>
5 weeks agolibdw: Fix out-of-bounds write parsing .debug_macro opcode table
Sayed Kaif [Sat, 20 Jun 2026 17:56:16 +0000 (23:26 +0530)] 
libdw: Fix out-of-bounds write parsing .debug_macro opcode table

A crafted .debug_macro section with opcode 0 makes (opcode - 1) wrap
to 0xFFFFFFFF in the unsigned array index, writing a 16-byte struct
past the 255-element op_protos array. Reject opcode == 0 and add the
missing readp >= endp checks before reading the count and opcode
bytes.

* libdw/dwarf_getmacros.c (get_macinfo_table): Reject opcode 0,
add bounds checks.
* tests/testfile-macros-opcode0.bz2: New test input.
* tests/run-dwarf-getmacros.sh: Test it.
* tests/Makefile.am (EXTRA_DIST): Add new test file.

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
5 weeks agolibdwfl: Skip segment that starts past contents_size in elf-from-memory
Sayed Kaif [Wed, 17 Jun 2026 10:31:45 +0000 (16:01 +0530)] 
libdwfl: Skip segment that starts past contents_size in elf-from-memory

When rebuilding an ELF from process memory, segments_end used the last
PT_LOAD segment's end rather than the largest, so a later smaller
segment could shrink contents_size below an earlier segment's start,
underflowing end - start into a huge length and overflowing the heap
buffer. Skip any segment that starts past contents_size, matching the
guard already used in dwfl_segment_report_module.

* libdwfl/elf-from-memory.c (elf_from_remote_memory): Skip
out-of-range segment.

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
5 weeks agox86: Fix out-of-bounds heap write in sample_perf_regs_mapping
Sayed Kaif [Fri, 19 Jun 2026 08:49:45 +0000 (14:19 +0530)] 
x86: Fix out-of-bounds heap write in sample_perf_regs_mapping

x86_sample_perf_regs_mapping initialized perf_to_regs[] only up to the
highest set bit of perf_regs_mask, but indexed it with dwarf_to_perf[i]
values up to PERF_REG_X86_64_MAX-1. For a sample carrying only the base
GP registers the upper slots stay uninitialized, and the resulting index
j was used unchecked to write cached_regs_mapping[j], a count-element
calloc buffer. Initialize the whole perf_to_regs[] array to -1, bounds-
check j before the write, and check calloc for failure.

* backends/x86_initreg_sample.c (x86_sample_perf_regs_mapping):
Initialize full perf_to_regs array, bounds-check index, check
calloc result.

Signed-off-by: Sayed Kaif <skaif@digiscrypt.com>
5 weeks agoelfcompress: Handle existing output files (symlinks)
Mark Wielaard [Thu, 11 Jun 2026 16:45:20 +0000 (18:45 +0200)] 
elfcompress: Handle existing output files (symlinks)

With -o elfcompress opens the output file with O_WRONLY and O_CREAT.
If the output file already existed then without O_TRUNC the file is
written from the start, but keeps all existing data. That means the
file might contain extra data if the (compressed) ELF file is shorter
than the existing file. Without -o the input file is the output file
and we create a temp file to create the output which should then be
atomically replaced using rename. This might fail when the input file
was a symlink (to a file in a different directory.)

An additional complication is that we were using full path based calls
for open, rename and unlink (in case we had to remove the file again).
This can go wrong if between the open and the unlink a path element is
changed by a different process. To prevent renaming or unlinking the
wrong file we have to first open the target directory and only then
create a file inside it with openat. And use the directory fd with
renameat or unlinkat when we have to rename or delete the file.

So to solve all these issues we first try to pin the directory of the
output file. Then try to open the output file with O_EXCL. Which makes
sure we created the file so we can write directly to it. If that fails
then the output file already exists. Then we first resolve the full
file path (in case the output file is a symlink) and then open the
(resolved) directory where the output should go. We then make sure to
create a temporary file inside this directory using a new system.h
helper function xmkstempat. Finally, after the output file is fully
created (and flushed out to disk) we use renameat to atomically
replace the output file with our temp file. Since we still have the
directory open this works even if the file path is changed while
creating the temp file data. On failure we use unlinkat with the
directory fd to remove the output file.

Add a new run-compress-test-out.sh testcase for input and/or output
file being symlinks and/or pointing to the same file.

* configure.ac: Check for getentropy, sys/random.h and
getrandom.
* lib/system.h (read_retry): New static inline function.
(xrandom64): Likewise.
(xmkstempat): Likewise.
* src/elfcompress.c (process_file): Declare new variables to
keep copies of the (ouput) directory, dirfd, base file and
temporary file name. Track whether we need to unlink_fnew. Fix
trailing \n in error fmt. Call open with O_EXCL for output
file. Use realpath and xmkstempat if output file exists. fsync
temp file before caling renameat. Use unlinkat in
cleanup. close and free new temporaries.
* tests/run-compress-test-out.sh: New test file.
* tests/Makefile.am (TESTS): Add new test file.
(EXTRA_DIST): Likewise.

Signed-off-by: Mark Wielaard <mark@klomp.org>
5 weeks agoversion.h: Add _ELFUTILS_THREAD_SAFE
Aaron Merey [Mon, 15 Jun 2026 23:58:55 +0000 (19:58 -0400)] 
version.h: Add _ELFUTILS_THREAD_SAFE

Currently there is no API for applications to detect whether elfutils
libraries are built with thread safety support enabled (via the
--enable-thread-safety configure option).

Add macro _ELFUTILS_THREAD_SAFE to version.h.  This macro is set to 1
if thread safety support is enabled.  If thread safety support is not
enabled then this macro is left undefined.

Signed-off-by: Aaron Merey <amerey@redhat.com>
6 weeks agodebuginfod-client.c: Set CURLOPT_CONNECTTIMEOUT_MS
Aaron Merey [Mon, 15 Jun 2026 02:43:55 +0000 (22:43 -0400)] 
debuginfod-client.c: Set CURLOPT_CONNECTTIMEOUT_MS

If the $DEBUGINFOD_TIMEOUT environment variable is set then it is applied
to CURLOPT_LOW_SPEED_TIME/_LIMIT in init_handle().  This causes a server
to be skipped if it does not transfer 100K of data within the given timeout.

CURLOPT_LOW_SPEED_TIME/_LIMIT begins tracking this timeout only after the
connection to a server has been established.  This results in
$DEBUGINFOD_TIMEOUT failing to be enforced if a server is unresponsive
when attempting to establish connection.

Fix this by also setting CURLOPT_CONNECTTIMEOUT_MS with the
$DEBUGINFOD_TIMEOUT as well.

CURLOPT_CONNECTTIMEOUT_MS uses type long. If converting the timeout to
milliseconds will exceed LONG_MAX, then set CURLOPT_CONNECTTIMEOUT_MS to
LONG_MAX.

https://sourceware.org/bugzilla/show_bug.cgi?id=34158

Signed-off-by: Aaron Merey <amerey@redhat.com>
8 weeks agoriscv_disasm.c: Fix out-of-bounds reads
Aaron Merey [Mon, 1 Jun 2026 01:54:53 +0000 (21:54 -0400)] 
riscv_disasm.c: Fix out-of-bounds reads

The riscv_disasm function reads instruction mnemonics from static
arrays based on the Control and Status Register (CSR) number encoded
in an instruction.  Two separate bounds checks performed before reading
from these arrays had incorrect upper bounds and allowed out-of-bounds
reads.

Fix two CSR bounds checks to prevent this. The affected CSR numbers that
are no longer included in the modified checks are now properly handled
in a generic CSR handler in the riscv_disasm function.

Signed-off-by: Aaron Merey <amerey@redhat.com>
2 months agoelfcompress: Handle shstrtab/symtab names more consistently
Mark Wielaard [Tue, 26 May 2026 16:18:25 +0000 (18:18 +0200)] 
elfcompress: Handle shstrtab/symtab names more consistently

We track the shstrtab and symtab section names in case they need to be
renamed. These names are sometimes assigned a static string (from the
shstrtab string pool), sometimes created as a copy of an existing
string name and sometimes created by constructing a new string. This
means they might leak because they are never freed.

Fix this leak by defining the variables early (as NULL) before looping
over all sections, making sure to always assign a allocated (copy) of
the (new) name and explicitly free them at cleanup (run both on
success and failure).

This makes it easier to reason about allocation status and string
"ownership" making it easy to see there are no memory issues even in
the rare case of a .[z]debug section being used as a symtab or
shstrtab table (which is why there is no testcase, because it is
questionable whether such a file is actually valid).

* src/elfcompress.c (process_file): Define shstrtab_name,
shstrtab_newname, symtab_name and symtab_newname
early. xstrdup shstrtab_name and symtab_name if they were
assigned to a static string. Free all four strings at
cleanup.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agolibelf: Get orig_addralign the same way for 32/64 bit ELF in elf_compress
Mark Wielaard [Mon, 18 May 2026 16:47:21 +0000 (18:47 +0200)] 
libelf: Get orig_addralign the same way for 32/64 bit ELF in elf_compress

Depending on whether the ELF was 32 or 64 bit elf_compress would get
the original sh_addralign, as embedded in the Chdr, differenly. For
64bit ELF we would simply get the sh_addralign from the Shdr. For
32bit ELF we would take the (max) alignment of the underlying
Elf_Data, provided by __libelf_compress. Use the second method for
both since the Shdr might not have been setup yet, so what counts is
the Elf_Data alignment.

* libelf/elf_compress.c (elf_compress): Remove sh_addralign.
Set chdr.ch_addralign to orig_addralign in 64bit case.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agoelfcompress: Fix off-by-one sanity check
Mark Wielaard [Mon, 18 May 2026 18:14:44 +0000 (20:14 +0200)] 
elfcompress: Fix off-by-one sanity check

The elf ndx should not be bigger than, or equal to shnum. This really
should never trigger unless elf_ndx and/or elf_getshdrnum is buggy.

* src/elfcompress.c (process_file): Check ndx >= shnum.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agoelfcompress: Don't over allocate sections bitmap
Mark Wielaard [Mon, 18 May 2026 17:33:26 +0000 (19:33 +0200)] 
elfcompress: Don't over allocate sections bitmap

In process_file we allocate a bitmap sections to track which sections
we want to (de)compress. This allocates shnum / 8 + 1 unsigned
ints. But an unsigned int can contain more bits than just 8. In all
other places we use WORD_BITS defined as 8U * sizeof (unsigned int).
Also use WORD_BITS to calculate how many unsigned ints we need for the
sections bitmap.

* src/elfcompress.c (process_file): Use shnum / WORD_BITS + 1
to allocate sections.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agolibelf: Check uncompressed gnu size fits into d_size for ELF class
Mark Wielaard [Mon, 18 May 2026 15:25:18 +0000 (17:25 +0200)] 
libelf: Check uncompressed gnu size fits into d_size for ELF class

32bit ELF can only represent up to UINT32_MAX bytes in d_size. Sanity
check that the uncompressed size isn't bigger so we don't silently
truncate it.

* libelf/elf_compress_gnu.c (elf_compress_gnu): Check gsize
fits UINT32_MAX for ELFCLASS32.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agodwarf_getsrclines.c: Restore initialization of debug_str_offset
Aaron Merey [Thu, 14 May 2026 21:12:59 +0000 (17:12 -0400)] 
dwarf_getsrclines.c: Restore initialization of debug_str_offset

Prior to commit d4b0848b ("libdw: dwarf_getsrcfiles should not imply
dwarf_getsrclines") debug_str_offset was initialized with a default
value of 0.  This default initialization was removed as part of the
refactor introduced in d4b0848b.

Restore debug_str_offset's default initialization to 0.  For a
well-formed binary, it wasn't possible to use debug_str_offset
uninitialized.  The value is only relevant for line headers using
NVIDIA's CUBIN extension, in which case the real offset was always
stored in debug_str_offset before use.  However it's possible for a
malformed binary to cause uninitialized use and static analyzers
may complain about this.

Signed-off-by: Aaron Merey <amerey@redhat.com>
2 months agodebuginfod: Don't trust x-debuginfod-size in debuginfod_validate_imasig
Mark Wielaard [Wed, 13 May 2026 15:56:18 +0000 (17:56 +0200)] 
debuginfod: Don't trust x-debuginfod-size in debuginfod_validate_imasig

Double check file size the server sent against the file size we
actually got in debuginfod_validate_imasig. So we check the signature
over the whole file size as we received it. Otherwise we might be
creating a hash over a shorter (possibly zero sized) data. This makes
sure the server sents a signature that should match the full file (and
not just an arbitrary shorter prefix).

* debuginfod/debuginfod-client.c (debuginfod_validate_imasig):
Call fstat on fd and check x-debuginfod-size equals received
file size.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agodebuginfod-client: Use CURLOPT_MAXREDIRS
Mark Wielaard [Wed, 13 May 2026 13:57:57 +0000 (15:57 +0200)] 
debuginfod-client: Use CURLOPT_MAXREDIRS

Guard against bad servers. Older libcurl allowed unlimited
redirects. Newer libcurl default to max 30. Explicitly set
CURLOPT_MAXREDIRS to 6 (twice the number of redirects that seems
"reasonable"). This guards against badly setup servers that keep
redirecting. https://curl.se/libcurl/c/CURLOPT_MAXREDIRS.html

* debuginfod/debuginfod-client.c (init_handle): Add
CURLOPT_MAXREDIRS curl_easy_setopt_ck.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agotests/Makefile.am: Add --track-destroy=yes to valgrind_cmd
Aaron Merey [Fri, 1 May 2026 17:11:47 +0000 (13:11 -0400)] 
tests/Makefile.am: Add --track-destroy=yes to valgrind_cmd

Add --track-destroy=yes to valgrind_cmd when --tool=helgrind.  This
reports missing pthread_{mutex,rwlock}_destroy calls when a lock is
initialized at the address of a live rwlock or mutex.

Signed-off-by: Aaron Merey <amerey@redhat.com>
2 months agosrc/strip.c: Unconditionally re-iterate when preserving sh_link/sh_info
Aaron Merey [Sun, 10 May 2026 20:13:02 +0000 (16:13 -0400)] 
src/strip.c: Unconditionally re-iterate when preserving sh_link/sh_info

handle_elf may perform multiple iterations over section headers to
ensure that if a section is included in the debug file, then its
sh_link and sh_info sections are also included in the debug file.

handle_elf contains an optimization where an additional iteration may
be avoided if the sh_link or sh_info of a section marked for inclusion
in the main elf file have yet to be investigated by the current iteration.
The additional iteration is scheduled only if the loop index 'cnt' has
already passed the sh_link or sh_info.

This optimization can cause a bug where the sh_link or sh_info of
a section in the debug file may not be present in the debug file.

sh_link/sh_info cross references between .symtab and .rel.* sections
might be ordered such that .symtab is marked for stripping while iterating
over all the .rel.debug_* sections that reference .symtab in their sh_link,
resulting in no additional debug-preservation handling for .symtab.
However, it's possible later in the loop for a .rel.* section to refer
to an allocated section via sh_info and .symtab via sh_link.  In this case,
.symtab gets marked for preservation in the main elf file.  If no other
.rel.debug_* sections are encountered for the rest of the iteration, then
debug-preservation isn't triggered for .symtab.  This results in the debug
file containing a NOBITS .symtab despite .rel.debug_* sections referencing
.symtab in their sh_link.  If --reloc-debug-sections is given, a segfault
or error may occur when attempting to resolve these relocations.

Fix this by unconditionally scheduling another iteration across section
headers when an sh_link or sh_info gets flagged for inclusion in the main
elf file.

For the above case, the additional iteration will trigger debug-preservation
for .symtab upon detection that a .rel.debug_* sh_link is being kept in the
main elf file.  .symtab will then be present in both the main elf file and
debug file.

https://sourceware.org/bugzilla/show_bug.cgi?id=34097

Signed-off-by: Aaron Merey <amerey@redhat.com>
2 months agobackends/i386_reloc.def: Fix entry for R_386_TLS_DESC
Sergei Zimmerman [Tue, 12 May 2026 21:11:51 +0000 (21:11 +0000)] 
backends/i386_reloc.def: Fix entry for R_386_TLS_DESC

This dynamic relocation can appear in shared libraries.

Fixes run-elflint-self.sh and run-reverse-sections-self.sh self-tests
when built with -mtls-dialect=gnu2 on i386.

Signed-off-by: Sergei Zimmerman <sergei@zimmerman.foo>
2 months agolibebl: Handle calloc failure in ebl_sample_perf_regs_mapping
Mark Wielaard [Mon, 4 May 2026 15:55:03 +0000 (17:55 +0200)] 
libebl: Handle calloc failure in ebl_sample_perf_regs_mapping

* libebl/eblinitreg_sample.c (ebl_sample_perf_regs_mapping):
Return false when calloc fails and only set
cached_perf_regs_mask on success.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agolibdw: Check .debug_line header field minimum_instr_len fits unit data
Mark Wielaard [Sat, 9 May 2026 16:33:36 +0000 (18:33 +0200)] 
libdw: Check .debug_line header field minimum_instr_len fits unit data

* libdw/dwarf_getsrclines.c (read_line_header): Add lineendp
check before reading minimum_instr_len byte.

Reported-by: Karan Kurani <karankurani3k@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
2 months agopo: Add Georgian (ka) translation
Ekaterine Papava [Tue, 5 May 2026 14:23:01 +0000 (16:23 +0200)] 
po: Add Georgian (ka) translation

ChangeLog:
* po/ka.po: New file, Georgian translation.
* po/LINGUAS: Add ka.

Signed-off-by: Ekaterine Papava <papava.e@gtu.ge>
2 months agolibdwfl: Fix out of memory handling in link_map.c report_r_debug
Mark Wielaard [Mon, 4 May 2026 15:26:14 +0000 (17:26 +0200)] 
libdwfl: Fix out of memory handling in link_map.c report_r_debug

In report_r_debug we don't fully handle an out of memory condition
when trying to allocate memory for the r_debug_info_module struct.
Deallocated allocated buffers and return -1 immediately instead of
trying to continue.

* libdwfl/link_map.c (report_r_debug): Call release_buffer
with -1 and return on malloc failure.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agoconfig: Remove empty /* */ comment from known-dwarf.awk
Mark Wielaard [Mon, 20 Apr 2026 10:40:50 +0000 (12:40 +0200)] 
config: Remove empty /* */ comment from known-dwarf.awk

gawk 5.4 doesn't like C++ style comments.

gawk: ../config/known-dwarf.awk:29: error: ? * + or {interval} not
      preceded by valid subpattern: /* */

It was an empty comment anyway, so just remove it.

* config/known-dwarf.awk: Remove empty C++ style comment.

Reviewed-by: Sam James <sam@gentoo.org>
Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agoPrepare for 0.195 elfutils-0.195
Aaron Merey [Wed, 15 Apr 2026 21:06:12 +0000 (17:06 -0400)] 
Prepare for 0.195

Set version to 0.195.
Update NEWS, elfutils.spec.in, configure.ac and printversion.c.
Regenerate po/*.po files

Signed-off-by: Aaron Merey <amerey@redhat.com>
3 months agoconfig/elfutils.spec.in: package gelf.3 in %files
Aaron Merey [Wed, 15 Apr 2026 17:39:00 +0000 (13:39 -0400)] 
config/elfutils.spec.in: package gelf.3 in %files

"gelf_*.3*" is the glob intended to include all gelf man pages in %files.
Man page gelf.3 was recently added and does not match the glob.  Fix
this by also including "gelf.3*" in %files.

Signed-off-by: Aaron Merey <amerey@redhat.com>
3 months agodoc: Update libelf.3 with gelf.h information
Aaron Merey [Mon, 10 Nov 2025 04:40:01 +0000 (23:40 -0500)] 
doc: Update libelf.3 with gelf.h information

Signed-off-by: Aaron Merey <amerey@redhat.com>
3 months agosrc/stacktrace.c: Enable ARM support
Serhei Makarov [Mon, 23 Mar 2026 18:53:56 +0000 (14:53 -0400)] 
src/stacktrace.c: Enable ARM support

Since we plan to replace stacktrace with stackprof (& the associated
test case) in a subsequent patchset, this is a minimal patch to
illustrate where the existing code using libdwfl_stacktrace needs to
generalize.

* configure.ac: Expand ac_cv_has_asm_x86_perf_regs_h
  to ac_cv_has_compat_asm_perf_regs_h also allowing arm/arm64.
* src/stacktrace.c: Enable for ARM architectures.
  (expected_frame_nregs): New function.
  (sp_reg_index): New function.
  (sysprof_find_dwfl): Replace hardcoded SP index with new functions.
  (sysprof_unwind_frame_cb): Likewise.
  (main): Open default_ebl backend appropriate to the current arch.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
3 months agobackends/: add 32-bit ARM sample_regs support
Serhei Makarov [Fri, 6 Mar 2026 20:49:45 +0000 (15:49 -0500)] 
backends/: add 32-bit ARM sample_regs support

After developing the common pieces in prior patches, adding register
sample support for another architecture is fairly predictable. Here we
add support for 32-bit ARM.

* backends/Makefile.am (arm_SRCS): Add arm_initreg_sample.c.
* backends/arm_init.c (arm_init): Add hooks for
  sample_sp_pc, perf_frame_regs_mask.
* backends/arm_initreg_sample.c: New file. Use default
  arm_set_initial_registers_sample implementation.
* backends/libebl_PERF_FLAGS.h (PERF_FRAME_REGISTERS_ARM): New
  constant describing registers needed for 32-bit arm unwinding.  Also
  define it on 64-bit arm to allow profiling programs running in 32-bit
  compatibility mode.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
3 months agobackends/: should use size_t n_regs_mapping for *_sample_sp_pc
Serhei Makarov [Fri, 6 Mar 2026 20:25:16 +0000 (15:25 -0500)] 
backends/: should use size_t n_regs_mapping for *_sample_sp_pc

These should have been size_t all along, matching the public
libdwfl_stacktrace dwflst_sample_getframes interface. Fix.

* backends/aarch64_initreg_sample.c (aarch64_sample_sp_pc): Fixup
  argument type for n_regs_mapping.
* backends/i386_initreg_sample.c (i386_sample_sp_pc): Fixup argument
  type for n_regs_mapping.
* backends/libebl_PERF_FLAGS.h (generic_sample_sp_pc): Fixup argument
  type for n_regs_mapping, adjust loop index var accordingly.
* backends/x86_64_initreg_sample.c (x86_64_sample_sp_pc): Fixup
  argument type for n_regs_mapping.
* libebl/ebl-hooks.h (sample_sp_pc): Fixup argument type for
  n_regs_mapping.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
3 months agolibebl/eblinitreg_sample.c: fix a potential off-by-one error
Serhei Makarov [Fri, 6 Mar 2026 17:21:47 +0000 (12:21 -0500)] 
libebl/eblinitreg_sample.c: fix a potential off-by-one error

I believe the way things were setup on x86 meant this never triggered
(since n_regs == n_regs_mapping, the for loop would stop at the
correct moment), but the logic here looks clearly incorrect for the
general case. Fix.

* libebl/eblinitreg_sample.c (ebl_set_initial_registers_sample):
  Be sure to break when i == n_regs_mapping, which is out of range.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
3 months agobackends/: fixup x86 initreg_sample to share code with aarch64
Serhei Makarov [Fri, 6 Mar 2026 17:33:49 +0000 (12:33 -0500)] 
backends/: fixup x86 initreg_sample to share code with aarch64

A bunch of x86 sample_regs code should be common across
architectures. In particular, sample_sp_pc() implementation looks to
be universally applicable apart from the register positions.

* backends/x86_initreg_sample.c (x86_sample_sp_pc): Remove in favour
  of generic_sample_sp_pc (added to libebl_PERF_FLAGS.h in prev patch).
  (x86_sample_perf_regs_mapping): This should have been an inline
  function. Fix.
* backends/i386_init.c (i386_init): Use
  __libebl_init_cached_regs_mapping.
* backends/x86_64_init.c (x86_64_init): Use
  __libebl_init_cached_regs_mapping.
* backends/i386_initreg_sample.c (i386_sample_sp_pc): Use
  generic_sample_sp_pc.
* backends/x86_64_init.c (x86_64_initreg_sample): Use
  generic_sample_sp_pc.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
3 months agobackends/: add aarch64 sample_regs support
Serhei Makarov [Fri, 6 Mar 2026 17:10:29 +0000 (12:10 -0500)] 
backends/: add aarch64 sample_regs support

Expanding the libdwflst support for handling perf sample_regs register
files to other architectures. First, add the pieces for aarch64.

* backends/Makefile.am (aarch64_SRCS): Add aarch64_initreg_sample.c.
* backends/aarch64_init.c (aarch64_init): Add hooks for
  set_initial_registers_sample, sample_sp_pc, perf_frame_regs_mask.
* backends/aarch64_initreg_sample.c: New file. Implement
  aarch64_set_initial_registers_sample mirroring the ptrace->dwarf_regs
  logic in aarch64_initreg.c.
* backends/libebl_PERF_FLAGS.h (PERF_FRAME_REGISTERS_AARCH64): New
  constant describing registers needed for aarch64 unwinding.
  (generic_sample_sp_pc): New inline function generalizing existing
  x86_sample_sp_pc code to any arch given sp_index and pc_index.
* libebl/eblinitreg_sample.c (ebl_sample_perf_regs_mapping): Update
  with a default implementation for arches where perf_regs and
  dwarf_regs order coincides (we just need the mapping to account for
  present/absent registers in perf_regs mask).
* libebl/eblopenbackend.c (__libebl_init_cached_regs_mapping): New
  function generalizing a bit of ARCH_init regs_mapping boilerplate.
* libebl/eblopenbackend.c (__libebl_init_cached_regs_mapping):
  Implement new function.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
3 months agolibdw: Recognize .debug_dwp section in scn_dwarf_type as TYPE_DWO
Mark Wielaard [Mon, 13 Apr 2026 21:30:45 +0000 (23:30 +0200)] 
libdw: Recognize .debug_dwp section in scn_dwarf_type as TYPE_DWO

dwarf_begin_elf tries to guess what type of Dwarf we have. When it
sees a .debug_dwp section it assumed it was TYPE_PLAIN instead of
TYPE_DWO and would try to find more "plain" .debug sections (ignoring
other .dwo sections). This would cause it to not detect any debug
sections in a .dwp file containing a .debug_dwp section.

* libdw/dwarf_begin_elf.c (scn_dwarf_type): Recognize
.debug_dwp or .zdebug_dwp sections.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agoelf_newdata: Make sure to set d_type to ELF_T_BYTE and d_align to one
Mark Wielaard [Mon, 13 Apr 2026 12:29:27 +0000 (14:29 +0200)] 
elf_newdata: Make sure to set d_type to ELF_T_BYTE and d_align to one

If d_align isn't explicitly set in elf_newdata it will default to
zero. This confuses elf_update when more than one Elf_Data has been
added to a (new) Elf_Section. Only the last will appear to be added.
ELF_T_BYTE happens to be zero and so d_type did appear to be setup
correctly. Also set it explicitly to show the defaults.

The elf_newdata test happened to pass because it set d_align to 1
explicitly. But would fail if it wouldn't set it. Add some extra
checks.

Also update the elf_newdata man page with the new defaults.

* libelf/elf_newdata.c (elf_newdata): Explicitly set d_type
and d_align.
* tests/newdata.c (add_section_data): Check d_buf, d_size,
d_type, d_align and d_version default values.
* doc/elf_newdata.3: Document d_align defaults to one.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agoconfig: Make known-dwarf work for DW_SECT
Mark Wielaard [Thu, 26 Mar 2026 13:43:11 +0000 (14:43 +0100)] 
config: Make known-dwarf work for DW_SECT

DW_SECT enum names end in all UPPERCASE which confuses the awk script.

* config/known-dwarf.awk: Recognize DW_SECT_ as SECT set.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agoelflint: Recognize debug dwo sections
Mark Wielaard [Thu, 9 Apr 2026 12:40:44 +0000 (14:40 +0200)] 
elflint: Recognize debug dwo sections

.debug dwo sections can include the SHF_EXCLUDE flag to indicate that
the linker shouldn't process them. Also a .debug_str.dwo section is
like a normal .debug_str section. There is no .debug_line_str.dwo
section, so that doesn't need special casing.

Add some dwo files to run-elflint-test.sh to make sure debug files
with .dwo sections aren't flagged by eu-elflint with --gnu --debug.

* src/elflint.c (special_sections): Add .debug_str.dwo.
(IS_DEBUG_DWO): New macro.
(check_sections): For IS_DEBUG_DWO files allow SHF_EXCLUDE.
* tests/run-elflint-test.sh: Add .dwo testfiles.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agodebuginfod: Add a flag to limit scan depth
Roman Bolshakov [Wed, 8 Apr 2026 02:19:56 +0000 (07:19 +0500)] 
debuginfod: Add a flag to limit scan depth

As of now the scanner may consume a lot of time, descending deep into
irrelevant directories where no build artifacts are known to be stored.

The change introduces --max-depth flag that has semantics similar to
-maxdepth in GNU find.

Signed-off-by: Roman Bolshakov <rbolshakov@ddn.com>
3 months agolibebl: Explicitly check Ehdr can be used in eblopenbackend
Mark Wielaard [Tue, 7 Apr 2026 13:25:53 +0000 (15:25 +0200)] 
libebl: Explicitly check Ehdr can be used in eblopenbackend

Make sure Ehdr is really read into memory, don't use internal elf
state.

* libebl/eblopenbackend.c (openbackend): Use gelf_getehdr
instead of accessing elf state ehdr field directly.

https://sourceware.org/bugzilla/show_bug.cgi?id=34007

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agoreadelf: print .debug_cu_index and .debug_tu_index sections
Mark Wielaard [Mon, 23 Mar 2026 18:01:53 +0000 (19:01 +0100)] 
readelf: print .debug_cu_index and .debug_tu_index sections

DWARF Package files (.dwp) might contain a .debug_cu_index and/or
.debug_tu_index section. Print the contents of these sections. Handles
version 2 (DWARF4 + GNU Debugfission extension), version 5
(standardized) and version 6 (prelimenary, adds 64bit offsets).  Use
the existing dwp4 and dwp5 testfiles.

* src/readelf.c (options): Add cu_index to debug-dump docs.
(section_e): Add section_cu_index.
(section_all): Likewise.
(parse_opt): handle "cu_index" arg for debug-dump.
(dwarf_section_short_string): New static function.
(print_cu_index_section): Likewise.
(print_debug): Move up implicit_info and explicit_info. Only
search for skeleton file if .debug_info is needed. Handle both
.debug_cu_index and .debug_tu_index through
print_cu_index_section.
* tests/run-readelf-cu-index.sh: New test.
* tests/Makefile.am (TESTS): Add run-readelf-cu-index.sh.
(EXTRA_DIST): Likewise.

Signed-off-by: Mark Wielaard <mark@klomp.org>
3 months agodebuginfod: add metadata query by buildid
Josef Cejka [Wed, 18 Mar 2026 11:02:13 +0000 (12:02 +0100)] 
debuginfod: add metadata query by buildid

This patch extends current metadata by search by buildid.
It allows clients to query for all packages (with exact versions)
and files associated with a specific buildid.

I'd like to use the exact package versions during core dump
analysis to match them with already known issues/bugs,
to check that involved packages are reasonable up-to-date
and to identify other invalid setup, such as mixing packages
from different Linux distros.

Search by buildid prepares alternative db query, handling
of results incl. gathering results from federated servers
remains the same.
It does not search for source files or source file archives.

Signed-off-by: Josef Cejka <jcejka@suse.de>
4 months agodebuginfod: Make sure PATH_MAX exists in debuginfod-client.c
Mark Wielaard [Thu, 26 Mar 2026 12:32:18 +0000 (13:32 +0100)] 
debuginfod: Make sure PATH_MAX exists in debuginfod-client.c

Some systems (Hurd) don't define PATH_MAX (which is optional according
to POSIX). Make sure it is defined and no special linux specific
headers are used in debuginfod-client.c.

* debuginfod/debuginfod-client.c: Include limits.h instead of
linux/limits. If PATH_MAX isn't define it to 4K (the default
on GNU/Linux).

https://sourceware.org/bugzilla/show_bug.cgi?id=34016

Signed-off-by: Mark Wielaard <mark@klomp.org>
4 months agoreadelf: Print split DWARF CU version, unit type and id
Mark Wielaard [Sat, 21 Mar 2026 22:56:58 +0000 (23:56 +0100)] 
readelf: Print split DWARF CU version, unit type and id

When printing the split units we reused the version, unit type and id
found in the skeleton unit. The version and id really should match,
but the unit type shouldn't. We could hard code the expected values,
but it is better to look them up explicitly. One testcase needed
updating to show the correct split_compile unit type.

* src/readelf.c (print_debug_units): Call dwarf_cu_die and
dwarf_cu_info to explicitly fetch split_version,
split_unit_type and split_unit_id.
* tests/run-readelf-loc.sh: Adjust Unit type.

Signed-off-by: Mark Wielaard <mark@klomp.org>
4 months agoelflint: add additional lints to LOAD, INTERP and PHDR segments
Fabian Rast [Fri, 20 Mar 2026 13:50:35 +0000 (14:50 +0100)] 
elflint: add additional lints to LOAD, INTERP and PHDR segments

* src/elflint.c (check_program_header):
- PT_PHDR may not occur more than once
- PT_INTERP must precede any loadable segment entry
- PT_LOAD entries must be sorted on the p_vaddr member

Signed-off-by: Fabian Rast <fabian.rast@tum.de>
4 months agolibdwfl/linux-pid-attach.c PR33974: __libdwfl_set_initial_registers_thread on non...
Serhei Makarov [Fri, 13 Mar 2026 15:06:03 +0000 (11:06 -0400)] 
libdwfl/linux-pid-attach.c PR33974: __libdwfl_set_initial_registers_thread on non-Linux

libdwfl_stacktrace uses __libdwfl_set_initial_registers_thread but it
is wrapped by #ifdef __linux__, causing build errors on non-Linux
platforms.

* linux-pid-attach.c (__libdwfl_set_initial_registers_thread):
  Remove from inside the '#ifdef __linux__'.
* dwfl_frame_regs.c (__libdwfl_set_initial_registers_thread):
  Move here.

Tested-by: Sam James <sam@gentoo.org>
Signed-off-by: Serhei Makarov <serhei@serhei.io>
4 months agodebuginfod-client.c: Add dummy debuginfod_default_progressfn
Aaron Merey [Thu, 19 Mar 2026 14:12:18 +0000 (10:12 -0400)] 
debuginfod-client.c: Add dummy debuginfod_default_progressfn

debuginfod_default_progressfn was added without a corresponding dummy
variant, causing an error when building with --disable-debuginfod and
--enable-libdebuginfod=dummy.

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodebuginfod-find: Restore DEBUGINFOD_PROGRESS behaviour
Aaron Merey [Wed, 11 Mar 2026 14:13:54 +0000 (10:13 -0400)] 
debuginfod-find: Restore DEBUGINFOD_PROGRESS behaviour

Commit d7cb72f7 changed debuginfod-find to always set a progress
callback function in order to handle interrupts during downloading.

Previously debuginfod-find set a progressfn only when the -v command
line option was given.  If the DEBUGINFOD_PROGRESS environment variable
is set, libdebuginfod automatically sets a default progressfn as long as
no other progressfn has been set using debuginfod_set_progressfn.

Commit d7cb72f7 therefore resulted in DEBUGINFOD_PROGRESS no longer
affecting debuginfod-find when invoked without -v.

This patch restores the old behaviour: when DEBUGINFOD_PROGRESS is set
and -v is not given, the default progressfn will trigger during
downloading.

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agolibdebuginfod: Add the default progress callback function to the public API
Aaron Merey [Wed, 11 Mar 2026 14:01:38 +0000 (10:01 -0400)] 
libdebuginfod: Add the default progress callback function to the public API

Rename default_progressfn to debuginfod_default_progressfn and expose it
in libdebuginfod's public API.  Previously this function could only be
indirectly invoked by clients by setting the DEBUGINFOD_PROGRESS
environment variable and not explicitly setting a progress callback
function with debuginfod_set_progressfn.

The purpose of this change is to make debuginfod_default_progressfn
directly callable so that custom progress callback functions can
delegate progress reporting to it.

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agogelf_update_move.c: Handle ELFCLASS32 and ELFCLASS64 separately
Aaron Merey [Fri, 13 Mar 2026 21:46:48 +0000 (17:46 -0400)] 
gelf_update_move.c: Handle ELFCLASS32 and ELFCLASS64 separately

Similar to commit c460e2088, gelf_update_move does not distinguish
between ELFCLASS32 and ELFCLASS64 binaries.

The code assumes that Elf32_Move and Elf64_Move structs are the same
size but they are not. The m_info and m_poffset fields have type
uint32_t for Elf32_Move but uint64_t for Elf64_Move.

Fix this by handling ELFCLASS32 and ELFCLASS64 cases separately.

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_checksum.3
Aaron Merey [Thu, 1 Jan 2026 02:50:45 +0000 (21:50 -0500)] 
doc: Add gelf_checksum.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_auxv.3
Aaron Merey [Thu, 1 Jan 2026 02:50:44 +0000 (21:50 -0500)] 
doc: Add gelf_update_auxv.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getauxv.3
Aaron Merey [Thu, 1 Jan 2026 02:50:43 +0000 (21:50 -0500)] 
doc: Add gelf_getauxv.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getnote.3
Aaron Merey [Thu, 1 Jan 2026 02:50:42 +0000 (21:50 -0500)] 
doc: Add gelf_getnote.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_lib.3
Aaron Merey [Thu, 1 Jan 2026 02:50:41 +0000 (21:50 -0500)] 
doc: Add gelf_update_lib.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getlib.3
Aaron Merey [Thu, 1 Jan 2026 02:50:40 +0000 (21:50 -0500)] 
doc: Add gelf_getlib.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_move.3
Aaron Merey [Thu, 1 Jan 2026 02:50:39 +0000 (21:50 -0500)] 
doc: Add gelf_update_move.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getmove.3
Aaron Merey [Thu, 1 Jan 2026 02:50:38 +0000 (21:50 -0500)] 
doc: Add gelf_getmove.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_dyn.3
Aaron Merey [Thu, 1 Jan 2026 02:50:37 +0000 (21:50 -0500)] 
doc: Add gelf_update_dyn.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getdyn.3
Aaron Merey [Thu, 1 Jan 2026 02:50:36 +0000 (21:50 -0500)] 
doc: Add gelf_getdyn.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_syminfo.3
Aaron Merey [Thu, 1 Jan 2026 02:50:35 +0000 (21:50 -0500)] 
doc: Add gelf_update_syminfo.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getsyminfo.3
Aaron Merey [Thu, 1 Jan 2026 02:50:34 +0000 (21:50 -0500)] 
doc: Add gelf_getsyminfo.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_symshndx.3
Aaron Merey [Thu, 1 Jan 2026 02:50:33 +0000 (21:50 -0500)] 
doc: Add gelf_update_symshndx.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getsymshndx.3
Aaron Merey [Thu, 1 Jan 2026 02:50:32 +0000 (21:50 -0500)] 
doc: Add gelf_getsymshndx.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_update_sym.3
Aaron Merey [Thu, 1 Jan 2026 02:50:31 +0000 (21:50 -0500)] 
doc: Add gelf_update_sym.3

Signed-off-by: Aaron Merey <amerey@redhat.com>
4 months agodoc: Add gelf_getsym.3
Aaron Merey [Thu, 1 Jan 2026 02:50:30 +0000 (21:50 -0500)] 
doc: Add gelf_getsym.3

Signed-off-by: Aaron Merey <amerey@redhat.com>