Skip to content

Refuse allocation links with uninstrumented inputs, and conflicting lock pins (from #9) - #13

Merged
sjawhar-agent[bot] merged 5 commits into
mainfrom
land/pr-9-verification-integrity
Oct 23, 2026
Merged

sjawhar-agent[bot] merged 5 commits into
mainfrom
land/pr-9-verification-integrity

Conversation

@sjawhar-agent

@sjawhar-agent sjawhar-agent Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This lands #9 by @arunimshukla from a branch of this repository, because the enrollment checks reject a fork's pull request that changes files outside projects/. The four commits are Arunim's, unchanged, plus one fix from review.

  • Allocation-failure and counting links rewrite allocator calls only in the object files and archives named on the command line. A library brought in another way kept its real allocator, so a failed allocation that should crash exited 0 instead, and counting reported 0. These two links now refuse library selectors (-l), linker forwarding (-Wl,, -Xlinker, and, from review, clang's --for-linker), clang configuration files (--config, from review), linker scripts, response files and source files. A normal $LIB_FUZZING_ENGINE link is unchanged, so no released binary changes.
  • Repeated --lock arguments used to merge binary pins last-write-wins, so a mismatching lock followed by a matching one passed. Conflicting SHA-256s for the same target and build now stop the command before building. Identical and disjoint pins still combine.
  • docs/build-contract.md describes both.

On main, 16 of the new cases fail. With this change all of them pass, and the whole suite passes (134 passed, 90 skipped, the Docker tests, in a container with no network and no Docker).

arunimshukla and others added 5 commits October 24, 2026 00:48
Add validation for SHA256 values in locks.
Add error handling for unsupported input types in link-fuzz-target.
Clarify linking process and lock comparison in documentation.
clang's --for-linker (and --for-linker=) is another spelling of -Xlinker, and a --config file can hold -L, -l and -Wl options, so either could still bring in an archive whose allocation calls are not rewritten. Refuse both forms of each, as -Xlinker is refused, and test them for both allocation engines.
@sjawhar-agent
sjawhar-agent Bot requested a review from a team as a code owner October 23, 2026 20:06
@sjawhar-agent
sjawhar-agent Bot merged commit 906db00 into main Oct 23, 2026
15 of 18 checks passed
@sjawhar-agent
sjawhar-agent Bot deleted the land/pr-9-verification-integrity branch October 23, 2026 20:09
linuxnow pushed a commit to FreeREAC/oss-verify that referenced this pull request Nov 8, 2026
…ock pins (theorem-labs#13)

From theorem-labs#9 by Arunim Shukla. Allocation-failure and counting links refuse library selectors, linker forwarding (including clang's --for-linker), clang configuration files, linker scripts, response files and sources, so every input's allocation calls are rewritten. Repeated --lock arguments that pin different SHA-256s for the same target and build stop the command before building.

Co-authored-by: Arunim Shukla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant