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

dns: consistency; performance on malicious input #20445

Closed
wants to merge 5 commits into from

Commits on May 1, 2018

  1. dns: make invalid setServers yield uniform error

    Behavior:
    dns.setServers throws a null pointer dereference on some inputs.
    Expected behavior was the more pleasant
      TypeError [ERR_INVALID_IP_ADDRESS] ...
    
    Root cause(s?):
    - Dereferencing the result of a regex match without confirming
      that there was a match.
    - assuming the capture of an optional group (?)
    
    Solution:
    Confirm the match, and handle a missing port cleanly.
    
    Tests: I added tests for various unusual inputs.
    
    Fixes: nodejs#20441
    davisjam committed May 1, 2018
    Configuration menu
    Copy the full SHA
    cd73836 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2018

  1. dns: revise quadratic regex in setServers

    Problem:
    The IPv6 regex was quadratic.
    On long malicious input the event loop could block.
    
    The security team did not deem it a security risk,
    but said a PR was welcome.
    
    Solution:
    Revise the regex to a linear-complexity version.
    
    Tests:
    I added REDOS tests to the "oddities" section.
    
    Fixes: nodejs#20443
    davisjam committed May 31, 2018
    Configuration menu
    Copy the full SHA
    fc93b59 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2018

  1. address review comments

    davisjam committed Jun 1, 2018
    Configuration menu
    Copy the full SHA
    03451b4 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2018

  1. Configuration menu
    Copy the full SHA
    ae34731 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2018

  1. Update test-dns.js

    Trott authored Jun 7, 2018
    Configuration menu
    Copy the full SHA
    260ee07 View commit details
    Browse the repository at this point in the history