...no. Privileged ports are a way to prevent an unprivileged user from turning a service crash into a service takeover.
Windows Firewall seems to sort of mitigate this by only permitting a given program to communicate on a port, but -from what my testing revealed- it does not prevent other programs from _binding_ to that port. So, I strongly suspect that on Windows systems, an unprivileged user can turn a service crash into a service DoS by racing to bind to the service's port.
Whilst privileged ports are indeed used for that purpose, that doesn't mean they aren't a wart.
There's no necessary technical reason why unprivileged users can't bind to port 80, except that the designers of the network API decided to equate successfully binding to a port with having permission to receive connection requests for that port.
This leads to unpleasant situations like a web server having to run as root, even if (usually) only temporarily, solely because it needs to bind port 80.
This makes less sense especially with Docker, since even if a containerized web server binds to port 80, it won't receive connections from the outside world unless the container is configured to forward the "real" port 80 to it.
not on modern linux. see CAP_NET_BIND_SERVICE in `man 7 capabilities`.
I agree that there are situations that not-infrequently arise that require additional IP port access restrictions. However, do you agree that removing the notion of privileged ports [0] would
1) Not give you the more-fine grained access restrictions that you're looking for
2) Actually weaken security on Linux systems
? (Additionally, GRSecurity, SELinux, and -apparently- AppArmor all appear to provide the finer-grained control that you're looking for. There is also this [1] which lets you do something like what Windows Firewall does and use iptables to restrict which uid/gids can do certain types of IP communication.)
[0] That is to say, remove the restriction that one must run as root to bind to ports < 1024.
[1] https://www.debian-administration.org/article/120/Applicatio... [2]
[2] Even though the kconfig option has changed names, it appears to serve the same function (see the Owner section of [3])
It's a good thing raw sockets require root. Raw sockets are incredibly powerful tools that can be used for all sorts of mischief (including source address spoofing in case of udp, so perfect for various dos attacks)
It's a feature if some clueless user that just downloaded some Trojan flash player update can't fire off a DNS reflection attack against a third party