Repository navigation
cpio: recognize NUL-padded trailer names - #1
Merged
ScottMoore0 merged 1 commit intoNov 3, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A valid newc archive with
c_namesize = 12andTRAILER!!!\0\0was rejected withCpioNoTrailer. The initramfs buffer format permits additional trailing NULs withinc_namesize.Recognize the trailer followed by an all-NUL suffix. Ordinary names keep their raw bytes. Update the public trailer-name predicate and validity contract together so the universal parse/build round-trip law remains valid; bump the package to 0.2.0.0 for that contract change.
Add proved regressions for padded trailers, an entry preceding the trailer, non-trailer suffixes, and a malformed padded name.
Validation:
scripts/check.sh cpio(including 100 reference cases),scripts/deps.sh cpio, andVERDICT=1 scripts/check.sh cpiopass with Bend 2.0.39 and Lean 4.34.0. Independent GPT-6.1-Terra medium review using review-agent returned no findings. The new padding cases are proof vectors; the existing reference suite covers ordinary archives.