aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Include Carbon when statically linking gettext on macOSPierre Ossman2020-01-301-0/+3
| | | | | As gettext needs some stuff from Carbon and we don't want to rely on it being pulled in as a side effect.
* Update copyright year to 2020Pierre Ossman2020-01-168-8/+8
|
* Merge branch 'emulateMB' of https://github.com/CendioAlex/tigervncPierre Ossman2020-01-1610-17/+384
|\
| * Add emulated middle mouse buttonAlex Tanskanen2020-01-1610-17/+384
| | | | | | | | | | | | | | | | Not every mouse has three buttons e.g. laptops. Some OS might not have support for middle mouse button emulation. This commit adds emulation for middle mouse button when pressing both left and right mouse button simultaneously.
* | Use sys/time.h on Windows as wellPierre Ossman2020-01-161-4/+0
|/ | | | | | Modern MinGW seems to provide this, so simplify things a bit. This also side steps some of the issue of the windows.h/winsock2.h include ordering.
* Remove "Dismiss menu" from context menuAlex Tanskanen2020-01-091-8/+2
| | | | | This was not necessary since you could use ESC key or simply just clicking outside of the context menu to close the menu.
* Allow XK_Scroll_Lock when LED state isn't supportedPierre Ossman2020-01-032-10/+2
| | | | | Otherwise such clients cannot use Scroll Lock at all, and that is probably worse than any effects we might get from getting out of sync.
* Clean up initialization of DIBSectionBufferPierre Ossman2020-01-034-35/+8
| | | | | | We had an unintentional conflict with PixelBuffer::setSize() here. But we can simplify this further as this initialization is only used by the subclass DeviceFrameBuffer, and only once.
* Provide correct dimensions for XShm setupPierre Ossman2019-12-302-4/+4
| | | | | | Since 53f913a we initialize the underlying PixelBuffer with 0x0 dimensions, which means we need to keep more explicit track of what we are trying to allocate in the setup methods.
* Remove unneeded memory checksPierre Ossman2019-12-301-4/+0
| | | | new throws an exception on allocation errors rather than return NULL.
* Fix saving of bad server certificatesPierre Ossman2019-12-301-2/+3
| | | | | This check is completely backwards and it is currently unknown how this ever worked.
* el6 build improvements. dependency updates, link order fixesBrian P. Hinz2019-12-281-29/+23
|
* Update Esperanto translationFelipe Castro2019-12-271-104/+104
|
* Set initial blank cursorPierre Ossman2019-12-231-3/+6
| | | | | | | | If the server doesn't support local cursors and want to render them itself then we need to make sure the local cursor is invisible. This also makes sure we always have some cursor allocated, so we can remove the checks in some places.
* Update source URLs in el6 spec fileBrian P. Hinz2019-12-221-4/+4
|
* Remove hard coded source URLs from travis-ci build scriptBrian P. Hinz2019-12-221-6/+4
|
* Allow non-interactive installs for bionic (travis-ci)Brian P. Hinz2019-12-211-0/+2
|
* Add ubuntu-bionic to travis-ci buildsBrian P. Hinz2019-12-213-0/+66
|
* Make sure travis-ci builds java viewer with latest openjdk 8Brian P. Hinz2019-12-211-2/+6
|
* Mostly stylistic changes to java viewer to match recent changes to native viewerBrian P. Hinz2019-12-2115-76/+129
|
* Fix travis-ci build scripts broken by c59f195Brian P. Hinz2019-12-213-79/+3
|
* Fix maximum compress lvl in parameter listSamuel Mannehed2019-12-203-3/+3
| | | | | Commit 4e61f8dbc51f83b1d71319b763fbd4d916d13e98 fixed the GUI but forgot to change the other places in the code.
* Use the correct minimum value for compression lvlSamuel Mannehed2019-12-202-2/+2
| | | | | | There was even some confusion in the RFB protocol regarding this, but the zlib implementation confirms that accepted values for compression level is 0-9.
* Use the correct maximum value for compression lvlSamuel Mannehed2019-12-202-2/+2
| | | | The GUI incorrectly noted the max level to be 6 while it in fact is 9.
* Remove confusing note about compression levelSamuel Mannehed2019-12-202-2/+2
| | | | Even if this note is true it just adds confusion.
* Simplify color level descriptionsSamuel Mannehed2019-12-204-16/+10
| | | | | | The number of colors used isn't something the end-users should have to concern themselves with. I intentionally left the information in the man-pages.
* Merge branch 'secfix' of https://github.com/CendioOssman/tigervncPierre Ossman2019-12-2051-401/+633
|\
| * Handle pixel formats with odd shift valuesPierre Ossman2019-11-152-0/+12
| | | | | | | | | | | | | | | | | | Our fast paths assume that each channel fits in to a separate byte. That means the shift needs to be a multiple of 8. Start actually checking this so that a client cannot trip us up and possibly cause incorrect code exection. Issue found by Pavel Cheremushkin from Kaspersky Lab.
| * Add unit tests for PixelFormat.is888() detectionPierre Ossman2019-11-151-1/+59
| |
| * Be defensive about overflows in stream objectsPierre Ossman2019-11-1513-48/+75
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Use size_t for lengths in stream objectsPierre Ossman2019-11-1532-182/+184
| | | | | | | | | | | | | | | | Provides safety against them accidentally becoming negative because of bugs in the calculations. Also does the same to CharArray and friends as they were strongly connection to the stream objects.
| * Remove unused FixedMemOutStreamPierre Ossman2019-11-151-52/+0
| |
| * Add sanity checks for PixelFormat shift valuesPierre Ossman2019-11-152-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise we might be tricked in to reading and writing things at incorrect offsets for pixels which ultimately could result in an attacker writing things to the stack or heap and executing things they shouldn't. This only affects the server as the client never uses the pixel format suggested by th server. Issue found by Pavel Cheremushkin from Kaspersky Lab.
| * Fix depth sanity test in PixelFormatPierre Ossman2019-11-152-1/+5
| |
| * Add unit test for PixelFormat sanity checksPierre Ossman2019-11-153-1/+119
| |
| * Handle empty Tight gradient rectsPierre Ossman2019-11-151-16/+21
| | | | | | | | | | | | | | | | | | | | We always assumed there would be one pixel per row so a rect with a zero width would result in us writing to unknown memory. This could theoretically be used by a malicious server to inject code in to the viewer process. Issue found by Pavel Cheremushkin from Kaspersky Lab.
| * Add write protection to OffsetPixelBufferPierre Ossman2019-11-152-0/+9
| | | | | | | | | | | | No one should every try to write to this buffer. Enforce that by throwing an exception if any one tries to get a writeable pointer to the data.
| * Restrict PixelBuffer dimensions to safe valuesPierre Ossman2019-11-151-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do a lot of calculations based on pixel coordinates and we need to make sure they do not overflow. Restrict the maximum dimensions we support rather than try to switch over all calculations to use 64 bit integers. This prevents attackers from from injecting code by specifying a huge framebuffer size and relying on the values overflowing to access invalid areas of the heap. This primarily affects the client which gets both the screen dimensions and the pixel contents from the remote side. But the server might also be affected as a client can adjust the screen dimensions, as can applications inside the session. Issue found by Pavel Cheremushkin from Kaspersky Lab.
| * Encapsulate PixelBuffer internal detailsPierre Ossman2019-11-159-102/+111
| | | | | | | | | | | | Don't allow subclasses to just override dimensions or buffer details directly and instead force them to go via methods. This allows us to do sanity checks on the new values and catch bugs and attacks.
| * Make ZlibInStream more robust against failuresPierre Ossman2019-11-156-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove support for ubuntu trusty since it's been EoL for 6 monthsBrian P. Hinz2019-12-1516-807/+0
| |
* | Check the correct stream if there is more data pendingPierre Ossman2019-12-091-1/+1
| | | | | | | | | | | | The input stream might no longer be the raw socket, so we need to query what's currently active. That wrapping stream might have its own buffering and may have more data even if the socket is drained.
* | Handle pending data in TLS buffersPierre Ossman2019-12-091-3/+5
| | | | | | | | | | | | There might be more bytes left in the current TLS record, even if there is nothing on the underlying stream. Make sure we properly return this when we aren't being requested to block.
* | Correctly calculate rects with no CopyRect supportPierre Ossman2019-12-091-1/+3
| | | | | | | | | | The copied rects have already been merged in to the changed rects at this point if the client doesn't support the CopyRect encoding.
* | Don't background the main session commandPierre Ossman2019-12-091-1/+1
| | | | | | | | | | | | When used with -fg we expect the startup script to remain running until the session is over. This will not happen if the session command is put in the background using &.
* | Fix link order of nettle and hogweedPierre Ossman2019-12-091-1/+1
| | | | | | | | | | Hogweed needs nettle, not the other way around. So make sure they are specified in the correct order for the static link to succeed.
* | Update Hungarian translationBalázs Úr2019-12-091-116/+190
| |
* | Add Korean translationJiYoon Kwon2019-12-092-0/+729
| |
* | Use openjdk-8 to build java viewer for bionicBrian P. Hinz2019-11-301-1/+1
| |
* | Update build deps for Ubuntu Bionic packagesBrian P. Hinz2019-11-301-3/+3
| |