diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2018-01-24 15:32:25 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-01-25 05:18:47 +0000 |
commit | 55fbeec607013a681dbb0e60645dca6c89b8df80 (patch) | |
tree | c882a7053ae423440eee5f50f59bbd5a52b4552c | |
parent | 369f8195e8ce054c457ebca29ed6581d11ac7e69 (diff) |
bootp: DHCP User Class Data iPXE exception
iPXE seems to violate RFC 3004 by ommitting the UC_Len_i field in the
User Class Data field. Since this seems to be a 'well known' issue,
which is not going to be corrected, detect and circumvent the error
detection for this specific use.
Bug: 14312
Change-Id: I2a15c336d7f67ee5fd83f955de7126eac146bfb1
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25450
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-bootp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index f0d941ef3d..1a9c517662 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -618,6 +618,7 @@ static expert_field ei_bootp_option125_enterprise_malformed = EI_INIT; static expert_field ei_bootp_option_6RD_malformed = EI_INIT; static expert_field ei_bootp_option82_vi_cl_tag_unknown = EI_INIT; static expert_field ei_bootp_option_parse_err = EI_INIT; +static expert_field ei_bootp_nonstd_option_data = EI_INIT; static expert_field ei_bootp_suboption_invalid = EI_INIT; static expert_field ei_bootp_secs_le = EI_INIT; static expert_field ei_bootp_end_option_missing = EI_INIT; @@ -2190,6 +2191,13 @@ dissect_bootpopt_user_class_information(tvbuff_t *tvb, packet_info *pinfo, proto return 1; } + if (!tvb_strneql(tvb, offset, "iPXE", 4)) { + /* The iPXE is known to violate RFC 3004, http://forum.ipxe.org/showthread.php?tid=7530 */ + proto_item *expert_ti = proto_tree_add_item(tree, hf_bootp_option77_user_class_data, tvb, offset, -1, ENC_NA); + expert_add_info(pinfo, expert_ti, &ei_bootp_nonstd_option_data); + return tvb_captured_length(tvb); + } + while (tvb_reported_length_remaining(tvb, offset) > 0) { /* Create subtree for instance of User Class. */ vtix = proto_tree_add_uint_format_value(tree, hf_bootp_option77_user_class, @@ -8861,6 +8869,7 @@ proto_register_bootp(void) { &ei_bootp_option_6RD_malformed, { "bootp.option.6RD.malformed", PI_PROTOCOL, PI_ERROR, "6RD: malformed option", EXPFILL }}, { &ei_bootp_option82_vi_cl_tag_unknown, { "bootp.option.option.vi.cl.tag_unknown", PI_PROTOCOL, PI_ERROR, "Unknown tag", EXPFILL }}, { &ei_bootp_option_parse_err, { "bootp.option.parse_err", PI_PROTOCOL, PI_ERROR, "Parse error", EXPFILL }}, + { &ei_bootp_nonstd_option_data, { "bootp.option.nonstd_data", PI_PROTOCOL, PI_NOTE, "Non standard compliant option data", EXPFILL }}, { &ei_bootp_suboption_invalid, { "bootp.suboption_invalid", PI_PROTOCOL, PI_ERROR, "Invalid suboption", EXPFILL }}, { &ei_bootp_secs_le, { "bootp.secs_le", PI_PROTOCOL, PI_NOTE, "Seconds elapsed appears to be encoded as little-endian", EXPFILL }}, { &ei_bootp_end_option_missing, { "bootp.end_option_missing", PI_PROTOCOL, PI_ERROR, "End option missing", EXPFILL }}, |