binutils-gdb/libsframe
Alan Modra 5fab123e20 sframe fre sanity checks
I noticed the fre esz check in flip_sframe_fdes_with_fres_* was wrong,
testing against the full buffer size rather than the remaining size.
It is also ineffective at stopping buffer overflows to check after the
buffer accesses have occurred.

Likely many more buffer overflow checks in the sframe code are needed
before anyone can claim it is secure.  Even in the fre code, I see
things like sframe_decoder_get_fres_buf merrily iterating over fres
without a concern for buffer overflow.

	* sframe.c (flip_fre): Add fp_size param.  Use it to avoid
	buffer overflow on fuzzed input.
	(flip_sframe_fdes_with_fres_v2): Pass remaining buffer size to
	flip_fre.  Remove now redundant and wrong esz check.
	(flip_sframe_fdes_with_fres_v3): Likewise.
2026-01-22 17:57:35 +10:30
..
doc [SFrame-V3] sframe: doc: specification changes for SFrame version 3 2026-01-15 17:02:28 -08:00
testsuite [SFrame-V3] libsframe: testsuite: add new testcases for SFRAME_FDE_TYPE_FLEX 2026-01-15 17:02:28 -08:00
aclocal.m4 Binutils: Add clang LTO support to AR and RANLIB 2025-09-25 12:30:13 +08:00
config.h.in
configure tidy m4 plugin config support 2025-11-03 10:59:50 +10:30
configure.ac Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
libsframe.ver [SFrame-V3] bfd: ld: sframe: avoid unnecessary decoding of SFrame FREs at link time 2026-01-15 17:02:26 -08:00
libtool-version [SFrame-V3] libsframe: bump so version to libsframe.so.3.0.0 2026-01-15 17:02:24 -08:00
Makefile.am Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
Makefile.in [SFrame-V3] libsframe: testsuite: add new testcases for SFRAME_FDE_TYPE_FLEX 2026-01-15 17:02:28 -08:00
README libsframe: add README and mention expectations 2026-01-05 11:53:13 -08:00
sframe-dump.c [SFrame-V3] sframe: s390: gas: testsuite: enable flex FDE for s390x 2026-01-15 17:02:28 -08:00
sframe-error.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sframe-impl.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sframe.c sframe fre sanity checks 2026-01-22 17:57:35 +10:30

libsframe is a support library for the GNU Binutils collection (currently used
by GNU ld, objdump, etc.) to read and write SFrame section data.

Note: This library is currently intended for internal use by GNU Binutils only.
Strict guarantees for ABI compatibility are not provided, and external projects
should not rely on the stability of these interfaces.