Subject: bin/10968: dhclient is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: Lennart Augustsson <augustss@augustsson.net>
List: netbsd-bugs
Date: 09/06/2000 23:12:16
>Number: 10968
>Category: bin
>Synopsis: dhclient is broken
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 06 23:13:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Lennart Augustsson
>Release: NetBSD-current 2000-09-07
>Organization:
>Environment:
System: NetBSD sb-hobbes 1.5E NetBSD 1.5E (HOBBES) #4: Thu Sep 7 01:08:47 EDT 2000 augustss@sb-hobbes:/usr/src/sys/arch/i386/compile/HOBBES i386
>Description:
If the data returned by ioctl(SIOCGIFCONF) exceeds 512 bytes
the code in dhcp/common/discover.c breaks.
The problem is the way buffer overflow is detected. The NetBSD
kernel just doesn't work the way the code around line 128
assumes, so a bigger buffer is never allocated.
Look at sys/net/if.c to see what happens.
>How-To-Repeat:
Have lots of interfaces and see dhclient fail with a mysterious
message about unconfigured interfaces.
>Fix:
As a workaround I upped the buffer size from 512 to 8192 again.
This is not a proper fix, but I managed to get dhclient working again
before my lease expired. :)
>Release-Note:
>Audit-Trail:
>Unformatted: