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

HIP2 can be used with insecure domains #496

Closed
Falci opened this issue Apr 12, 2022 · 2 comments · Fixed by #524
Closed

HIP2 can be used with insecure domains #496

Falci opened this issue Apr 12, 2022 · 2 comments · Fixed by #524
Labels
bug Something isn't working security

Comments

@Falci
Copy link
Contributor

Falci commented Apr 12, 2022

The RRSIG for iamfernando expired:
image
(Fingertip failed to validate)

But Bob still accept it:
image

image

@rithvikvibhu
Copy link
Collaborator

I tried reproducing this with an invalid DNSSEC setup, but the resolver didn't return any response (as expected I think).

While iamfernando's sigs are updated now, I think at that time it was returning a response without the ad flag set. Can't get that kind of response right now. Any idea what else might have been different?

@rithvikvibhu
Copy link
Collaborator

Okay! Finally back on this and looks like it's fixed. Turns out hsd's resolver (from bns) validated dnssec and only marked ad flag, but still returned results, unlike other resolvers that SERVFAIL when verification fails.

More info in chjj/bns#35.

Fixed in chjj/bns#36. Tested it out by using this bns in hsd and bob-wallet, iamfernando fails as expected and others continue to work.

I don't think a PR is needed right now since there aren't any changes in Bob itself, just need to update hsd (which will be done before the next release).

To anyone who wants to test it:

# clone hsd, bns, bob-wallet (if you haven't already)
git clone https://github.com/handshake-org/hsd
git clone https://github.com/chjj/bns
git clone https://github.com/kyokan/bob-wallet

# checkout bns PR
git checkout -b bogus-servfail
git pull origin pull/36/head:bogus-servfail

# npm install in each of them (if you haven't already)
cd hsd && npm i && cd ../
cd bns && npm i && cd ../
cd bob-wallet && npm i && cd ../

# npm link them all together (hsd needs bns; bob-wallet needs hsd and bns)
cd hsd && npm link ../bns && cd ..
cd bob-wallet && npm link ../hsd ../bns && cd ..

# build and run (for linux, see readme for other os)
cd bob-wallet
npm run package-linux
./release/Bob-0.9.0.AppImage

# Now try different domains on the Send page
# @falci.me - should work
# @iamfernando - should NOT work (expired RRSIGs)
# @hip2.bb-8 - should work
# @nathan.woodburn - should work

Let's leave this issue open until hsd is actually updated.

@rithvikvibhu rithvikvibhu added the dependent Depends on another issue or PR to be resolved first label May 21, 2022
@rithvikvibhu rithvikvibhu added bug Something isn't working security and removed dependent Depends on another issue or PR to be resolved first labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants