Re:Linux 3.9 introduced a new way of writing socket servers
by takeda64 on Saturday August 24, 2013 @11:30PM
(#6270782)
As I understand you need to have the same EUID to be able to bind to the same port.
Re:Linux 3.9 introduced a new way of writing socket servers
by subim on Saturday August 24, 2013 @11:40PM
(#6270811)
That's right. This article doesn't mention it, but the LWN article it cited (https://lwn.net/Articles/542629/) does.
Let's say that we are running a server on a port which uses this option to allow multiple processes to bind to it. What's to prevent a rogue process, perhaps with malicious intent, from starting up and siphoning off requests willy nilly? Sounds like a great way to implement a hard to detect MITM attack.
What would be nicer, I think, is if socket reusing was bound not only to the same uid but also to the process listening to it.