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

FS#3465 - libustream-wolfssl20200215 doesn't validate TLS server certificates #8526

Closed
openwrt-bot opened this issue Nov 20, 2020 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

hardfalcon:

It appears that libustream-wolfssl20200215, which is used as the default TLS client implementation in current OpenWRT snapshot images, checks only if the CN or SAN in the server certificate matches the hostname, but not if the certificate was actually issue/signed by a trusted CA (thus making all other checks completely pointless) or if the certificate has expired.

On a device running the most recent OpenWRT snapshot image, all of the following three commands would be expected to fail with certificate errors, but they succeed without giving any error:

root@vr200v:/tmp# uclient-fetch -O - 'https://self-signed.badssl.com/'
root@vr200v:/tmp# uclient-fetch -O - 'https://untrusted-root.badssl.com/'
root@vr200v:/tmp# uclient-fetch -O - 'https://expired.badssl.com/'

Manually specifying the CA doesn't change the behavior, either:

root@vr200v:/tmp# uclient-fetch --ca-certificate=/rom/etc/ssl/certs/ca-certificates.crt -O - 'https://self-signed.badssl.com/'
root@vr200v:/tmp# uclient-fetch --ca-certificate=/tmp/ISRG_Root_X1.crt -O - 'https://self-signed.badssl.com/'

@openwrt-bot
Copy link
Author

ynezz:

I can confirm this on 19.07 as well. It's not related to version bump from wolfssl 4.4.0 to 4.5.0 (latest stable release), I've tried to downgrade and the problem is same with the previous version as well, so the problem is probably somewhere in the libustream-wolfssl library itself.

@openwrt-bot
Copy link
Author

@openwrt-bot
Copy link
Author

@openwrt-bot
Copy link
Author

hardfalcon:

Thanks a lot for your fixes! Just tested them in the latest xrx200 snapshot image and they work perfectly. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant