Report information
The Basics
Id:
41358
Status:
resolved
Estimated:
24 hours (1,440 minutes)
Worked:
8 hours (480 minutes)
Users:
tmark: 8 hours (480 minutes)
Left:
24 hours (1,440 minutes)
Priority:
Low/Low
Queue:

People
Requestors:
Cc:
AdminCc:

BugTracker
Version Fixed:
4.4.0 4.3.6 4.1-ESV-R15
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
4.4.0
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
DHCP Server
Area:
bug

Dates
Created:Mon, 21 Dec 2015 13:39:07 -0500
Updated:Tue, 12 Dec 2017 07:38:34 -0500
Closed:Tue, 04 Oct 2016 15:10:01 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: dhcpd inappropriately frees lease
Date: Mon, 21 Dec 2015 12:39:01 -0600
To: dhcp-bugs@isc.org
From: "David Zych" <dmrz@illinois.edu>
When a client using option 61 client identifier moves to a new network and obtains a lease, its lease for an IP on the old network is inappropriately freed by dhcpd. Server: isc-dhcpd-4.3.3, compiled with --enable-log-pid --enable-delayed-ack --enable-binary-leases and running on Red Hat 6.7. ip = 128.174.204.220 Client: Peppermint 6 (VM with bridged network adapter) mac = 08:00:27:16:86:31 DHCP client ID = \001\x08\x00\x27\x16\x86\x31 Two networks with DHCP relay pointing to this server. Steps: 1. start dhcpd (with initially empty leases file) 2. attach client to first network, obtain lease 3. disconnect client 4. attach client to second network, obtain lease 5. Observe in leases file that the first lease has been inappropriately freed. ts-dhcp@dhcp-dev1:~$ cat /services/ts-dhcp/etc/dhcpd-test.conf lease-file-name "/services/ts-dhcp/var/lib/dhcpd/dhcpd-test.leases"; log-facility local7; default-lease-time 3600; max-lease-time 3600; min-lease-time 3600; dhcp-cache-threshold 0; # local subnet subnet 128.174.204.0 netmask 255.255.254.0 { not authoritative; } subnet 192.17.12.0 netmask 255.255.255.224 { option routers 192.17.12.1; pool { range 192.17.12.10 192.17.12.20; } } subnet 172.21.195.0 netmask 255.255.255.240 { option routers 172.21.195.1; pool { range 172.21.195.10 172.21.195.14; } } ts-dhcp@dhcp-dev1:~$ rm ~/var/lib/dhcpd/dhcpd-test.leases; touch ~/var/lib/dhcpd/dhcpd-test.leases ts-dhcp@dhcp-dev1:~$ sudo /services/smg-p/bin/dhcpd -f -cf /services/ts-dhcp/etc/dhcpd-test.conf -d Internet Systems Consortium DHCP Server 4.3.3 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Config file: /services/ts-dhcp/etc/dhcpd-test.conf Database file: /services/ts-dhcp/var/lib/dhcpd/dhcpd-test.leases PID file: /services/ts-dhcp/var/run/dhcpd.pid Source compiled to use binary-leases Wrote 0 leases to leases file. Listening on LPF/eth0/00:50:56:8c:50:67/128.174.204.0/23 Sending on LPF/eth0/00:50:56:8c:50:67/128.174.204.0/23 Sending on Socket/fallback/fallback-net Server starting service. DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPDISCOVER from 08:00:27:16:86:31 via 192.17.12.1 DHCPOFFER on 192.17.12.10 to 08:00:27:16:86:31 (p6test1) via 192.17.12.1 DHCPREQUEST for 192.17.12.10 (128.174.204.220) from 08:00:27:16:86:31 (p6test1) via 192.17.12.1 DHCPACK on 192.17.12.10 to 08:00:27:16:86:31 (p6test1) via 192.17.12.1 DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPREQUEST for 192.17.12.10 from 08:00:27:16:86:31 (p6test1) via 172.21.195.1: ignored (not authoritative). DHCPDISCOVER from 08:00:27:16:86:31 via 172.21.195.1 DHCPOFFER on 172.21.195.10 to 08:00:27:16:86:31 (p6test1) via 172.21.195.1 DHCPREQUEST for 172.21.195.10 (128.174.204.220) from 08:00:27:16:86:31 (p6test1) via 172.21.195.1 DHCPACK on 172.21.195.10 to 08:00:27:16:86:31 (p6test1) via 172.21.195.1 DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases DHCPDISCOVER from 00:10:18:72:58:e9 via eth0: network 128.174.204.0/23: no free leases ^C (note: please ignore the lines about 00:10:18:72:58:e9, this is an errant box which happens to live on the locally attached subnet of the server) ts-dhcp@dhcp-dev1:~$ cat ~/var/lib/dhcpd/dhcpd-test.leases # The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.3 server-duid "\000\001\000\001\036\012\371{\000PV\214Pg"; lease 192.17.12.10 { starts 1 2015/12/21 17:55:24; ends 1 2015/12/21 18:55:24; cltt 1 2015/12/21 17:55:24; binding state active; next binding state free; rewind binding state free; hardware ethernet 08:00:27:16:86:31; uid "\001\010\000'\026\2061"; client-hostname "p6test1"; } lease 192.17.12.10 { starts 1 2015/12/21 17:55:24; ends 1 2015/12/21 17:56:28; tstp 1 2015/12/21 17:56:28; cltt 1 2015/12/21 17:55:24; binding state free; hardware ethernet 08:00:27:16:86:31; uid "\001\010\000'\026\2061"; } lease 172.21.195.10 { starts 1 2015/12/21 17:56:29; ends 1 2015/12/21 18:56:29; cltt 1 2015/12/21 17:56:29; binding state active; next binding state free; rewind binding state free; hardware ethernet 08:00:27:16:86:31; uid "\001\010\000'\026\2061"; client-hostname "p6test1"; } Note that the bug does *not* appear (i.e. lease 192.17.12.10 remains active, as it should) if the client does not send option 61. I've attached a packet capture (from the server) containing the nine relevant packets. -- David Zych Lead Network Service Engineer University of Illinois Technology Services

