3
26
Fork
You've already forked mere
1

Reject archive entries that declare a decompression-bomb-sized payload #107

Merged
jhuntwork merged 1 commit from extract-decompression-bomb-limit into main 2026年07月10日 17:50:44 +02:00

extractWithLibarchive extracted every entry regardless of its declared
uncompressed size, with no ceiling. The signed-install path is tempered
by install.zig's whole-archive hash verification against trusted repo
metadata before extraction runs, but mere dev import (import.zig) and
build-source unpacking (source_unpacker.zig) extract before any such
binding exists, so a small crafted archive could claim to expand to an
arbitrary amount of data.

Add checkEntryExtractedSize, called per entry before extraction, which
rejects any entry whose archive_entry_size() exceeds a 4 GiB ceiling,
with a diagnostic message naming the entry and stating the declared
size and the limit rather than a generic "invalid input".

extractWithLibarchive extracted every entry regardless of its declared uncompressed size, with no ceiling. The signed-install path is tempered by install.zig's whole-archive hash verification against trusted repo metadata before extraction runs, but mere dev import (import.zig) and build-source unpacking (source_unpacker.zig) extract before any such binding exists, so a small crafted archive could claim to expand to an arbitrary amount of data. Add checkEntryExtractedSize, called per entry before extraction, which rejects any entry whose archive_entry_size() exceeds a 4 GiB ceiling, with a diagnostic message naming the entry and stating the declared size and the limit rather than a generic "invalid input".
Reject archive entries that declare a decompression-bomb-sized payload
All checks were successful
/ test (pull_request) Successful in 6m12s
2b20b06468
extractWithLibarchive extracted every entry regardless of its declared
uncompressed size, with no ceiling. The signed-install path is tempered
by install.zig's whole-archive hash verification against trusted repo
metadata before extraction runs, but mere dev import (import.zig) and
build-source unpacking (source_unpacker.zig) extract before any such
binding exists, so a small crafted archive could claim to expand to an
arbitrary amount of data.
Add checkEntryExtractedSize, called per entry before extraction, which
rejects any entry whose archive_entry_size() exceeds a 4 GiB ceiling,
with a diagnostic message naming the entry and stating the declared
size and the limit rather than a generic "invalid input".
jhuntwork deleted branch extract-decompression-bomb-limit 2026年07月10日 17:50:45 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
merelinux/mere!107
Reference in a new issue
merelinux/mere
No description provided.
Delete branch "extract-decompression-bomb-limit"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?