]> source.dussan.org Git - tigervnc.git/commit
Be defensive about overflows in stream objects
authorPierre Ossman <ossman@cendio.se>
Tue, 24 Sep 2019 07:41:07 +0000 (09:41 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 15 Nov 2019 11:15:47 +0000 (12:15 +0100)
commit75e6e0653a48baf474fd45d78b1da53e2f324642
tree8159e0ad7abb2e69604c6ad3cbc00ebceb867c3d
parent0943c006c7d900dfc0281639e992791d6c567438
Be defensive about overflows in stream objects

We use a lot of lengths given to us over the network, so be more
paranoid about them causing an overflow as otherwise an attacker
might trick us in to overwriting other memory.

This primarily affects the client which often gets lengths from the
server, but there are also some scenarios where the server might
theoretically be vulnerable.

Issue found by Pavel Cheremushkin from Kaspersky Lab.
13 files changed:
common/rdr/FdInStream.cxx
common/rdr/FdOutStream.cxx
common/rdr/FileInStream.cxx
common/rdr/HexInStream.cxx
common/rdr/HexOutStream.cxx
common/rdr/InStream.h
common/rdr/MemOutStream.h
common/rdr/OutStream.h
common/rdr/RandomStream.cxx
common/rdr/TLSInStream.cxx
common/rdr/TLSOutStream.cxx
common/rdr/ZlibInStream.cxx
common/rdr/ZlibOutStream.cxx