Adds Frama-C WP proofs
Merged
JS
3mo ago+1811+1811+0123456789012345678901234567890123456789-296-296-012345678901234567890123456789
Summary by cubic
Adds Frama-C WP proofs gated in CI for ELF parsing, GDB RSP hex/checksum, and guest address math, and switches ELF relocation to a checked elf_window_t window. Tightens safety checks across exec, GDB, guest memory, and FUSE, and hardens the Infer workflow.
-
New Features
- CI
verifyruns Frama-C on ELF, RSP, and GVA math; proofs gate merges with a pinned toolchain;scripts/check-wp-result.pyandscripts/check-acsl-coverage.pyenforce success and coverage; proof timeout set to 120s. - Extracted guest address arithmetic to
src/core/gva-math.hand proved it; relocation useself_window_t(va_base/target_base); tightened ELF helpers and addedELF_PHDR_TABLE_MAX; AT_PHDR derived from the coveringPT_LOADand guarded byphdr_valid. - Suppress Infer
PULSE_UNINITIALIZED_VALUEin.inferconfig; addmake infer-uninitto re-run with the check enabled and report the count.
- CI
-
Bug Fixes
- ELF: validate PHDR geometry at both parse sites; reject wrapping/extreme extents early; avoid misaligned reads; stop re-parsing files; ignore zero-memsz segments; compute AT_PHDR correctly; zero-initialize PHDR scratch; bound interpreter and executable extents before the point of no return.
- GDB RSP: bound reads to NUL; require enough hex digits; validate checksum nibbles; handle empty
H; requirebufsz >= 2; return an error on malformedvCont. - Guest memory: clamp available bytes to the end of the primary buffer; require full 4 KiB page tables before indexing.
- FUSE: clamp read replies to the requested size; added an over-reply test.
- Infer: fix
make infer-uninitto create the build dir, honor Infer exit status (treat exit 2 as expected), and fail on an empty/missing report.