Message body not shown because it is not plain text.

On Mon Dec 21 18:39:07 2015, dmrz@illinois.edu wrote: > When a client using option 61 client identifier moves to a new network > and obtains a lease, its lease for an IP on the old network is > inappropriately freed by dhcpd. Hi, David -- Thank you for the report and the packet captures; we've recently been looking into this issue because someone else just pointed it out to us about a week ago. What we told them was that we believe the behavior of the server is incorrect in this case and we'll take a look at fixing it, but the schedule for the maintenance releases already in progress is already set (and nearing its end) so unless this is causing a crisis for operators it will probably take a little while before we can schedule work on it. But it is on our list to look into. Michael McNally ISC Support
Subject: Re: [ISC-Bugs #41358] dhcpd inappropriately frees lease
Date: Tue, 22 Dec 2015 15:37:13 -0600
To: dhcp-bugs@isc.org
From: "David Zych" <dmrz@illinois.edu>
On 12/21/2015 04:39 PM, Michael McNally via RT wrote: > On Mon Dec 21 18:39:07 2015, dmrz@illinois.edu wrote: >> When a client using option 61 client identifier moves to a new network >> and obtains a lease, its lease for an IP on the old network is >> inappropriately freed by dhcpd. > > What we told them was that we believe the behavior > of the server is incorrect in this case and we'll > take a look at fixing it, but the schedule for the > maintenance releases already in progress is already > set (and nearing its end) so unless this is causing > a crisis for operators it will probably take a little > while before we can schedule work on it. Not a crisis; I will happily look forward to seeing it fixed in a future release. Thanks, and happy holidays! David
Hello David: I've attached a patch which should correct this issue for you, if you have time to test it, your feedback would be most welcome. The changes are small and should be easy enough to apply. We'll be including this change in our upcoming relesae 4.4.0 though a firm date for the release has not been established yet. You're taking the time to include detailed information and packet traces is greatly appreciated. We typically like to thank our contributors by citing them in the release notes. If you would like to be recognized in this way plesae let me know how you care to be identified. Typically it's by name and/or organization. If you run into issues with the patch, let us know. Sincerly, Thomas Markwalder ISC Software Engineering
Subject: 41358.patch

Message body not shown because it is not plain text.

Subject: Re: [ISC-Bugs #41358] dhcpd inappropriately frees lease
Date: Wed, 28 Sep 2016 18:42:57 -0500
To: dhcp-review@isc.org
From: "David Zych" <dmrz@illinois.edu>
On 09/23/2016 09:29 AM, Thomas Markwalder via RT wrote: > I've attached a patch which should correct this issue for you, if you have time to test it, your feedback would be most welcome. This patch (applied to 4.3.4) does indeed appear to resolve the problem for my test case. FWIW, having now perused the affected section of code, I think there is a simpler alternative patch (attached) which improves rather than lessens the overall symmetry between the blocks enclosed by while (uid_lease) { ... } and while (hw_lease) { ... } > You're taking the time to include detailed information and packet traces is greatly appreciated. We typically like to thank our contributors by citing them in the release notes. If you would like to be recognized in this way plesae let me know how you care to be identified. Typically it's by name and/or organization. David Zych at University of Illinois Thanks! David

Message body is not shown because sender requested not to inline it.