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 resolver security updates for "nxnsattack" #88159

Merged
merged 3 commits into from May 21, 2020
Merged

Conversation

@vcunat
Copy link
Member

vcunat commented May 19, 2020

Motivation for this change

See e.g. https://en.blog.nic.cz/2020/05/19/nxnsattack-upgrade-resolvers-to-stop-new-kind-of-random-subdomain-attack/

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • N/A Ensured that relevant documentation is up to date
  • (probably) Fits CONTRIBUTING.md.
vcunat added 3 commits May 19, 2020
https://doc.powerdns.com/recursor/changelog/4.3.html#change-4.3.1
It fixes DoS CVEs; details e.g. on http://www.nxnsattack.com/

$ nix build -f nixos/release.nix tests.pdns-recursor.x86_64-linux
https://www.isc.org/blogs/bind9-vulnerabilities-2020-05/
$ nix build -f nixos/release.nix tests.bind.x86_64-linux
@vcunat
Copy link
Member Author

vcunat commented May 19, 2020

All the updates should be quite minimalist, so I'm submitting them together and won't wait for long before merging. Unbound causes larger rebuilds, so I pushed it separately to staging-next as 73390e3.

@mweinelt
Copy link
Member

mweinelt commented May 19, 2020

Result of nixpkgs-review pr 88159 1

2 packages blacklisted:
- tests.nixos-functions.nixos-test
- tests.nixos-functions.nixosTest-test
24 packages built:
- acme-sh
- autofs5
- bashSnippets
- bind
- check-wmiplus
- cinnamon.cinnamon-session
- cinnamon.cjs
- cinnamon.nemo
- cinnamon.xapps
- dnsperf
- dnsutils
- dwm-status
- host
- inxi
- knot-resolver
- monitoring-plugins
- nmapsi4
- pdns-recursor
- python27Packages.xapp
- python37Packages.xapp
- python38Packages.xapp
- sssd
- testssl
- twa
Copy link
Contributor

rnhmjoj left a comment

For pdns-recursor, I tested the update on my server and looks all right.
It should be safe to backport to 20.03.

@vcunat vcunat merged commit 198cd3a into NixOS:master May 21, 2020
17 checks passed
17 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
bind, bind.passthru.tests, knot-resolver, knot-resolver.passthru.tests, pdns-recursor, pdns-recursor.passthru.tests on aarch64-linux Success
Details
bind, bind.passthru.tests, knot-resolver, knot-resolver.passthru.tests, pdns-recursor, pdns-recursor.passthru.tests on x86_64-darwin Success
Details
bind, bind.passthru.tests, knot-resolver, knot-resolver.passthru.tests, pdns-recursor, pdns-recursor.passthru.tests on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d0d9090"; rev="d0d90908c8cf99f09be227b339c8369a0888054d"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@vcunat vcunat deleted the vcunat:p/dns-nsnxattack branch May 21, 2020
@andir
Copy link
Member

andir commented May 22, 2020

@vcunat what would be the proper move forward for knot-resolver on the release branches? Bumping to 5.1 seems feasible.

@vcunat
Copy link
Member Author

vcunat commented May 22, 2020

Ah, yes. I thought I already bumped it during the embargo, but apparently I forgot. Incompatibilities are really tiny and so far we've confirmed no regression.

@vcunat
Copy link
Member Author

vcunat commented May 23, 2020

@rnhmjoj: for pdns-recursor in 20.03 the bump would also be larger than on master, adding https://blog.powerdns.com/2020/03/03/powerdns-recursor-4-3-0-released/ – on a brief look I see nothing that I would consider incompatible, but there are some changes in behavior.

vcunat added a commit that referenced this pull request May 23, 2020
https://www.isc.org/blogs/bind9-vulnerabilities-2020-05/
$ nix build -f nixos/release.nix tests.bind.x86_64-linux

(cherry picked from commit 13c485d)
vcunat added a commit that referenced this pull request May 23, 2020
vcunat added a commit that referenced this pull request May 23, 2020
https://www.isc.org/blogs/bind9-vulnerabilities-2020-05/
$ nix build -f nixos/release.nix tests.bind.x86_64-linux

(cherry picked from commit 13c485d)
In BIND case these are quite severe DoS risks, so let me backport to 19.09.
@rnhmjoj
Copy link
Contributor

rnhmjoj commented May 23, 2020

You are right, it may introduce some unwanted changes. Unfortunaly we have 4.3.0 on 20.03 but the the stable branch of pdns-recursor is 4.2.0, so the CVE patch are only backported to that version.

@vcunat
Copy link
Member Author

vcunat commented May 23, 2020

Ah... silly me, they released also 4.2.2 for the CVE: https://blog.powerdns.com/2020/05/19/powerdns-recursor-4-3-1-4-2-2-and-4-1-16-released/

EDIT: to be clear, 20.03 had 4.2.1, so I did the CVE-only step to 4.2.2.

vcunat added a commit that referenced this pull request May 23, 2020
https://blog.powerdns.com/2020/05/19/powerdns-recursor-4-3-1-4-2-2-and-4-1-16-released/
$ nix build -f nixos/release.nix tests.pdns-recursor.x86_64-linux
NixPkgs master is on 4.3.x already; /cc that PR #88159
vcunat added a commit that referenced this pull request May 23, 2020
https://blog.powerdns.com/2020/05/19/powerdns-recursor-4-3-1-4-2-2-and-4-1-16-released/
$ nix build -f nixos/release.nix tests.pdns-recursor.x86_64-linux
NixPkgs master is on 4.3.x already; /cc that PR #88159

(cherry picked from commit 1a02977)
@rnhmjoj
Copy link
Contributor

rnhmjoj commented May 23, 2020

EDIT: to be clear, 20.03 had 4.2.1, so I did the CVE-only step to 4.2.2.

Yeah, I was somehow convinced it was 4.3.0. Thank you.

@vcunat
Copy link
Member Author

vcunat commented Jun 1, 2020

BTW, upgrading BIND from 9.14 to 9.16 would probably be desirable soon. (But I won't be looking into that.)

BIND 9.16 has replaced 9.14 as the current stable version. This BIND release is the last one in the BIND 9.14 release train. For those needing long-term support, the current Extended Support Version (ESV) is BIND 9.11, which will be supported until at least December 2021. See https://kb.isc.org/docs/aa-00896 for details of ISC's software support policy.

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

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.