#3572 new defect

DHCP request includes host name option even if hostname is zero length

Reported by: Sal Owned by:
Priority: normal Milestone:
Component: network/legacy Version: 4.10
Severity: normal Keywords: DHCP hostname
Cc: Blocked By:
Blocking:

Description

DHCP requests add the hostname option in dhcp_request_req() without checking its length, so the hostname can be of any length. This is a defect because the DHCP spec (https://tools.ietf.org/html/rfc2132) requires the hostname to have a minimum length of 1 char.
This appears to trigger a bug in a specific Netgear router that causes it's DHCP process to lock up and could affect other things as well.

This bug can be solved applying the patch made by Aun-Ali Zaidi in the original ticket reporting this defect (https://devel.rtems.org/ticket/1405) that was never applied. I've also attached the patch in this ticket.
I've been able to compile the code with the patch applied and it didn't raise any warnings.

Original ticket: https://devel.rtems.org/ticket/1405

Attachments (2)

0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2.patch (2.2 KB) - added by Sal on Oct 27, 2018 at 7:09:12 PM.
Patch to checks the lenght of the hostname, therefore to solve to bug
0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2.2.patch (2.2 KB) - added by Sal on Nov 13, 2018 at 10:54:10 PM.
Patch to check the length of the hostname, therefore to solve the bug.

Download all attachments as: .zip

Change History (2)

Changed on Oct 27, 2018 at 7:09:12 PM by Sal

Patch to checks the lenght of the hostname, therefore to solve to bug

Changed on Nov 13, 2018 at 10:54:10 PM by Sal

Patch to check the length of the hostname, therefore to solve the bug.

Note: See TracTickets for help on using tickets.