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

2025-03-27 Thread Aaron Merey
Hi Mark, On Thu, Mar 27, 2025 at 4:51 AM Mark Wielaard wrote: > > Hi Aaron, > > On Thu, Mar 27, 2025 at 12:07:18AM -0400, Aaron Merey wrote: > > Ensure that dwarf_lock is held before accessing next_tu_offset and > > next_cu_offset. > > > > This fixes a TOCTOU bug in __libdw_findcu that causes NUL

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

2025-03-27 Thread Mark Wielaard
Hi Aaron, On Thu, Mar 27, 2025 at 12:07:18AM -0400, Aaron Merey wrote: > Ensure that dwarf_lock is held before accessing next_tu_offset and > next_cu_offset. > > This fixes a TOCTOU bug in __libdw_findcu that causes NULL to be > incorrectly returned. Could you explain what the issue is in a few

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

2025-03-26 Thread Aaron Merey
Ensure that dwarf_lock is held before accessing next_tu_offset and next_cu_offset. This fixes a TOCTOU bug in __libdw_findcu that causes NULL to be incorrectly returned. Signed-off-by: Aaron Merey --- libdw/libdw_findcu.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --gi