Skip to content

libnet: Don't forward to upstream resolvers on internal nw#46609

Closed
akerouanton wants to merge 3 commits intomoby:masterfrom
akerouanton:libnet-resolver-nxdomain
Closed

libnet: Don't forward to upstream resolvers on internal nw#46609
akerouanton wants to merge 3 commits intomoby:masterfrom
akerouanton:libnet-resolver-nxdomain

Conversation

@akerouanton
Copy link
Member

@akerouanton akerouanton commented Oct 10, 2023

- What I did

First commit adds a way to enable/disable upstream forwarding to the embedded resolver. When an endpoint joins/leaves a sandbox, this forwarding policy is modified based on whether there's an endpoint providing external connectivity.

Second commit ensures the resolver return a REFUSED response with the RA bit (ie. Recursion Available) unset when upstream forwarding is disabled and no matching container/alias can be found.

- Description for the changelog

  • The embedded DNS resolver now returns a REFUSED response when upstream forwarding is disabled (ie. on internal networks, or on Windows) and no container/alias match the queried name.

- A picture of a cute animal (not mandatory but encouraged)

@akerouanton akerouanton added status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. area/networking Networking impact/changelog area/networking/dns Networking labels Oct 10, 2023
@akerouanton akerouanton changed the title Libnet resolver nxdomain libnet: Don't forward to upstream resolvers on internal nw Oct 10, 2023
@akerouanton akerouanton force-pushed the libnet-resolver-nxdomain branch 2 times, most recently from 48182ae to 04328c5 Compare October 10, 2023 08:40
@akerouanton akerouanton force-pushed the libnet-resolver-nxdomain branch 2 times, most recently from 1aac557 to 06a8690 Compare October 12, 2023 12:23
@akerouanton akerouanton force-pushed the libnet-resolver-nxdomain branch 14 times, most recently from 73b3c9f to 977cf2d Compare October 19, 2023 17:21
@akerouanton akerouanton self-assigned this Oct 25, 2023
@akerouanton akerouanton force-pushed the libnet-resolver-nxdomain branch 3 times, most recently from 85ab3d4 to eeaac96 Compare December 18, 2023 23:16
@ArchanaWind
Copy link

HI,
CVE-2024-29018 is created for this issue, is moby_20.10.x is vulnerable to this bug

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking/dns Networking area/networking Networking impact/changelog kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants