Wireshark-commits: [Wireshark-commits] master-2.6 e51e537: prefs: fix range preferences-related cra
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 10 Aug 2018 11:52:59 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e51e537d6aea3036d517944ca53b7822d4b47b09
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

e51e537 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>
    (cherry picked from commit 0be9d149d0feaac8697b993926ffa87e156d7fa4)
    Reviewed-on: https://code.wireshark.org/review/29057
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  02c6742   HTTP: set correct server port for tunnels
     add  e51e537   prefs: fix range preferences-related crash after switching profiles


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