Commit Graph

124 Commits

Author SHA1 Message Date
Mikkel Krautz
947eb9071a Move SSL check and version log message to main.cpp from MetaParams::read().
This change moves the QSslSocket::supportsSsl() check from MetaParams:read()
to main.cpp. This also ensures that the SSL check happens very early in Murmur's
initialization process, rather than after we might have already attempted to
call some SSL-related APIs.

This change also moves the log message that prints the OpenSSL version to main.cpp,
and integrates it with the QSslSocket::supportsSsl() check.
2017-02-26 19:25:41 +01:00
Mikkel Krautz
887aa91be6 Meta: add qAbsSettingsFilePath variable.
In order to reload the SSL settings live, we need to know the .ini file
Murmur used when initially loading its settings, in order to re-load the
settings from the same file.
2017-02-26 19:25:40 +01:00
Mikkel Krautz
4fbbdda070 Meta: move qmConfig.clear().
This moves the qmConfig.clear() call in MetaParams::read() to the
top of the function.

This allows the SSL part of MetaParams::read() to be moved out to a
separate function in the upcoming PR for live-reloading SSL settings
via the SIGUSR1 signal.
2017-02-26 19:25:38 +01:00
Mikkel Krautz
21888b11b6 Meta: add 'QSettings *' parameter to MetaParams::typeCheckedFromSettings().
This allows the setting to be loaded from an arbitrary QSettings instance.

We need this to be able to implement live reloading of SSL settings via the SIGUSR1 signal.
2017-02-26 19:25:33 +01:00
Mikkel Krautz
d5f04b4223 Meta: avoid cluttering the global QSslSocket::defaultCaCertificates() list.
Before this commit, we would add any intermediate certificates found in
the SSL certificate's PEM bundle to the default CA list via
QSslSocket::addDefaultCaCertificates().
We would also add any certificates found in the sslCA PEM bundle to the
default CA list, using the same method.

Due to the way the hot-reload feature for SSL settings is going to work,
these patterns wouldn't work well in that environment, because reloading
the settings would keep adding entries to the global QSslSocket default
CA certificates list. (QSslSocket::defaultCaCertificates())

To combat this, this series of commits try to be more strict about how
default CAs and intermediates in general are handled.

Generally, instead of adding them to the global QSslSocket default CA
list, we add them to each QSslSocket as necessary.

Note: this commit does not stand on its own. It requires the follow-up
commits in this PR. It is split out to aid in reviewing.
2017-02-25 23:10:38 +01:00
Mikkel Krautz
affa2c4b56 Meta: use Server::privateKeyFromPEM. 2017-02-20 23:44:57 +01:00
Steven Noonan
e75e737130 murmur: add support for EC private keys
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2017-02-20 23:44:45 +01:00
Mikkel Krautz
645603771d Murmur: use final Qt 5.8 API for QSslDiffieHellmanParameters. 2017-01-22 22:05:52 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
54c28d3ee1 src/murmur: update to use LICENSE.header. 2016-05-10 22:42:02 +02:00
John Marion
6123439d1b Remove hardcoded IP whitelist for master server
With the master server being moved, this hardcoded IP is no longer
valid.
2016-05-09 01:09:43 +02:00
Tim Cooper
49a6d35f2b grpc: rename grpcCert, grpcKey to grpccert, grpckey 2016-05-08 16:45:52 +02:00
Tim Cooper
19537ac218 grpc: allow connections to be secured using TLS 2016-05-08 16:45:52 +02:00
Tim Cooper
776c084a1a grpc: start implementation 2016-05-08 16:45:52 +02:00
Mikkel Krautz
25f0e1f661 Remove OpenSSL 0.9.x compatibility hacks. 2016-03-07 19:19:03 +01:00
John Marion
f5e03d6c7d Fix relative paths for Murmur -ini switch
This ensures that the file passed to QSettings is an absolute path, to avoid issues with changing Murmur's working directory but keeping a relative ini path.

Fixes mumble-voip/mumble#2121
2016-02-23 19:41:38 +01:00
Mikkel Krautz
711c2ec23e Murmur: forcefully disable PBKDF2 on OpenSSL < 0.9.9.
Fixes build on FreeBSD 9.3.
2015-11-28 17:41:06 +01:00
Mikkel Krautz
9f85eeb235 Meta: cast rlim_t to unsigned long when format printing. 2015-11-15 12:45:53 +01:00
Mikkel Krautz
8bd3f76a8e Murmur: add support for EDH cipher suites, and for specifying Diffie-Hellman parmeters.
This change allows server admins to specify Diffie-Hellman
parameters for Murmur to use. This is done using the sslDHParams
option in the config file. Diffie-Hellman parameters can also be
set on a per-server basis using the sslDHParams option.

Note: the functionality implemented in this change requires the
QSslDiffieHellmanParameters class in Qt, which has not yet landed
upstream in the Qt 5 'dev' branch. This means that the functionality
discussed in this change will, for now, only work in binaries provided
by the Mumble project, or binaries that are built using our build
environments, and not binaries that link against any released versions
of Qt at present.

This change modifies the default TLS cipher suite string to add
EDH+aRSA+AESGCM, DHE-RSA-AES256-SHA and DHE-RSA-AES128-SHA.

This yields the following ciphers, in TLS/RFC notation:

    TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
    TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
    TLS_DHE_RSA_WITH_AES_256_CBC_SHA
    TLS_DHE_RSA_WITH_AES_128_CBC_SHA

This change also allows Murmur servers to provide forward secrecy
to older clients, such as our own pre-built binaries before 1.2.9.

It also provides forward secrecy for users that use Mumble 1.2.x
versions on Linux distros, and other Unix-like systems. This is
because Mumble 1.2.x on Unix-like systems builds against Qt 4, which
limits the connection to TLS 1.0.

Before this change, Murmur was not able to negotiate an ephemeral
Diffie-Hellman key exchange for those clients. This is now possible.
2015-09-26 22:33:49 +02:00
Tim Cooper
6fe5547859 Don't initialize qsWelcomeText to "Welcome to this server" 2015-07-30 22:32:23 +02:00
Stefan Hacker
e934c1e648 Fix dual-stack UDP on Windows and improve dual-stack detection
This patch fixes dual-stack UDP on Windows as well as for unsual
Linux configurations by ensuring the UDP sockets we create
inherit their IPV6_V6ONLY sockopt from their corresponding
TCP socket. Previously on systems where IPV6_V6ONLY was enabled
by default (e.g. Windows) we would incorrectly create an
IPv6 only socket even though our TCP socket and the system
are dual-stacked.

The dual-stack detection moved from Meta.h to Server.h into the
SslServer class where it is a better fit. Also modified the function
to instead of querying the value of IPV6_V6ONLY on a test socket
it now tries to actively disable it. While previously dual stack
support was only detected if it was the default configuration for
that system, it should now be detected in all cases. The function
also now performs the same check on Windows socket where the default
actually is to have IPV6_V6ONLY enabled.
2015-06-05 02:08:12 +02:00
Stefan Hacker
9a426b1df7 Fix Qt 5 mumur incorrectly binding to IPv6 only by default
If no host string is given murmur should listen for Ipv4 as
well as IPv6 address on all devices. Due to a semantics change
for requesting dual-stacked sockets between Qt 4 and Qt 5 we
accidentally requested an IPv6 only socket for dual-stacked
systems in Qt 5. This patch remedies that.

Fixes #1668
2015-06-05 02:08:12 +02:00
Mikkel Krautz
a3f93f7801 Murmur: add 'sslCiphers' option to allow server admins full control of Murmur's advertised TLS cipher suites.
This commit adds the 'sslCiphers' option to Murmur.

The 'sslCiphers' option is used to configure the list of advertised
TLS cipher suites. The option lives on Meta, so it is a server-wide
configuration, and cannot be configured on a per-virtual-server basis.

The 'sslCiphers' option uses the OpenSSL's cipher list format to
describe the cipher suite selection. For more information on this
format, see:

https://www.openssl.org/docs/apps/ciahers.html#CIPHER-LIST-FORMAT
2015-05-22 18:24:26 +02:00
Stefan Hacker
8aa125fbc7 Fix issues found in review of PR #1422 2014-10-21 02:33:05 +02:00
Stefan Hacker
5131d9e303 Review and refactor of PBKDF2 support patch.
* Adjusted to coding guidelines
* Pulled out PBKDF2 functionality into own class
* Make benchmark a best of N approach with guaranteed minimum
* Fixed broken database migration code. Don't try to alter
  tables and instead rely on them being re-created with the
  new fields.
* Fixed some typos in ini. Also move to the setting to the
  end so ppl. don't get the idea they have to change this.
* Chose a scarier name for the plain hash function
* Use int instead of size_t for iteration counts as it is
  the datatype used in the OpenSSL API. Otherwise we just
  have to much pain with constantly converting and might
  expose ourselves to size issues in the future.
* Moved new UserInfo enum entry to the end as to preserve
  the order
2014-10-03 01:19:29 +02:00
tkmorris
813aceb854 Add PBKDF2 support to Murmur. 2014-10-02 23:23:31 +02:00
Stefan Hacker
12eb26431f Replace all uses of QT_VERSION_CHECK with explicit version.
Qt4's moc is not able to expand QT_VERSION_CHECK which may lead
to invalid codegen when used for backwards compatibility work.
Replaced all occurances with explicit check against numeric
version which are treated correctly. Even though bad interactions
might be rare we should no longer use this macro as long as we
want to compile with Qt 4. Also see:
http://lists.qt-project.org/pipermail/interest/2013-August/008351.html
2014-08-22 01:55:34 +02:00
Mikkel Krautz
9d668ebcde Use QStandardPaths's DataLocation instead of GenericDataLocation when looking up AppData directory.
GenericDataLocation returns a directory shared by all applications
whereas DataLocation returns an application-specific version.

For example, on OS X, GenericDataLocation returns

    $HOME/Library/Application Support

but DataLocation returns

    $HOME/Library/Application Support/Mumble/Mumble

Fixes #1340
2014-08-17 19:51:09 +02:00
main()
dc3b78c914 Add "forceExternalAuth" config option to Murmur
Without this option (or when it's set to false), Murmur's default
authentication will kick in when your external authenticator plugin
crashes and basically allow *anyone* to login and register.

When it's enabled, Murmur will instead return a temporary login
failure to the client.
2014-07-17 20:55:44 +02:00
Zuko
8f0ae691cc OSInfo: use full Windows version when version string is user-facing.
This adds a new method, OSInfo::getOSDisplayableVersion(),
which returns a version string that is suitable for displaying
to regular users.

Furthermore, Mumble's User Information dialog and Murmur have been
modified to use this new method when displaying OS version strings
to users.

On Windows, the new method returns the full product version of the
OS, such as "Windows 8 Pro" (as opposed to 6.2.9200, which is the
equivalent result of the getOSVersion() method).

There are places in Mumble where the original "simple" version
string is required for compatibility or aesthetic reasons, such
as statistics and Mumble's HTTP user agent. Those places keep
the older version (by keeping their calls to the original
getOSVersion() instead of switching to the "displayable" variant).

It might seem overkill to jump through hoops to be able to show the
full product version, but it can be helpful for, say, server admins
to have access to the full product version if they need to
troubleshoot issues with their users.
2014-01-11 03:11:19 +01:00
Mikkel Krautz
84bc19c818 mumble: migrate hardcoded 0x050000 Qt version to the QT_VERSION_CHECK macro. 2013-06-29 16:56:42 +02:00
Mikkel Krautz
7e452dc3c3 mumble, murmur: Qt 5 support for Windows. 2013-06-29 16:56:41 +02:00
Stefan Hacker
7f70a4a649 Fix typo in config and remote leftover debug statement in Meta.cpp 2012-12-08 22:41:22 +01:00
Stefan Hacker
8c07c7596f Add MetaParams::typeCheckedFromSettings to be able to warn the user if a default settings value was used because the given value wasn't in the expected format.
* e.g. serverpassword=super,secret would result in the password being empty because it was parsed as a list of values which cannot be converted to a string (correct would be serverpassword="super,secret").
* e.g. bandwidth=whatever would result in bandwidth being 0.
* Note: This does not perform a sanity check on the value itself.
2012-12-08 21:07:23 +01:00
Stefan Hacker
145d9f96f5 Introduce channel nesting limit (default=10).
Add NestingLimitException to Ice Interface and introduce a new NestingLimit PermissionDenied type.
Addresses #3566322 "ServerDB::deleteServer crashes master"
2012-09-18 17:50:07 +02:00
Benjamin Jemlich
f0c16f33ba Murmur: add Opus threshold option 2012-06-08 08:44:02 +02:00
Benjamin Jemlich
84ed2eb84f Murmur: Remove unused DBus.h includes 2012-05-31 13:00:39 +02:00
Benjamin Jemlich
bb2ef526aa Windows build fixes 2011-11-11 18:56:14 +01:00
Benjamin Jemlich
07737a314c Fix include guards and PCH includes 2011-11-09 00:12:10 +01:00
Thorvald Natvig
45bd8139fe Fix murmur warnings 2011-05-15 16:45:46 -07:00
Thorvald Natvig
9facb1292a Fix serverside suggestconf error for versions 2011-03-26 05:17:19 +01:00
Thorvald Natvig
94967abfd8 Suggest Config 2011-03-25 19:54:26 -07:00
Jamie Fraser
b752ea0cde Added a macro "DEFAULT_MUMBLE_PORT" in src/Net.h so that its a one-line change should the default port ever change. 2011-03-19 00:32:11 -04:00
Stefan Hacker
6f079dbb6e Fix compilation on Windows.
Missing special casing for uiUID/uiGid variable initialization in Meta.cpp
2011-03-19 00:57:41 +01:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Ludwig Nussel
82c4186dca fix user switching
- don't keep saved uid 0. That's bad as an attacker that manages to
  execute code could switch back to uid 0
- set $HOME as Qt doesn't look at passwd information
- initialize supplementary groups
- use "mumble-server" as fallback if no user is specified
2011-03-17 05:15:23 +01:00
Stefan Hacker
e8a2bb5ee9 Prepare murmur for user defined server locations 2010-12-03 14:14:05 +01:00
Benjamin Jemlich
6c787116a4 Print the correct filename in the error message 2010-11-19 15:43:49 +01:00
Jamie Fraser
bf561d3aaa Toggle setting (rememberchannel) for remembering a registered users last channel. 2010-08-11 14:49:57 +02:00
Mikkel Krautz
8aeda4d7f1 Move Mac OS X data dir to ~/Library/Application Support/[...] 2010-07-28 16:48:34 +02:00