Red Hat Bugzilla – Bug 731990
dhcpd can segfault when scanning TUN interface during start
Last modified: 2011-12-06 07:01:00 EST
Created attachment 519025 [details]
Fix segmentation fault during start of dhcpd (and dhclient)
Description of problem:
When dhcpd is started a segmentation fault may occur when there are network interfaces without a hardware address. For example we have a tun0 and a tun1 device (created by a running openvpn daemon) and these do not have a hardware address. If the dhcpd scans the interfaces on start it dereferences a pointer without checking if it is NULL. Attached fix taken from here:
Version-Release number of selected component (if applicable):
Depends on the interface order - if the interfaces without a hardware address are registered before the interfaces where dhcpd should listen then 100% otherwise it is not reproducible.
Steps to Reproduce:
1. Create some tun devices
2. Create new ethernet device (or restart network)
3. Start dhcpd on this new ethernet device
dhcpd should work as expected
dhclient might be affected as well by the same issue
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
If the system included network interfaces with no hardware address, the dhcpd scan could have caused a segmentation fault when scanning such an interface. As a consequence, the dhcp daemon unexpectedly terminated. To prevent this issue, dhcpd now tests a pointer which represents the hardware address of the interface for the NULL value. The dhcp daemon no longer crashes.
*** Bug 736149 has been marked as a duplicate of this bug. ***
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.