Bug 693381 - dhcpd running as root
dhcpd running as root
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dhcp (Show other bugs)
6.1
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jiri Popelka
Release Test Team
: Reopened
Depends On: 699713 737571
Blocks: 743047 748554
  Show dependency treegraph
 
Reported: 2011-04-04 09:52 EDT by Marko Myllynen
Modified: 2011-12-06 07:00 EST (History)
6 users (show)

See Also:
Fixed In Version: dhcp-4.1.1-25.P1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 07:00:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marko Myllynen 2011-04-04 09:52:02 EDT
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
Comment 2 RHEL Product and Program Management 2011-04-04 09:54:53 EDT
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.
Comment 3 Jiri Popelka 2011-04-05 10:43:41 EDT
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.
Comment 4 Marko Myllynen 2011-04-05 11:37:29 EDT
> 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:

http://packages.ubuntu.com/natty/isc-dhcp-server
http://archive.ubuntu.com/ubuntu/pool/main/i/isc-dhcp/isc-dhcp_4.1.1-P1-15ubuntu6.diff.gz

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?

Thanks.
Comment 6 Jiri Popelka 2011-04-26 08:52:11 EDT
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.
Comment 7 Marko Myllynen 2011-09-12 05:53:18 EDT
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.
Comment 20 errata-xmlrpc 2011-12-06 07:00:32 EST
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.

http://rhn.redhat.com/errata/RHBA-2011-1597.html

Note You need to log in before you can comment on or make changes to this bug.