Bug 623953 - Multiple dhclients can steal each others' DHCPOFFERs
Summary: Multiple dhclients can steal each others' DHCPOFFERs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: dhcp
Version: 5.7
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Popelka
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 694798
TreeView+ depends on / blocked
 
Reported: 2010-08-13 09:18 UTC by Simone Caldana
Modified: 2011-07-21 10:58 UTC (History)
3 users (show)

Fixed In Version: dhcp-3.0.5-27.el5
Doc Type: Bug Fix
Doc Text:
Previously, when multiple DHCP clients were launched at the same time to handle multiple virtual interfaces on the same network interface card (NIC), the clients used the same seed to choose when to renew their leases. Consequently, virtual interfaces for some clients could have been deconfigured over time. With this update, the dhclient utility uses the PID (Process Identifier) for seeding the random number generator, which fixes the bug.
Clone Of:
: 694798 (view as bug list)
Environment:
Last Closed: 2011-07-21 10:58:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
example dhclient.conf (639 bytes, text/plain)
2010-08-13 09:18 UTC, Simone Caldana
no flags Details
extract from example dhcpd.conf (936 bytes, text/plain)
2010-08-13 09:19 UTC, Simone Caldana
no flags Details
Patch to use PID for seeding the random number generator (520 bytes, patch)
2010-08-13 09:21 UTC, Simone Caldana
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1038 0 normal SHIPPED_LIVE dhcp bug fix and enhancement update 2011-07-20 15:43:54 UTC

Description Simone Caldana 2010-08-13 09:18:45 UTC
Created attachment 438631 [details]
example dhclient.conf

Description of problem:
when multiple dhclients are launched at the same time to handle multiple virtual interface on the same NIC they use the same seed to choose when "randomly" renew the lease. This may lead to one dhclient pick up a DHCPOFFER that was meant for another dhclient. 
In a configuration where dhcpd assigns static addresses (based for example on a certain dhcp-client-identifier) this leads to NAKs when the stealing dhclient tries to renew the "wrong" lease it picked up. After a while it gives up and the virtual interface is deconfigured.

Version-Release number of selected component (if applicable):
verified in 3.0.5, currently existing in all versions (no patch applied upstream by ISC)

How reproducible:
it's a matter of timing, but it happens fairly often

Steps to Reproduce:
1. set up a dhclient.conf with multiple virtual interfaces defining different dhcp-client-identifier (example attached)
2. configure dhcpd to send static ips based on dhcp-client-identifier (example attached). using a short lease time helps reproduce the issue.
3. launch multiple dhclients on client pointing them at the various interfaces ( eth0:1, eth0:2, etc)
4. look out for NAKs in dhcpd logs and eventually to virtual interfaces disappareance on the client.
  
Actual results:
client's virtual interface disappears over time

Expected results:
client virtual interfaces do not disappear over time and no NAK is seen in dhcp logs

Additional info:
Patch for 3.0.5-Redhat is attached. Credits should go to Jeremiah Jinno <jeremiah.jinno_at_gmail.com> who discovered the root cause and proposed a patch: https://lists.isc.org/mailman/htdig/dhcp-users/2010-June/011521.html

Comment 1 Simone Caldana 2010-08-13 09:19:32 UTC
Created attachment 438632 [details]
extract from example dhcpd.conf

Comment 2 Simone Caldana 2010-08-13 09:21:44 UTC
Created attachment 438634 [details]
Patch to use PID for seeding the random number generator

Comment 3 RHEL Program Management 2011-01-11 20:35:13 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. 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 4 RHEL Program Management 2011-01-11 22:28:14 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 8 Tomas Capek 2011-05-31 08:19:59 UTC
    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.
    
    New Contents:
Previously, when multiple DHCP clients were launched at the same time to handle multiple virtual interfaces on the same network interface card (NIC), the clients used the same seed to choose when to renew their leases. Consequently, virtual interfaces for some clients could have been deconfigured over time. With this update, the dhclient utility uses the PID (Process Identifier) for seeding the random number generator, which fixes the bug.

Comment 10 errata-xmlrpc 2011-07-21 10:58:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

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


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