Commit Graph

1951 Commits

Author SHA1 Message Date
Henrik Andersson
b9a50db894 Print full cert for review 2019-01-29 10:38:14 +01:00
Henrik Andersson
f8581c40b0 Remove unused code block and add generic error logging 2019-01-29 10:38:14 +01:00
Henrik Andersson
eacecac99c Set base requirement of GnuTLS to >= 3.2.0 2019-01-29 10:38:14 +01:00
Henrik Andersson
bc3a5789e4 Cleanup unused leftovers from commit 3191c341b9 2019-01-29 10:38:14 +01:00
Henrik Andersson
78a9dcff68 Refactor of public key cert check
Reafctored public key check from libtasn_read_cert_pk_parameters()
into its own function libtasn_cert_pk_oid(). The make use of it
instead of gnutls_x509_crt_get_pk_oid().
2019-01-29 10:38:14 +01:00
Henrik Andersson
e33b9b7ea6 Fix build for clang 2019-01-29 10:38:14 +01:00
Henrik Andersson
6577cc57e9 Do not use DN as key for certificate cache as it is insecure 2019-01-29 10:38:14 +01:00
Henrik Andersson
3ab19d543c Revert "Added implementation of a gnutls pubkey store (tdb)"
This reverts commit f493395fc7e36e504c27cab8ad973042c55f0767.
2019-01-29 10:38:14 +01:00
Henrik Andersson
95fac5e1f6 Revert "Use base64 encode/decode routines from nettle instead of gnutls"
This reverts commit 252bc346e2379475f8547d4a458743bed067448d.
2019-01-29 10:38:14 +01:00
Henrik Andersson
18287bdacf Add certificate verification against system trust store
Verify the certificate from the peer against the system’s default
trusted CAs. If certificate fails the verification a fallback to
use the certificate cache is used.

The certificate cache is used to give the user the option to add
exceptions for invalid certificates. For example; self-signed
certificates etc.
2019-01-29 10:38:14 +01:00
Henrik Andersson
2a955dbf84 Never silently add a certificate to cache
A user always needs to approve to add an exception for
a invalid certificate.
2019-01-29 10:38:14 +01:00
Henrik Andersson
d931ad5fab Bump ubuntu up from 14.04 to 16.04 2019-01-29 10:38:14 +01:00
Henrik Andersson
a61bb39dec Fix compiling warnings 2019-01-29 10:38:14 +01:00
Henrik Andersson
4bae3de6cd Add requirement of GnuTLS version 3.0
This is required for gnutls_store_pubkey/gnutls_verify_pubkey
api used in pubkey cache verification.
2019-01-29 10:38:14 +01:00
Henrik Andersson
307ca2eb03 Use base64 encode/decode routines from nettle instead of gnutls
This relaxes the version requirement for gnutls
2019-01-29 10:38:14 +01:00
Henrik Andersson
4781868e33 Added implementation of a gnutls pubkey store (tdb)
This fixes the problem with the default gnutls implementaion
that keys could not be updated eg. overwritten.
2019-01-29 10:38:14 +01:00
Henrik Andersson
11ca5446d9 Make certificate mismatch handling use util_dialog_choice() 2019-01-29 10:38:14 +01:00
Henrik Andersson
9c47a9fe66 Add util_dialog_choice() for display prompt and handle response 2019-01-29 10:38:13 +01:00
Alexander Zakharov
d7d55cf3f7 PoC: Check server's certificate 2019-01-29 10:38:13 +01:00
Alexander Zakharov
78afb19536 Fix Travis CI OSX build 2019-01-29 10:38:13 +01:00
Alexander Zakharov
23e22e3834 Temporary fix for gnutls_handshake() failure 2019-01-29 10:38:13 +01:00
Alexander Zakharov
90fd660803 Parse X.509 certificate, get RSA public key, RSA encrypt
Also add support older (< 3.5.0) GnuTLS versions
2019-01-29 10:38:13 +01:00
Alexander Zakharov
166d1bc14d Replace OpenSSL with GnuTLS for all network communications 2019-01-29 10:38:13 +01:00
Alexander Zakharov
00d9e0c4c8 Replace HMAC_MD5, SHA1, RC4, MD5 with Nettle's counterparts 2019-01-29 10:38:13 +01:00
Alexander Zakharov
673b267e66 Add ASN.1 parsing routines 2019-01-29 10:38:13 +01:00
Henrik Andersson
bc727e7ef1 One should be able to provide empty password via -p 2019-01-29 10:28:14 +01:00
Karl Mikaelsson
e92916eaae
Merge pull request #306 from rdesktop/uglym8-ewmh-fullscreen
Change the way we do fullscreen
2019-01-28 16:21:21 +01:00
Alexander Zakharov
1cbc2aa739 Change the way we do fullscreen 2019-01-28 11:09:16 +01:00
Henrik Andersson
1353fd75dd
Merge pull request #73 from uglym8/fix_sc_death
Handle insufficient server side buffer for smartcard operations
2019-01-23 14:26:39 +01:00
Alexander Zakharov
758f7b5156 scard: Fix buffer overflow
Even though we can detect that the server buffer is too small to
receive the APDU result we don't prevent the actual copy of this result
to allocated buffer which results in overflow.
2019-01-23 16:12:21 +03:00
Alexander Zakharov
774a657975 Handle insufficient server side buffer for smartcard operations
We should pay attention to OutputBufferLength of DR_CONTROL_REQ
and send STATUS_BUFFER_TOO_SMALL if it's insufficient for returned
result.
2019-01-23 16:12:21 +03:00
Henrik Andersson
d12204b424 Bumb version of supported redirect PDU
Before this change we announce that we support redirection
packet version 3 (Microsoft RDP 5.1 and 5.2 clients), this
makes the server to only send back LB_TARGET_NET_ADDRESS which
includes an IP address for the redirection. Announcing version
4 (Microsoft RDP 6.0 and 6.1 clients) will make the server to
send a LB_TARGET_FQDN which solves a few problems, for example
using kerberos authentication.

Fixes issue #303
2019-01-22 13:20:13 +01:00
Henrik Andersson
2e80cdf396
Merge pull request #302 from uglym8/freebsd_conf_fix
Fix configure script on FreeBSD
2019-01-18 13:38:21 +01:00
Alexander Zakharov
68c7f9afbc Fix configure script on FreeBSD 2019-01-18 13:16:47 +03:00
Henrik Andersson
70931792f9
Merge pull request #301 from uglym8/fix_freebsd_build
Fix FreeBSD build
2019-01-18 11:15:12 +01:00
Alexander Zakharov
bb1c90fb49 Fix FreeBSD build 2019-01-18 13:01:12 +03:00
Henrik Andersson
4dca546d04 Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.

All vulnerabilities was identified and reported by Eyal Itkin.

 * Add rdp_protocol_error function that is used in several fixes
 * Refactor of process_bitmap_updates
 * Fix possible integer overflow in s_check_rem() on 32bit arch
 * Fix memory corruption in process_bitmap_data - CVE-2018-8794
 * Fix remote code execution in process_bitmap_data - CVE-2018-8795
 * Fix remote code execution in process_plane - CVE-2018-8797
 * Fix Denial of Service in mcs_recv_connect_response - CVE-2018-20175
 * Fix Denial of Service in mcs_parse_domain_params - CVE-2018-20175
 * Fix Denial of Service in sec_parse_crypt_info - CVE-2018-20176
 * Fix Denial of Service in sec_recv - CVE-2018-20176
 * Fix minor information leak in rdpdr_process - CVE-2018-8791
 * Fix Denial of Service in cssp_read_tsrequest - CVE-2018-8792
 * Fix remote code execution in cssp_read_tsrequest - CVE-2018-8793
 * Fix Denial of Service in process_bitmap_data - CVE-2018-8796
 * Fix minor information leak in rdpsnd_process_ping - CVE-2018-8798
 * Fix Denial of Service in process_secondary_order - CVE-2018-8799
 * Fix remote code execution in in ui_clip_handle_data - CVE-2018-8800
 * Fix major information leak in ui_clip_handle_data - CVE-2018-20174
 * Fix memory corruption in rdp_in_unistr - CVE-2018-20177
 * Fix Denial of Service in process_demand_active - CVE-2018-20178
 * Fix remote code execution in lspci_process - CVE-2018-20179
 * Fix remote code execution in rdpsnddbg_process - CVE-2018-20180
 * Fix remote code execution in seamless_process - CVE-2018-20181
 * Fix remote code execution in seamless_process_line - CVE-2018-20182
2019-01-16 12:28:44 +01:00
Alexander Zakharov
1f13bf5c5e
Merge pull request #288 from markusbeth/lgtm_fixes
Lgtm fixes
2018-11-08 12:57:20 +03:00
Markus Beth
1aeff476b2 fix l_to_a does not work for a base other than 10 2018-11-07 00:20:39 +01:00
Markus Beth
55c85b55e7 fix lgtm: 'Too few arguments to formatting function'
maybe a typo that got copied around and leads to too few arguments in
formatting functions
2018-11-06 22:23:25 +01:00
Alexander Zakharov
ca03f60a09 Fix Solaris build 2018-10-31 10:51:13 +03:00
Henrik Andersson
c16b74a974 Run indent-all.sh script on source 2018-10-29 15:53:57 +01:00
Alexander Zakharov
6a14831965
Merge pull request #285 from gpatel-fr/master
Add TLS 1.1 and 1.2 support
2018-10-23 11:53:16 +03:00
gpatel-fr
8fcb535eba fix comments about TLS version 2018-10-22 21:03:57 +02:00
gpatel-fr
5ef8706e13 more helpful error message for TLS version problems 2018-10-22 21:02:23 +02:00
gpatel-fr
305b06d7fd Add TLS 1.1 and 1.2 support 2018-10-18 17:35:02 +02:00
Pierre Ossman
74b2129e09 Free socket buffers on disconnect
Otherwise we would leak the memory on every reconnect (and exit).
2018-07-02 13:40:46 +02:00
Pierre Ossman
daaa48108a Always include frame pointers with address sanitizer
This is needed to get proper stack traces with the sanitizer.
2018-07-02 13:39:39 +02:00
Pierre Ossman
5278291a82 Drain X event queue without any delay
A 100 ms delay between iterations was still too large for many cases,
so try to clear the event queue as fast as possible.
2018-07-02 13:23:22 +02:00
Henrik Andersson
5fbf4bd953 Fixes memleak where unprocessed X11 events builds up on queue
There is a limiter used for processing X11 events set to 20
for slicing between processing X11 event and processing data
on file descriptors. Before this fix, when waiting for data on
filedescriptors, we assumed that there were no pending X11
events left on queue and therefore the select() timeout on
60 seconds.

Now we will check the queue and select a timeout depending
on whats left to do.

Fixes bug #275
2018-06-29 10:31:48 +02:00