]> source.dussan.org Git - tigervnc.git/commit
Make ZlibInStream more robust against failures
authorPierre Ossman <ossman@cendio.se>
Tue, 10 Sep 2019 09:05:48 +0000 (11:05 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 15 Nov 2019 09:53:26 +0000 (10:53 +0100)
commitd61a767d6842b530ffb532ddd5a3d233119aad40
treed2facc2d59760bdee45f66e4a07f30a8774efce7
parentbbbb67ee32b4ce909157ffc5af13a449059d4cdf
Make ZlibInStream more robust against failures

Move the checks around to avoid missing cases where we might access
memory that is no longer valid. Also avoid touching the underlying
stream implicitly (e.g. via the destructor) as it might also no
longer be valid.

A malicious server could theoretically use this for remote code
execution in the client.

Issue found by Pavel Cheremushkin from Kaspersky Lab
common/rdr/ZlibInStream.cxx
common/rdr/ZlibInStream.h
common/rfb/CMsgReader.cxx
common/rfb/SMsgReader.cxx
common/rfb/TightDecoder.cxx
common/rfb/zrleDecode.h