]> 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, 20 Dec 2019 06:29:00 +0000 (07:29 +0100)
commit9b9c66d43e16104fa1028df1071fb2b5a338259a
tree2ec21344194e565017adbbf0e1be31786ec16e92
parentf287032d3643a6437f7de0ed35f4c45bb735522d
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.

(cherry picked from commit 75e6e0653a48baf474fd45d78b1da53e2f324642)
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