openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

Bad SSL certificate on https://ciscobinary.openh264.org

Open vi opened this issue 12 years ago • 65 comments

ciscobinary.openh264.org uses an invalid security certificate.

The certificate is only valid for the following names: *.akamaihd.net , *.akamaihd-staging.net , a248.e.akamai.net

(Error code: ssl_error_bad_cert_domain)

vi avatar May 30 '14 16:05 vi

We would like people to check the security of the download by matching the checksum of the downloaded file to the fingerprints that mozilla uses. That provides a much more secure solution.

fluffy avatar Aug 18 '14 02:08 fluffy

Please re-evaluate this decision. People might not do this out of laziness / ignorance (count me in!). Making sure they at least have something from the owner of openh264.org might prevent a lot of harm.

Checking the checksum is definitely needed for true safety, but why not make the worst case a little less worse?

PhilLab avatar Jun 10 '19 21:06 PhilLab

By the way, where can I find the fingerprint Mozilla uses?

PhilLab avatar Jun 10 '19 21:06 PhilLab

@dminor do you know if we store the current fingerprints in tree somewhere?

nils-ohlmeier avatar Jun 10 '19 21:06 nils-ohlmeier

I'll reopen for discution

fluffy avatar Jun 11 '19 19:06 fluffy

These should be the current fingerprints: https://searchfox.org/mozilla-central/source/toolkit/content/gmp-sources/openh264.json. However, that file is only used as a fallback when we can't reach the normal update server. The update server sends Firefox a url and a fingerprint to use. The intention is to make it easy to roll out updates to a portion of the population, but obviously does not make it easy to trace what is being downloaded. @Callek would know more about that side of things.

dminor avatar Jun 12 '19 11:06 dminor

Ok, so the issue in https://github.com/cisco/openh264/issues/909#issue-34658985 looks like its a cert issue on the domain itself...

image

I'm not sure what https://github.com/cisco/openh264/issues/909#issuecomment-500594569 is asking specifically, though Mozilla is downloading the binaries from http://ciscobinary.openh264.org/ and not https://... so we don't encounter the certificate issue. We do however have code that validates that our update service is the correct service (via cert) and that the urls it sends over are validated once downloaded with a sha512 algorithm, so we never invoke untrusted code (even if a MITM struck and gave the user unexpected content)

Finally we codesign the binaries on windows, and gpg sign on linux (note the gpg sig is harder to verify since we don't expose this anywhere officially, nor is it fully guaranteed to exist in the future) e.g. http://ciscobinary.openh264.org/openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip.asc

So I think this issue comes down to @fluffy and Cisco in general for if they want the ciscobinary.openh264.org to have a valid https cert.

Callek avatar Jun 13 '19 12:06 Callek

for cross-reference https://bugzilla.mozilla.org/show_bug.cgi?id=1102531

sijchen avatar Jan 23 '20 15:01 sijchen

Can this issue be revisited? This is a potential security issue for anyone downloading these files.

flossposse avatar May 29 '23 17:05 flossposse

This is not just potential but real security vulnerability. The GPG that was there seems to be gone. Cisco binaries are at this point not safe to use without locally reproducing same binary so you can collect sha256.

nanonyme avatar Jul 24 '23 19:07 nanonyme

Hi @fluffy, could somebody from Cisco help fix this please?

There are two related issues above that can be closed as duplicates.

mcatanzaro avatar Nov 02 '23 16:11 mcatanzaro

HTTPS is not supported for this. We think a better approach is to check the fingerprint of the downloaded files.

fluffy avatar Nov 03 '23 10:11 fluffy

@fluffy then can you please start providing strong hashes for the files from GitHub releases? Download server only has weak hashes which are useless by modern standards and they are untrusted since you are not supporting TLS or providing GPG scheme.

nanonyme avatar Nov 03 '23 11:11 nanonyme

@fluffy Is there a secure way to get the fingerprints?

flossposse avatar Nov 03 '23 15:11 flossposse

We think a better approach is to check the fingerprint of the downloaded files.

@fluffy can you show us a secure page where these fingerprints or hashes are published? I think it does not exist, and that everyone is just doing trust-on-first-use today: download OpenH264 insecurely, hash it, and just trust that the original download was probably/hopefully not hijacked. This is inadequate nowadays, as apparently we are no longer allowed to ignore supply chain security. :)

Possible solutions:

  • Fix the TLS certificate on ciscobinary.openh264.org
  • Publish hashes on any other website that does use TLS
  • Use GitHub releases instead

mcatanzaro avatar Nov 30 '23 19:11 mcatanzaro

Mozilla is the group that is securely publishing the hashes. They actually compile the code to. I'me feeling guilty I can not point you at the exactly location.

Even if we did move to https from github, the whole process by which the executables get to github is not very secure thus the realiance on the hashes.

fluffy avatar Dec 02 '23 00:12 fluffy

Few places Mozilla takes on stuff for this plugin [context I used to be a release engineer there, and one of the primary people responsible for delivering this]

https://searchfox.org/mozilla-central/source/taskcluster/ci/openh264-plugin/kind.yml https://searchfox.org/mozilla-central/source/taskcluster/ci/openh264-signing/kind.yml

https://searchfox.org/mozilla-central/source/testing/mozharness/configs/openh264 https://searchfox.org/mozilla-central/source/testing/mozharness/scripts/openh264_build.py

Some more results: https://searchfox.org/mozilla-central/search?q=openh264&path=openh264&case=false&regexp=false

But yes, Mozilla builds them for Cisco [at least used to, but I think still does] and then Cisco published the binaries on their own server. Mozilla publishes update information to point Firefox at the binaries and at the related file hashes, this update information is protected much the same way actual Firefox updates are protected.

Callek avatar Dec 02 '23 00:12 Callek

If we can get confirmation that this is in fact still the case that Mozilla builds the files (I think this one was already confirmed by @fluffy above) and hashes originate from inside of Mozilla's internal infrastructure, then the supply chain is fine. Hashes obviously cannot be calculated based on any payloads downloaded over the Internet unencrypted to be trustable.

nanonyme avatar Dec 02 '23 10:12 nanonyme

Let's also post instructions for how to verify the hashes somewhere prominent (like the toplevel README.md).

mcatanzaro avatar Dec 02 '23 13:12 mcatanzaro

And probably also instructions explaining that ciscobinary.openh264.org is not intended to be accessed via HTTPS.

And close #3662

mcatanzaro avatar Dec 02 '23 14:12 mcatanzaro