libdwarf through 2.3.3 Heap Out-of-Bounds Read via dwarf_debug_addr_table
Impact
libdwarf through 2.3.3 contains a heap out-of-bounds read vulnerability in dwarf_debug_addr_table() that omits the table starting offset when validating .debug_addr unit length. Attackers can supply a crafted object file with a non-zero offset table, causing dwarf_debug_addr_by_index() to read past the heap buffer, disclosing adjacent heap bytes or crashing consumers.
Source excerpt · VulnCheckAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
davea42 · libdwarf
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 through 2.3.3 (inclusive) | affected |
Original source description
libdwarf through 2.3.3 contains a heap out-of-bounds read vulnerability in dwarf_debug_addr_table() that omits the table starting offset when validating .debug_addr unit length. Attackers can supply a crafted object file with a non-zero offset table, causing dwarf_debug_addr_by_index() to read past the heap buffer, disclosing adjacent heap bytes or crashing consumers.
References
- Source reference github.com/davea42/libdwarf-code/issues/336
- Source reference github.com/davea42/libdwarf-code
- Patch github.com/davea42/libdwarf-code/commit/71f04013ddc2a3c88b9e25a4162ee2824741b593
- Source reference github.com/davea42/libdwarf-code/blob/v2.3.3/src/lib/libdwarf/dwarf_debugaddr.c
- Source reference hackmd.io/@haindpwn/libdwarf-debug-addr-table-section-offset-oob-read
- Security advisory www.vulncheck.com/advisories/libdwarf-through-2.3.3-heap-out-of-bounds-read-via-dwarf-debug-addr-table