Fix two PRs and guard against bad data in libsframe
A series of 10 patches address bugs in libsframe, including null pointer dereferences and buffer over-reads, by adding necessary checks.
This patch series addresses two specific PRs (libsframe/33417 and libsframe/34273) by introducing crucial validation checks within the libsframe library. The changes aim to prevent issues such as null pointer dereferences and buffer over-reads that could arise from malformed or crafted SFrame input data. Further fixes for sframe_decoder_get_fres_buf and related APIs are planned for subsequent patches.
In Details
This is a series of 10 patches for the libsframe component of binutils, focused on improving robustness by fixing reported bugs (PRs) and adding guards against malformed input data. The patches cover various aspects of the SFrame encoding and decoding process, including null checks, validation of block sizes, memory leak fixes, offset validation, error handling, and buffer overflow prevention. The proposer notes that further fixes are needed for decoder functions to handle malformed SFrame data.
- libsframe
- A library within binutils that provides functionality for the SFrame data format, likely used for storing or transmitting structured data.
- PR libsframe/33417
- A specific bug report (Problem Report) filed for the libsframe component, identified by number 33417.
- PR libsframe/34273
- A specific bug report (Problem Report) filed for the libsframe component, identified by number 34273.
- SFrame
- A data format or structure handled by the libsframe library. The exact nature of SFrame is not detailed but it appears to involve structured data encoding/decoding.
- buffer over-read
- A type of memory error where a program reads data beyond the allocated buffer boundaries, potentially accessing and exposing unintended or corrupt data.
- memory leak
- A condition where a program fails to release memory that is no longer in use, leading to a gradual depletion of available memory over time.