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

SEGV when passing the same key twice #170

Open
fische opened this issue Apr 13, 2020 · 0 comments
Open

SEGV when passing the same key twice #170

fische opened this issue Apr 13, 2020 · 0 comments

Comments

@fische
Copy link

fische commented Apr 13, 2020

Hi!

While trying dnscrypt-wrapper, I've encountered a segmentation fault when passing the same secret key twice. Here are the steps to reproduce it:

dnscrypt-wrapper --gen-provider-keypair --provider-name=2.dnscrypt-cert.example.com --ext-address=127.0.0.1 --dnssec --nolog --nofilter
dnscrypt-wrapper --gen-crypt-keypair --crypt-secretkey-file=1.key
dnscrypt-wrapper --gen-cert-file --crypt-secretkey-file=1.key --provider-cert-file=1.cert --provider-publickey-file=public.key --provider-secretkey-file=secret.key
cp 1.key 2.key
cp 1.cert 2.cert

dnscrypt-wrapper --resolver-address=8.8.8.8:53 --listen-address=0.0.0.0:443 --provider-name=2.dnscrypt-cert.example.com --crypt-secretkey-file=1.key,2.key --provider-cert-file=1.cert,2.cert

The issue comes from match_cert_to_keys where cert_id is out of bound after matching the certificates with the first key.

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

1 participant