Closed Bug 1806899 Opened 1 year ago Closed 1 year ago

Sanitize tarfile.extractall input

Categories

(Release Engineering :: General, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

(Keywords: leave-open)

Attachments

(15 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
52 bytes, text/x-github-pull-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
52 bytes, text/x-github-pull-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
63 bytes, text/x-github-pull-request
Details | Review
52 bytes, text/x-github-pull-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
63 bytes, text/x-github-pull-request
Details | Review
63 bytes, text/x-github-pull-request
Details | Review
63 bytes, text/x-github-pull-request
Details | Review
  • archive-escape.tar is the same as archive.tar with an extra empty
    ../../../../../../../etc/passwd member appended
  • archive-setuid.tar is the same as archive.tar with an extra empty
    ./bin/setuid member appended, with mode 1744
Group: partner-confidential
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b171320171a1
Sanitize extractall input (mozharness) r=jcristau
Keywords: leave-open
Pushed by jcristau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b37ded95024
test unpacking crafted archives r=gbrown
See Also: → 1792064
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e5ab36bae64
Sanitize extractall input (m-c tooltool) r=jcristau

Add a check for setuid/gid on each tar member to be extracted.
Modify the check for escaping the destination: This should catch
absolute paths now, and also allow for the unusual but innocuous
case of "<subdir>/..".

Attachment #9309469 - Attachment description: Bug 1806899 - Sanitize extractall input (dmg.py) → Bug 1806899 - Sanitize extractall input (mozbuild)
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2fbbe5e4b32f
Harden mozfile extract_tarball r=ahal
Duplicate of this bug: 1298953
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3eab2cd717ad
Sanitize extractall input (remaining) r=jcristau
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/30c4cf95cc4d
Sanitize extractall input (mozbuild) r=jcristau
Attachment #9318254 - Attachment is obsolete: true

Apply the link escape check from tooltool to all the m-c tarfile extractions
previously updated.

Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79967b676cf8
Detect link escapes in safe_extract (all m-c) r=jcristau

Update the web-platform tests' copy of tooltool client with the latest version from the tooltool repo.

Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/907dd0b20c7f
Update vendored copy of tooltool client (wpt) r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38786 for changes under testing/web-platform/tests

I found another copy of tooltool.py in mozilla-vpn-client: https://github.com/mozilla-mobile/mozilla-vpn-client/pull/6208

Upstream PR merged by jgraham
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: