QUIC: fix UAF crash related to the Info column for Long Header messages
Packet 2478 in capture 15142 triggers a UAF crash since val_to_str is packet-scoped and by the time tshark reads the column, it is destroyed. Bug: 15142 Change-Id: If8df858c6a295fbac57c758577fb51b288e7f44a Reviewed-on: https://code.wireshark.org/review/30104 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
5a2aafef7a
commit
03bf0e2306
|
@ -1897,7 +1897,7 @@ dissect_quic_long_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *quic_tre
|
|||
|
||||
proto_tree_add_item_ret_uint(quic_tree, hf_quic_long_packet_type, tvb, offset, 1, ENC_NA, &long_packet_type);
|
||||
offset += 1;
|
||||
col_set_str(pinfo->cinfo, COL_INFO, val_to_str(long_packet_type, quic_long_packet_type_vals, "Long Header"));
|
||||
col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(long_packet_type, quic_long_packet_type_vals, "Long Header"));
|
||||
|
||||
offset = dissect_quic_long_header_common(tvb, pinfo, quic_tree, offset, quic_packet, &version, &dcid, &scid);
|
||||
|
||||
|
|
Loading…
Reference in New Issue