Skip to content

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Apr 28, 2021

Terminate immediately if a fuzzing harness tries to perform a DNS lookup (belt and suspenders).

Obviously this should never happen, but if it does happen we want immediate termination instead of a DNS lookup :)

@fanquake fanquake added the Tests label Apr 28, 2021
@practicalswift practicalswift force-pushed the fuzz-terminate-on-dns-lookup branch 2 times, most recently from 5454c7a to 5454f1a Compare April 28, 2021 12:55
@practicalswift practicalswift changed the title fuzz: Terminate immediately if a fuzzing input ever causes a DNS lookup (belts and suspenders) fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belts and suspenders) Apr 28, 2021
@practicalswift practicalswift force-pushed the fuzz-terminate-on-dns-lookup branch from 5454f1a to 5555f5c Compare April 28, 2021 13:49
@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 28, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@practicalswift practicalswift force-pushed the fuzz-terminate-on-dns-lookup branch from 5555f5c to 545497e Compare May 12, 2021 21:32
@practicalswift practicalswift changed the title fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belts and suspenders) fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belt and suspenders) May 12, 2021
@practicalswift practicalswift changed the title fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belt and suspenders) fuzz: Terminate immediately if a fuzzing harness tries to perform a DNS lookup (belt and suspenders) May 12, 2021
@practicalswift practicalswift force-pushed the fuzz-terminate-on-dns-lookup branch from 545497e to 3939e8c Compare May 19, 2021 20:19
@practicalswift practicalswift force-pushed the fuzz-terminate-on-dns-lookup branch from 3939e8c to 3939465 Compare May 20, 2021 19:30
@practicalswift practicalswift force-pushed the fuzz-terminate-on-dns-lookup branch from 3939465 to 3737d35 Compare May 21, 2021 19:51
@practicalswift
Copy link
Contributor Author

practicalswift commented Jun 5, 2021

@MarcoFalke Thanks for reviewing. All feedback has been addressed. Let me know if there is anything more I can do :)

@maflcko
Copy link
Member

maflcko commented Jun 6, 2021

review ACK 3737d35

@maflcko maflcko merged commit 912cb59 into bitcoin:master Jun 7, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 9, 2021
… tries to perform a DNS lookup (belt and suspenders)

3737d35 fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belts and suspenders) (practicalswift)

Pull request description:

  Terminate immediately if a fuzzing harness tries to perform a DNS lookup (belt and suspenders).

  Obviously this _should_ never happen, but if it _does_ happen we want immediate termination instead of a DNS lookup :)

ACKs for top commit:
  MarcoFalke:
    review ACK 3737d35

Tree-SHA512: 51cd2d32def7f9f052e02f99c354656af1f807cc9fdf592ab765e620bfe660f1ed26e0484763f94aba650424b44959eafaf352bfd0f81aa273e350510e97356e
@vasild
Copy link
Contributor

vasild commented Jun 30, 2021

This bite me for good in #21878 (now fixed). It works!

@practicalswift
Copy link
Contributor Author

@vasild This safety measure helped avoid an unwanted external DNS lookup? If so that's great news: thanks for sharing! :)

@vasild
Copy link
Contributor

vasild commented Jun 30, 2021

@practicalswift, yes! Fuzzing CConnman::OpenNetworkConnection(), it called CConnman::ConnectNode() which called Lookup() with the default fNameLookup which is true.

gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants