hughperkins / tf-coriander

OpenCL 1.2 implementation for Tensorflow
Apache License 2.0
792 stars 90 forks source link

CVE-2007-4559 Patch #100

Open TrellixVulnTeam opened 1 year ago

TrellixVulnTeam commented 1 year ago

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.

hughperkins commented 1 year ago

Thanks. Could you factorize out the extra functions into a separate file please?

On Sat, Oct 15, 2022, at 2:30 PM, TrellixVulnTeam wrote:

Patching CVE-2007-4559 https://github.com/advisories/GHSA-gw9q-c7gh-j9vm

Hi, we are security researchers from the Advanced Research Center at Trellix https://www.trellix.com/. We have began a campaign to patch a widespread bug named CVE-2007-4559 https://github.com/advisories/GHSA-gw9q-c7gh-j9vm. CVE-2007-4559 https://github.com/advisories/GHSA-gw9q-c7gh-j9vm 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 https://github.com/advisories/GHSA-gw9q-c7gh-j9vm. Further technical information about the vulnerability can be found in this blog https://www.trellix.com/en-us/about/newsroom/stories/research/tarfile-exploiting-the-world.html.

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

You can view, comment on, or merge this pull request online at:

https://github.com/hughperkins/tf-coriander/pull/100

Commit Summary

(1 file https://github.com/hughperkins/tf-coriander/pull/100/files)

— Reply to this email directly, view it on GitHub https://github.com/hughperkins/tf-coriander/pull/100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA6FKDP5LP55L3DNWJFQDLWDLZ4XANCNFSM6AAAAAARGAL6KQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

hughperkins commented 1 year ago

(or, ideally, patch upstream, which I feel is probably much easier than creating PRs over every project in github that uses the tar library...)