| > You don't have to deploy traefik with docker. Sure but in my case that was the whole idea. > If you want traefik to monitor new docker containers to add routes for them, of course traefik needs to talk to the docker api to do so. Yes, but it wouldn't be necessary for the network-facing part of Traefik to talk to the Docker API. There could be a second container (w/o network access) whose only task it is to talk to the Docker socket and generate a config and write that config to a shared volume. > However, there's no real vulnerability. In the present situation Traefik (with Docker integration) is effectively running as root. I don't think it's up for debate that this is much worse than just running Traefik as a normal user (outside Docker). Besides, most users expect applications running in Docker containers to be more secure – not less secure – than running them on the bare system. > This would be like saying "traefik uses the linux kernel api to open files, but the linux kernel requires traefik validate what goes into that api or else it could allow file path traversal"... But traefik does validate filepaths and so no one makes that complaint. No. This would be like saying "Traefik has full access to the kernel and the entire OS and the only thing preventing a hacker from exploiting this is Traefik validating incoming network requests." Do you also run your other web servers as root? > Similarly, traefik does validate that only safe docker api calls are made This is completely irrelevant. Once a hacker is inside the Traefik process (i.e. can execute code under Traefik's PID), he can access the Docker socket and therefore the entire system as she/he pleases. |
I'm not arguing that there's not a better option. In fact, when I say this is a "defense in depth" issue, that's exactly what I mean. It would improve security. It would be better. But there is no active vulnerability to be exploited. If the system works as intended, this doesn't cause any issues, it's only an issue if there are other real vulnerabilities.
> Do you also run your other web servers as root?
Yes, because capsh --cap-add NET_ADMIn is poorly understood and poorly used I run many other servers as root.
Admittedly, many of them are written in other languages such as C and fork workers that drop privileges because the c stdlib (libc) supports that easily.
Traefik is written in go where forking workers that drop privileges is much harder. Go doesn't use libc, and setuid doesn't actually work correctly [0], so of course it doesn't drop privileges like other software written in better languages.
> This is completely irrelevant. Once a hacker is inside the Traefik process (i.e. can execute code under Traefik's PID)
That's the entire point. It requires an attacker to exploit a real security issue, therefore this hardening you're talking about is a defense in depth.
The way you're talking about it, you make it sound like there's an active vulnerability, not just a defense in depth improvement. They're vastly different.
The developers are not ignoring a real vulnerability, and your all-or-nothing stance on this issue is un-nuanced to the point of harming your communication about it.
My previous offer is still on: $500 bucks that you can't exploit this if I link you to a traefik configured in this way you refuse to run it.
[0]: https://github.com/golang/go/issues/1435