Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a limit to be set on the decompressed buffer size for ZlibDecoders #9924

Merged
merged 8 commits into from Jan 31, 2020

Commits on Jan 7, 2020

  1. Allow a limit to be set on the decompressed buffer size for ZlibDecoders

    Motivation:
    It is impossible to know in advance how much memory will be needed to
    decompress a stream of bytes that was compressed using the DEFLATE
    algorithm. In theory, up to 1032 times the compressed size could be
    needed. For untrusted input, an attacker could exploit this to exhaust
    the memory pool.
    
    Modifications:
    ZlibDecoder and its subclasses now support an optional limit on the size
    of the decompressed buffer. By default, if the limit is reached,
    decompression stops and a DecompressionException is thrown. Behavior
    upon reaching the limit is modifiable by subclasses in case they desire
    something else.
    
    Result:
    The decompressed buffer can now be limited to a configurable size, thus
    mitigating the possibility of memory pool exhaustion.
    rdicroce committed Jan 7, 2020
    Copy the full SHA
    644b126 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2020

  1. Fix Checkstyle violation

    rdicroce committed Jan 9, 2020
    Copy the full SHA
    57e272a View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2020

  1. Addressed review comments

    rdicroce committed Jan 23, 2020
    Copy the full SHA
    f90f446 View commit details
    Browse the repository at this point in the history
  2. Fix Checkstyle issue

    rdicroce committed Jan 23, 2020
    Copy the full SHA
    5cf4389 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2020

  1. Resolved review comments

    rdicroce committed Jan 29, 2020
    Copy the full SHA
    d9f0057 View commit details
    Browse the repository at this point in the history
  2. Fix checkstyle violation

    rdicroce committed Jan 29, 2020
    Copy the full SHA
    4666459 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2020

  1. Copy the full SHA
    9b0378b View commit details
    Browse the repository at this point in the history
  2. Fix tests

    rdicroce committed Jan 30, 2020
    Copy the full SHA
    3c32693 View commit details
    Browse the repository at this point in the history