Wireshark-commits: [Wireshark-commits] master-3.0 b759633: netscaler: fix multiple out-of-bounds re

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 26 Feb 2019 19:50:17 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b7596334253ee484b9e2567d656e951b9d54c00b
Submitter: "Gerald Combs <gerald@xxxxxxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

b759633 by Dario Lombardo (lomato@xxxxxxxxx):

    netscaler: fix multiple out-of-bounds reads.
    
    Multiple bugs have been found in the provided bug. Some of them have
    been fixed in gefe920a, others here. The main problem is when malformed
    files give wrong lenghts to the code, that casts and dereference it
    without checking, causing oob reads. The fix introduces a check function
    that prevents to go beyond the limits, early returning with a malformed
    file message.
    
    Other bugs have been fixed by forcing the string terminator that allows
    the use of strlen() and MIN() that prevent wrong reads.
    
    Bug: 15497
    Change-Id: I8411208b5ea0f1a0720a17b882f704d03296d1c4
    Reviewed-on: https://code.wireshark.org/review/32194
    Petri-Dish: Gerald Combs <gerald@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    (cherry picked from commit cc926f3e9697cc77e3e51573d5002b977bb1cd68)
    Reviewed-on: https://code.wireshark.org/review/32198
    

Actions performed:

    from  490b381   netscaler: fix crash when reading malformed packets.
     add  b759633   netscaler: fix multiple out-of-bounds reads.


Summary of changes:
 wiretap/netscaler.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 60 insertions(+), 6 deletions(-)