|
|||||||||||
|
system/2888: dhcp server mishandles long requested lease times
From: <openbsd(at)nerd-marrow.com>
Date: Fri Aug 16 2002 - 13:40:18 EDT
System : OpenBSD 3.1 Architecture: OpenBSD.i386 Machine : i386 >Description:
When the DHCP server recieves a DHCP request from a client with a very long
lease time (Linux's dhcpcd uses ~0 by default), the server treats it as a
negative number, and a lease is generated that ends before it starts.
Have a Linux (I used Red Hat 7.3) client request a lease from an OpenBSD
server. Then inspect the /var/db/dhcpd.leases file. Note that the "ends"
field is one second before the "starts" field.
Apply the enclosed patch to usr.sbin/dhcp/server/dhcp.c Note that this patch does NOT address all the other possible overflow failures in this code.
/* Don't let the client ask for a longer lease than is supported for this subnet or host. */ - if (lease_time > max_lease_time) + if (lease_time < 1 || lease_time > max_lease_time) lease_time = max_lease_time; } else lease_time = default_lease_time; >Release-Note:
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:37 EDT |
||||||||||
|
|||||||||||