Skip to content

Reject untrusted TAR link members#5348

Open
lethanhsang188 wants to merge 2 commits into
google:masterfrom
lethanhsang188:fix-tar-link-extraction
Open

Reject untrusted TAR link members#5348
lethanhsang188 wants to merge 2 commits into
google:masterfrom
lethanhsang188:fix-tar-link-extraction

Conversation

@lethanhsang188

Copy link
Copy Markdown

Summary

  • Reject TAR symlink and hardlink members when extracting untrusted archives.
  • Keep trusted TAR extraction behavior unchanged.
  • Add regression coverage for untrusted TAR symlinks, hardlinks, and regular files.

Tests

  • PYTHONPATH=src python3 -m py_compile src/clusterfuzz/_internal/system/archive.py src/clusterfuzz/_internal/tests/core/system/archive_test.py
  • PYTHONPATH=src python3 -m unittest clusterfuzz._internal.tests.core.system.archive_test.UnpackTest.test_unpack_untrusted_tar_symlink_fails clusterfuzz._internal.tests.core.system.archive_test.UnpackTest.test_unpack_untrusted_tar_hardlink_fails clusterfuzz._internal.tests.core.system.archive_test.UnpackTest.test_unpack_untrusted_tar_regular_file_succeeds clusterfuzz._internal.tests.core.system.archive_test.UnpackTest.test_unpack_file_with_cwd_prefix clusterfuzz._internal.tests.core.system.archive_test.ArchiveReaderTest

@lethanhsang188 lethanhsang188 requested a review from a team as a code owner July 3, 2026 13:30
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