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

libpng: Multiple vulnerabilities #68

Closed
fsbruva opened this issue Mar 19, 2019 · 6 comments
Closed

libpng: Multiple vulnerabilities #68

fsbruva opened this issue Mar 19, 2019 · 6 comments

Comments

@fsbruva
Copy link
Contributor

fsbruva commented Mar 19, 2019

The bundled version of libpng has 17 known vulnerabilities, according to the NIST National Vulnerability Database, including one with severity 10.0 (out of 10).

There are three options:

  1. Accept the risk and keep using libpng 1.4.3
  2. Upgrade to the latest libpng 1.6.36
  3. Wait and upgrade to some future version of libpng

I recommend option 2, which has only two vulnerabilities listed. However, I could be swayed to hold fast until option 3, because one of the vulnerabilities is a severity 8.6 memory leak.

What is the selected option that I should prepare a PR for?

@mherger
Copy link
Contributor

mherger commented Mar 19, 2019

Now that's probably the most important of your reports. Would you have an assessment of how these vulnerabilities can be exploited with LMS? I guess this is for Image::Resizer (and Media::Scan?). Is the upstream fixed?

@fsbruva
Copy link
Contributor Author

fsbruva commented Mar 20, 2019

Media::Scan, yes, and Image::Scale use PNG. The two most severe exploits would allow attackers to execute arbitrary code through crafted PNGs (either standalone or embedded in audio files) during library scanning.
The upstream (latest is 1.6.32) has been fixed, and the memory leak is from improper tear-down when the pngcp command fails, see: pnggroup/libpng#269.

@mherger
Copy link
Contributor

mherger commented Mar 20, 2019

Image::Scale we use all over the place indeed. And a lot with files of unknown source (remote artwork).

We already did update that module for select platforms. But that probably didn't include all the security fixes you mention.

If you could provide a fix for this, that might be a good starting point.

@mherger
Copy link
Contributor

mherger commented Mar 20, 2019

Ugh... I tried to update Image::Scale on Windows before... andygrundman/Image-Scale#9

@fsbruva
Copy link
Contributor Author

fsbruva commented Mar 21, 2019

We already did update that module for select platforms. But that probably didn't include all the security fixes you mention.

The perl module is only as (in)secure as the underlying libraries.

If you could provide a fix for this, that might be a good starting point.

Will do. I'll also update giflib and libjpeg, to cover those bases.

Ugh... I tried to update Image::Scale on Windows before... andygrundman/Image-Scale#9

Have you been able to replicate the issue with Image::Scale 0.14?

@fsbruva
Copy link
Contributor Author

fsbruva commented Mar 21, 2019

Argh. I just remembered that libmediascan also depends on giflib. And since giflib has an API-breaking change between the 4.x.x and 5.x.x series (the library was made completely re-entrant and thread-safe, as well as fixing LOTS of bugs). Image::Scale is flexible enough to use both old and new API, but libmediascan is not.

I will leave giflib as is, and update it if/when libmediascan gets updated.

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