Red Hat Bugzilla – Bug 693381
dhcpd running as root
Last modified: 2011-12-06 07:00:32 EST
Description of problem:
On RHEL/Fedora dhcpd seems to be running as root although on some other widely used distributions it is running as a non-root user which is very favourable from the security point of view.
Please consider running dhcpd as non-root.
Version-Release number of selected component (if applicable):
RHEL 6.0 / RHEL 6.1 Beta
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
AFAICT dhcpd needs to be run as superuser because of using of SOCK_RAW sockets.
When you try to run dhcpd as non-root you get:
'unable to create icmp socket: Operation not permitted'
Can you be more specific in what distributions do you have in mind ?
I have tried debian stable with exactly the same results as on RHEL/Fedora,
i.e. you need to be root to start the dhcp server service (called isc-dhcp-server) or directly dhcpd there.
> Can you be more specific in what distributions do you have in mind ?
On Ubuntu dhcpd is running as user dhcpd. Interestingly, on Debian dhcpd indeed runs as root.
This is definitely in the nice-to-have category but Ubuntu has a patch to use capabilities in order to be able to drop root privileges, see:
I'm CC'ing sgrubb how can possibly comment whether it would make sense for us too to use capabilities to drop root privileges with dhcpd?
This seems to be a significant change which should be implemented upstream (in Fedora) first.
Cloned for Fedora as bug #699713
and closing this as UPSTREAM.
Thank you for the report.
Reopening for discussion about backporting this since upstream/Fedora has rootless dhcpd feature now available (bug 699713).
Although there are no known customer requests for this yet backporting this might well make sense given that RHEL 6 still has almost 6.5+3 years left as supported platform.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.