BIND 10 #2681: DHCPv6 server crashes on Solicit and Request when pool has been exhausted.

BIND 10 Development do-not-reply at isc.org
Mon Feb 11 10:39:38 UTC 2013


#2681: DHCPv6 server crashes  on Solicit and Request when pool has been exhausted.
-------------------------------------+-------------------------------------
            Reporter:  marcin        |                        Owner:
                Type:  defect        |  stephen
            Priority:  high          |                       Status:
           Component:  dhcp6         |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-DHCP-20130214
         Sub-Project:  DHCP          |                   Resolution:
Estimated Difficulty:  0             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  High
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by marcin):

 * owner:  marcin => stephen


Comment:

 '''src/bin/dhcp4/dhcp4_messages.mes'''
 The formats of the DHCP4_PACKET_PROCESS_FAIL and DHCP6_PACKET_PROCESS_FAIL
 are inconsistent. The former takes just one argument that is used to log
 an exception string. The latter takes 2 more arguments that are used to
 log the name of the packet and remote address. The purpose of the debug
 message is to help root cause issues so it should provide as much
 information as possible. Therefore, I suggest that the debug message for
 DHCPv4 server provides the same level of information as the message logged
 by DHCPv6 server.
 I realize that the error message carried by the exception being caught may
 already include the detailed information but we shouldn't rely on this
 because someone may extend the processX() function and the new code may
 emit an exception without the detailed data.

 '''src/lib/dhcpsrv/alloc_engine.cc'''
 Please update the date in the copyright header to 2013.

 '''allocateAddress6''': Line 205: The ''reuseExpiredLease()'' function may
 throw at least two types of exceptions derived from ''isc::Exception''.
 These are: ''!NoSuchLease'' and ''!DbOperationError''. If these exceptions
 are thrown from the line 205 it is not caught. Note that if the same
 function throws an exception a few lines further (line 251) the
 ''DHCPSRV_ADDRESS6_ALLOC_ERROR'' is logged.

 This has another implication that the client will not receive the
 ''!NoAddrsAvail'' status code because the code section that starts in
 ''dhcp6_srv.cc, line 654'' will not be executed.

 '''allocateAddress4:''' This function suffers from the same issue as the
 ''allocateAddress6'' function. Thankfully, we don't need to reply to the
 client that we could not allocate the lease and the exceptions will be
 eventually caught by the try-catch surrounding processX() functions.
 Nevertheless, for this function we should choose whether we catch
 exceptions, log an error within the function and return NULL pointer OR
 that we  catch exceptions externally. The current code returns a
 combination of exceptions and NULL pointers for similar issues.

 We should add a !ChangeLog entry for this bug fix.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2681#comment:4>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list