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

TCP listen on port 9253 on all interface addresses creates security vulnerability #542

Open
amshankaran opened this issue Sep 5, 2022 · 5 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@amshankaran
Copy link

amshankaran commented Sep 5, 2022

K8s cluster is installed on VMs/worker nodes having multiple interfaces. Couple of interfaces have external connectivity towards DC-GW. dns-node-cache (node-local-dns) listens on 9253 for prometheus. But this TCP listens on all the interfaces including external interfaces.
This makes cluster vulnerable to DoS attack.

worker-pool1-z92h78yx-stack:~ # lsof -i -n -P | grep :9253
node-cach 4720 root 8u IPv6 41286 0t0 TCP *:9253 (LISTEN)

As per prometheus plugins suggestion, if we configure an IP address, X.X.X.X:9253 it will be specific to the particular node with address X.X.X.X. In a multi-node cluster, this configuration in configmap will fail the bind with node address Y.Y.Y.Y

A configuration required to Listen on nodes InternalIP, which can solve this issue. (InternalIP:9253)

@amshankaran
Copy link
Author

corefile.txt
Attaching the node-local-dns corefile

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 4, 2022
@dpasiukevich
Copy link
Member

/remove-lifecycle stale
/help

@k8s-ci-robot
Copy link
Contributor

@dpasiukevich:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/remove-lifecycle stale
/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 5, 2022
@Goend
Copy link

Goend commented Nov 10, 2023

@amshankaran you can close by set args

args: [ "-localip", "169.254.20.10,{{ skydns_server }}", "-conf", "/etc/Corefile","-metrics-listen-address", "0", "-upstreamsvc", "kube-dns-upstream" ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

5 participants