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

Possible denial of service using a crafted gzip file #660

Closed
clausecker opened this issue Feb 21, 2016 · 1 comment
Closed

Possible denial of service using a crafted gzip file #660

clausecker opened this issue Feb 21, 2016 · 1 comment

Comments

@clausecker
Copy link

This isse has been reported by me on the FreeBSD bugtracker. The mentioned example file has been attached to the bug report there which is reproduced below.

The FreeBSD tar(1) program uses a heuristic to check if an archive file is compressed. If it is, it calls into an appropriate library to receive a decompressed stream. Then it applies the heuristic again to catch the case of an archive that has been compressed multiple times. There is no limit to the number of recursive decompressions.

Using a crafted gzip file (the attached file is a quine that unpacks to itself), one can get tar(1) to invoke an infinite chain of gzip compressors until all the memory on the machine running tar(1) has been exhausted or another resource limit kicks in.

I see this behaviour as a bug and security problem. It can be used to perform denial-of-service attacks against machines that run FreeBSD and use tar(1) to list the contents of untrusted archives.

@kientzle
Copy link
Contributor

Fixed in commit 6e06b1c

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

No branches or pull requests

2 participants