mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 01:46:39 +00:00
* feat(native)!: give the native structural decoding allowance a per-call max_structure_bytes The 16 MiB structural budget on native header, section, load-command and ELF dynamic-directory table reads, and on decoded section names, was a fixed ceiling with no override. inspect_elf_unwind_ranges, inspect_kernel_module, inspect_elf_debug_link, inspect_dwarf_units, inspect_binary_hardening and inspect_native_initializers now accept max_structure_bytes (64 bytes to 512 MiB, default 16 MiB) and report details.limit when it stops them. binaryContainer owns the default, the limit name and the failure (nativeStructureFailure); the directory readers take a NativeDirectoryBudgets object in place of the positional decoded-name budget, and Mach-O, the ELF dynamic directory and the ELF pointer relocation pass take the same budget. Other allowances that shared the "structure" limit name now carry their own: the PE per-name decode, the retained DWARF section bound (derived from the admitted image), and the hardening table-entry count. The ELF dependency provider's structural projection was unreachable and is removed. Part of #14235. BREAKING CHANGE: refusals at the structural budget report reported_limits.boundary "max_structure_bytes" instead of "structure". * fix(native): apply max_structure_bytes to the ELF hardening dynamic table and scope its help inspect_binary_hardening read PT_DYNAMIC under its entry count only, so a sectionless ELF could exceed the selected max_structure_bytes; the dynamic table is now checked first. The shared help no longer names tables a reader does not bound, and the limits reference states hardening's Mach-O and PE coverage. The initializer CLI recovery test asserts a parsed successful report. * fix(native): refuse a partial ELF hardening dynamic table as malformed before its budget