Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2007-4559 Patch #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

TrellixVulnTeam
Copy link

Patching CVE-2007-4559

Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

SpiritCroc and others added 11 commits May 10, 2020 09:54
This relies on 2 other things that should be covered in documentation:

1.  install pkg-config, which does not come with MacOS.
     brew install pkg-config
     if this is not installed, you'll get a warning, but the build will continue
     without including libcrypto

2.  Install libcrypto, using brew:
     https://gist.github.com/aklap/e885721ef15c8668ed0a1dd64d2ea1a7
     this note explains a couple of symbolic links you need to add
     If you've installed pkg-config but not libcrypto, the build will
     continue without including libcrypto
Don't attempt to run thirdparty/extract/src/docx_template_build.py if we don't
have python-3.6 or later. The generated files are in git so this works ok.
Apple Preview doesn't like the Type0 embedded font file to be Type1C.
Previously image masks were not handled specially when being
redacted. Because image masks a stored inverted in the PDF, when
redacting them we need to invert the samples, perform the redaction
including erasing pixels and drawing black boxes as requested. Finally
we need to remember the image mask flag so that the image is written
correctly when the PDF is saved.
Conflicts:
	.gitmodules
@SpiritCroc
Copy link
Member

Thank you.
Since this function seems to be related to compiling the app on windows (at least looks like it to me - this is just a fork with minor changes for personal use, so I might miss some things), that I most likely won't ever invoke, I'll leave this for upstream to fix for now, to avoid merge conflicts in the future.

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.

6 participants