Project

General

Profile

Actions

Feature #13584

closed

Input validation for numbered DHCP options in static mappings

Added by Jonathan DeFreeuw over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Category:
DHCP (IPv4)
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Default

Description

Bug: Incorrectly formatted values in Additional BOOTP/DHCP Options for Static DHCP Mappings cause dhcpd to crash. For example, the Option

43:Text:"Raspberry Pi Boot   " 

will save as expected and apply, but dhcpd logs will show a failure.

Oct 19 12:41:43    dhcpd    86624    exiting.
Oct 19 12:41:43    dhcpd    86624    process and the information we find helpful for debugging.
Oct 19 12:41:43    dhcpd    86624    before submitting a bug. These pages explain the proper
Oct 19 12:41:43    dhcpd    86624    bugs on either our web page at www.isc.org or in the README file
Oct 19 12:41:43    dhcpd    86624    than a configuration issue please read the section on submitting
Oct 19 12:41:43    dhcpd    86624    If you think you have received this message due to a bug rather
Oct 19 12:41:43    dhcpd    86624    Configuration file errors encountered -- exiting
Oct 19 12:41:43    dhcpd    86624    ^
Oct 19 12:41:43    dhcpd    86624    option custom-s_lan_0-0 ""Raspberry
Oct 19 12:41:43    dhcpd    86624    /etc/dhcpd.conf line 47: semicolon expected.

Fix: Perform input validation in the Additional BOOTP/DHCP Options fields for Static DHCP Mappings entries in services_dhcp_edit.php:158 just as is currently being done in services_dhcp.php:477 .

Not a PHP developer in the slightest so don't really know where to start to actually implement and test any sort of input validation, but if someone wanted to walk me through some steps to get started, I'd be happy to take a crack at it and submit a pull request.


Files

clipboard-202210271205-fgbxc.png (50.3 KB) clipboard-202210271205-fgbxc.png Danilo Zrenjanin, 10/27/2022 05:05 AM

Related issues

Has duplicate Bug #13954: Invalid custom DHCP option data can cause the DHCP daemon to failDuplicate

Actions
Actions

Also available in: Atom PDF