Wireshark-commits: [Wireshark-commits] master-3.0 7b003a8: DHCPv6: catch the NTP server suboptions
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 01 Mar 2019 12:32:44 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7b003a895c5aed4b28ad0df969260ea18cb50522
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

7b003a8 by Uwe Kleine-König (uwe@xxxxxxxxxxxxxxxxx):

    DHCPv6: catch the NTP server suboptions being longer than the whole packet
    
    A router here sends the type and length of suboptions of the NTP Server
    option in dhcpv6 replies in little endian. So the NTP Server option
    looks like:
    
    	01:00:10:00:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:ff:fe:xx:xx:xx
    
    instead of
    
    	00:01:00:10:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:ff:fe:xx:xx:xx
    
    . This makes the dissector throw an exception "Malformed Packet" which
    results in the following options not being dissected.
    
    So check the suboption's length before adding the subtree. This improves
    diagnostics ("suboption too long" instead of "Malformed Packet") and
    results in the suboptions after the bogus one being parsed.
    
    Bug: 15542
    Change-Id: Ifbafc23b3dbb7ca389b89936e9d1d15ecc82396e
    Reviewed-on: https://code.wireshark.org/review/32223
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Dario Lombardo <lomato@xxxxxxxxx>
    (cherry picked from commit acb406ff345e0d3ace4be715b220c45af07b2b20)
    Reviewed-on: https://code.wireshark.org/review/32284
    Petri-Dish: Dario Lombardo <lomato@xxxxxxxxx>
    

Actions performed:

    from  ad2eeef   CMake: Don't build Windows package targets by default.
     add  7b003a8   DHCPv6: catch the NTP server suboptions being longer than the whole packet


Summary of changes:
 epan/dissectors/packet-dhcpv6.c | 4 ++++
 1 file changed, 4 insertions(+)