Skip to content

COMPRESS-723 : TAR PAX header parsing: enforce memory bound to mitigate resource exhaustion from oversized headers#770

Open
subbudvk wants to merge 7 commits intoapache:masterfrom
subbudvk:subbudvk-patch-1
Open

COMPRESS-723 : TAR PAX header parsing: enforce memory bound to mitigate resource exhaustion from oversized headers#770
subbudvk wants to merge 7 commits intoapache:masterfrom
subbudvk:subbudvk-patch-1

Conversation

@subbudvk
Copy link
Copy Markdown

Enforce a configurable memory bound on PAX header parsing via a new maxPaxHeaderSize builder option on TarArchiveInputStream and TarFile. The default is 10 MB (TarConstants.DEFAULT_MAX_PAX_HEADER_SIZE), enforced through the existing MemoryLimitException.checkBytes() mechanism. This closes the last unbounded allocation surface in the TAR parsing pipeline and follows the same defense-in-depth pattern already established for entry names and 7z headers.

@subbudvk subbudvk changed the title COMPRESS-723 TAR PAX header parsing: enforce memory bound to mitigate resource exhaustion from oversized headers COMPRESS-723 : TAR PAX header parsing: enforce memory bound to mitigate resource exhaustion from oversized headers Apr 23, 2026
@subbudvk
Copy link
Copy Markdown
Author

@garydgregory

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