Wireshark-commits: [Wireshark-commits] master 0be9d14: prefs: fix range preferences-related crash a
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 09 Aug 2018 04:53:01 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0be9d149d0feaac8697b993926ffa87e156d7fa4
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

0be9d14 by Peter Wu (peter@xxxxxxxxxxxxx):

    prefs: fix range preferences-related crash after switching profiles
    
    The HTTP dissector could crash (use-after-free) after switching
    profiles. In reinit_http, it would assign the return value from
    prefs_get_range_value to a global variable which is consulted during
    dissection. This value is invalidated while switching profiles (via the
    "prefs_reset" function), but is not reinitialized (because the
    reinit_http function was not called).
    
    A similar issue exists in the Kafka, UAUDP, VNC, TFTP, Gopher and TDS
    dissectors. To reproduce using a capture from the SampleCaptures wiki,
    start "wireshark -r vnc-sample.pcap -ovnc.tcp.port:1" and switch
    profiles. For the HTTP crash, load any HTTP pcap and switch profiles.
    
    Change-Id: I8725615504a8a82ae46255625a41e2188c07320a
    Fixes: v2.3.0rc0-2097-g21a3b8cc71 ("Internalize struct preference")
    Reviewed-on: https://code.wireshark.org/review/29030
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  5e2e9de   Pass zero-length PSDU type information to the radio dissector.
     add  0be9d14   prefs: fix range preferences-related crash after switching profiles


Summary of changes:
 epan/prefs.c | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)