Wireshark-commits: [Wireshark-commits] master-2.2 672d882: tvbuff_zlib: reject negative lengths to
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 29 May 2018 16:39:11 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=672d882a53f96730e4ef1e5b1639c585823b0df8
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

672d882 by Peter Wu (peter@xxxxxxxxxxxxx):

    tvbuff_zlib: reject negative lengths to avoid buffer overrun
    
    Negative lengths and empty buffers are not uncompressable, reject them.
    A buffer overrun (read) could occur otherwise due to unsigned "avail_in"
    becoming insanely large.
    
    Bug: 14675
    Change-Id: I20b686cc6ad6ef8a8d1975ed3d2f52c8eb1f1c76
    Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7166
    Reviewed-on: https://code.wireshark.org/review/27561
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 9ee790e99c72ddb5b599b8076b4ecf74611b184e)
    Reviewed-on: https://code.wireshark.org/review/27901
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  24c3030   mmse: remove a ton of if (tree) checks
    adds  672d882   tvbuff_zlib: reject negative lengths to avoid buffer overrun


Summary of changes:
 epan/tvbuff_zlib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)