Commit Graph

874 Commits

Author SHA1 Message Date
Molly Miller
6fd08bac3b Invert logic for handling username metrics labels. 2022-07-27 10:44:13 +02:00
Molly Miller
299fcea34c Make username labeling in metrics configurable. 2022-06-20 14:34:35 +01:00
Dave Lambley
12c19817b8 Correct typo 2022-01-07 18:53:24 +00:00
Rozhuk Ivan
8b3bf44f49 Fix build with libressl 3.4.0+
SSL will become opaque in LibreSSL 3.4.x, hence the code reaching inside
it will result in build breakage.
SSL_set0_rbio() now available in libressl.
2021-11-10 00:32:18 +03:00
Lionel Nicolas
19495b2d1d Add ability to configure prometheus listener port 2021-10-22 19:47:49 -04:00
Lionel Nicolas
c42cd844de Fix typo and formatting in --prometheus documentation 2021-10-22 19:47:16 -04:00
Joachim Bauch
cb3dd607ac
Include additional properties in redis allocation status reports.
- Socket type
- Local IP address / port
- Remote IP address / port
- SSL type
- SSH cipher
2021-10-04 09:18:43 +02:00
Mészáros Mihály
a19bc7c464 Revert by hand merge PR825 in favor PR755 more simple solution 2021-09-22 13:32:34 +02:00
Mészáros Mihály
b5a597836b Merge branch 'master' into fix_sqlite_shutdown_race 2021-09-22 11:12:41 +02:00
Mészáros Mihály
82e74935db
Merge pull request #825 from whereby/argggh/no-sqlite3-shutdown
dbd_sqlite: Don't shutdown sqlite3 db during init
2021-09-22 10:59:16 +02:00
Giacomo Vacca
8aded3556e Issue #699 Return codes for prom server 2021-09-21 17:26:48 +02:00
Arne Georg Gisnås Gleditsch
8d66122d91 dbd_sqlite: Don't shutdown sqlite3 db during init
Ref https://www.sqlite.org/c3ref/initialize.html:

    The sqlite3_initialize() interface is threadsafe, but
    sqlite3_shutdown() is not.

We currently call `sqlite3_shutdown` from all threads as part of
`sqlite_init_multithreaded`, and this has been observed to have
adversarial effects during startup if many threads receive their first
inbound request at the same time. The apparent motivation behind
calling shutdown is to make the subsequent calls to `sqlite3_config`
succeed, since these ordinarily return SQLITE_MISUSE if called
multiple times. However, this function is also documented to not be
thread safe, so introduce a barrier that ensures we only initialize
once over all threads.
2021-09-20 16:33:25 +02:00
z00316370
5cf657cdff Fix user quota release #786 2021-07-15 19:26:31 +08:00
KORAY VATANSEVER
22af3ea567 Add syslog facility configuration 2021-07-07 15:56:30 +03:00
Daniil Meitis
99aa623aaf Add current allocations number gauge metric 2021-06-21 17:21:17 +04:00
Mészáros Mihály
6492f51a63
Merge pull request #767 from ggalperi/patch-1
Fix server->log_binding usage
2021-06-17 12:57:45 +02:00
Mark Hills
713bbefd5e Fix a segfault when a TLS context is not used
If the configuration contains entries such as:

  no-tlsv1
  no-tlsv1_1

then the SSL context is NULL. The previous code was simple enough that it
handled this case; the new code needs to deal with it explicitly.

[*] https://github.com/coturn/coturn/issues/770
2021-06-15 23:44:02 +02:00
Mészáros Mihály
7ad04a37d6 Not send SOFTWARE attr, if no_sotware_attribute on 2021-06-05 22:10:31 +02:00
Mészáros Mihály
708b83ea78 RESPONSE_ORIGIN attribute only if rfc5780 is on 2021-06-05 22:10:31 +02:00
Mészáros Mihály
54ef051844 Disable stun backward compatibility 2021-06-05 22:10:31 +02:00
Mészáros Mihály
eda11698f0 Add option no-rfc5780
To avoid any amplifiaction STUN binding attacks.
2021-06-05 22:10:31 +02:00
Mészáros Mihály
8c9622ad18 Add a check, don't SSL_CTX_up_ref a null pointer
This cause segmentation failure. Regression..
2021-06-05 22:10:31 +02:00
Mészáros Mihály
88f5119e1b Include ssl.h 2021-06-05 22:10:31 +02:00
Haseeb Abdul Qadir
e88de80abd Make sure we zero out any padding added to the attribute 2021-05-22 11:53:25 -04:00
Haseeb Abdul Qadir
93c5387180 Avoid using bzero for the entire stun_buffer_list_elem and only init metadata
On high traffic servers bzero -> memset takes a significant amount of time because each stun_buffer_list_elem can be ~64kb
2021-05-21 07:51:45 -04:00
ggalperi
0ac3fda6dd
Fix server->log_binding usage
The server->log_binding ptr should be dereferenced
2021-05-14 16:34:52 -04:00
Mészáros Mihály
d90c689c99
Merge pull request #739 from hills/ssl-reload-crashes
SSL reload has hidden bugs which cause crashes
2021-05-07 21:10:18 +02:00
Serhii Charykov
0f7ff3ec4a Change sqlite_init_multithreaded return type to void
to satisfy pthread_once() interface because
previously return from sqlite_init_multithreaded
was not used
2021-04-26 23:47:11 +03:00
Serhii Charykov
2d12ad4f29 Refactor code 2021-04-26 23:34:24 +03:00
Serhii Charykov
34e18533cf Fix sqlite3_config call only once before using any other sqlite utilities 2021-04-26 22:19:16 +03:00
Serhii Charykov
0b709a05b7 Remove sqlite3_shutdown()
Because:
1. According to sqlite3 docs sqlite3_initialize() and sqlite3_shutdown() are not must to be invoked
2. sqlite3_initialize() is never called explicilty
3. sqlite3_shutdown() is not threadsafe and sqlite_init_multithreaded is not called holding a lock
4. According to docs all connections must be closed before invoking sqlite3_shutdown() but they are not (from the different threads).

Possible issue:
sqlite3_config must be called before sqlite3_initialize() or after sqlite3_shutdown() (and only once?)
2021-04-26 21:36:28 +03:00
KangLin
9f6defdac4 CMake: add -Wno-deprecated-declarations 2021-03-29 07:22:12 -07:00
KangLin
2110991cd6 CMake: add turnadmin 2021-03-28 21:32:47 -07:00
KangLin
73da474804 CMake: add runtime install 2021-03-28 20:19:15 -07:00
Mark Hills
8f1908d7bd A use-after-free can occur on the SSL_ctx on a busy system
When openssl_load_certificates() is called as a result of USR2
signal, it has the effect of SSL_free() on certificates.

But pointers to these certificates are borrowed by the ioa_engines
where they are used for new connections.

The tls_mutex when loading the certificates does not prevent this use
because it's released before despatching asynchronous events to each
ioa_engine asking them to pick up the new SSL context.

So there is a race; if a new connection arrives quickly after
openssl_load_certificates() but before the tls_ctx_update_ev.

This patch resolves this using OpenSSL's own fine grained locking.
The ioa_engines now 'copy' the SSL context (actually a refcounted copy)
2021-03-23 16:02:06 +00:00
Mark Hills
da5cda7761 Do not take a copy of the SSL context
When SSL certificates are renewed during runtime (via SIGUSR2),
e->dtls_ctx is replaced with a context based on the new certificate.
But this code continues to operate on its own borrowed pointer.

This is clearly visible using valgrind, but the bug is subtle and not
always noticed at runtime, possibly due to some fortunate re-use of
memory.

At the point of SSL_new():

==28413== Thread 5:
==28413== Invalid read of size 8
==28413==    at 0x4F6198F: SSL_new (in /lib/libssl.so.1.1)
==28413==    by 0x137A72: dtls_server_input_handler (dtls_listener.c:291)
==28413==    by 0x137A72: handle_udp_packet (dtls_listener.c:443)
==28413==    by 0x138153: udp_server_input_handler (dtls_listener.c:728)
==28413==    by 0x4FC499E: ??? (in /usr/lib/libevent_core-2.1.so.7.0.0)
==28413==    by 0x4FC50AF: event_base_loop (in /usr/lib/libevent_core-2.1.so.7.0.0)
==28413==    by 0x121F34: run_events (netengine.c:1579)
==28413==    by 0x121F34: run_general_relay_thread (netengine.c:1707)
==28413==    by 0x40517B6: start (pthread_create.c:195)
==28413==    by 0x40538EF: ??? (clone.s:22)
==28413==  Address 0x49a75e0 is 0 bytes inside a block of size 1,024 free'd
==28413==    at 0x48A074F: free (vg_replace_malloc.c:540)
==28413==    by 0x4F5F6F1: SSL_CTX_free (in /lib/libssl.so.1.1)
==28413==    by 0x11CEC4: set_ctx (mainrelay.c:3104)
==28413==    by 0x11D233: openssl_load_certificates (mainrelay.c:3173)
==28413==    by 0x11D328: reload_ssl_certs (mainrelay.c:3190)
==28413==    by 0x4FC4601: ??? (in /usr/lib/libevent_core-2.1.so.7.0.0)
==28413==    by 0x4FC50AF: event_base_loop (in /usr/lib/libevent_core-2.1.so.7.0.0)
==28413==    by 0x122582: run_events (netengine.c:1579)
==28413==    by 0x122582: run_listener_server (netengine.c:1603)
==28413==    by 0x110BB8: main (mainrelay.c:2536)
==28413==  Block was alloc'd at
==28413==    at 0x489F72A: malloc (vg_replace_malloc.c:309)
==28413==    by 0x4DFA2C6: CRYPTO_zalloc (in /lib/libcrypto.so.1.1)
==28413==    by 0x4F5F79E: SSL_CTX_new (in /lib/libssl.so.1.1)
==28413==    by 0x11CA80: set_ctx (mainrelay.c:2875)
==28413==    by 0x11D233: openssl_load_certificates (mainrelay.c:3173)
==28413==    by 0x110A19: openssl_setup (mainrelay.c:3139)
==28413==    by 0x110A19: main (mainrelay.c:2396)
==28413==
2021-03-23 16:02:06 +00:00
Mark Hills
bdf27616ba Do not mutate something which the DTLS listener server does not own
Multiple DTLS listener servers are created, and server->dtls_ctx is
the same object shared between them.

Set these callbacks once, and logically this is at the point where the
SSL context is created.
2021-03-23 16:02:06 +00:00
Mészáros Mihály
31c936d51d
Merge pull request #721 from KangLin/cmake
Add to support cmake
2021-03-23 09:31:59 +01:00
Mészáros Mihály
6a5d067d7c
Merge pull request #703 from hills/no-stdout-log
Restore no_stdout_log behaviour
2021-03-23 09:18:17 +01:00
Mészáros Mihály
2204778ce1 Replace keep-address-family with allocation-default-address-family 2021-03-12 23:05:18 +01:00
Mészáros Mihály
e2c99c6803 Remove extra new line in error 2021-03-11 22:15:22 +01:00
KangLin
677e5dc5d3 Add cmake 2021-02-26 09:02:50 +08:00
Mark Hills
9bcc898b05 Restore no_stdout_log behaviour
In commit 599a61ee this was removed, by accident it could seem.
2021-01-25 09:31:47 +00:00
Mészáros Mihály
e5d4e62dec Fix typo "finsihed" reported by Felipe Cecagno 2021-01-14 15:14:53 +01:00
Mészáros Mihály
cc637d2db9 Uneccessary semicolon 2021-01-14 15:06:53 +01:00
brevilo
a52df6cafb
Define OPENSSL_VERSION_1_1_1 on systems where it doesn't (yet) exist
Otherwise preprocessor logic will fail and cause incompatible pointer type issues (by using wrong callback API)
2021-01-13 01:54:25 +01:00
Mészáros Mihály
abfe1fd08d Merge branch 'advisory-fix-1' CVE-2020-26262 2021-01-10 20:59:14 +01:00
Mészáros Mihály
104ab83f09 Automatically notify systemd if compiled 2021-01-10 20:57:43 +01:00
Mészáros Mihály
e367fabb0e Fix typo 2021-01-10 17:20:40 +01:00
Mészáros Mihály
c1437902e2 Remove earlier deleted function definitions 2021-01-10 10:43:36 +01:00
Mészáros Mihály
f1d946c1b4 Refactoring Prometheus
* Fix c++ support
* Simplify: Remove session id/allocation
2021-01-10 00:32:49 +00:00
Mészáros Mihály
a28fee8cde Fix typo in acme 2021-01-08 09:19:33 +00:00
Mészáros Mihály
2edc14a193 Fixes #601 2021-01-07 21:38:43 +00:00
Mészáros Mihály
13082beae8 Fixes #600 2021-01-07 21:31:12 +00:00
Mészáros Mihály
9fcd86f3cc Fixes #621 2021-01-07 21:25:27 +00:00
Mészáros Mihály
ef7916842d Add systemd notification support 2021-01-07 17:51:34 +00:00
Mészáros Mihály
5b13fdd37b Fix: Read log options in first pass. Fixes #602 2021-01-07 10:33:14 +00:00
Mészáros Mihály
50ebef7a3f Fix g++ 2 errors and many warnings
Resolves #661 #654
2021-01-05 21:47:50 +00:00
Mészáros Mihály
288c486676
Merge pull request #672 from jelmd/acme_fix
fix acme wrt. security, redundancy, consistency
2021-01-05 11:42:03 +01:00
Mészáros Mihály
6ce463e8e2 Removed wiki, due it was outdated and redundant. 2021-01-05 09:57:16 +00:00
Mészáros Mihály
27b261eb58 Disable binding logging to avoid DoS attack
* Add new option log-binding
2021-01-05 09:55:55 +00:00
Mészáros Mihály
86b78aa6fa Tidy: fix spacing 2021-01-05 07:44:58 +00:00
Jens Elkner
8c99505614 fix acme wrt. security, redundancy, consistency 2020-12-31 16:39:00 +01:00
Mészáros Mihály
8dc5bbcb3b Tidy: too long line length 2020-12-22 17:05:42 +00:00
Mészáros Mihály
6101ebd51b external-ip private part to white list fixes#584 2020-12-22 16:58:00 +00:00
Mészáros Mihály
ae541958cd Tidy: remoe trailing space 2020-12-18 08:22:02 +00:00
Mészáros Mihály
2f790ec18b Tidy acme code 2020-12-18 08:06:25 +00:00
Mészáros Mihály
377e8f7687 Ugly Hack: Parse HTTP request 2020-12-18 08:05:56 +00:00
Mészáros Mihály
174d039c73 fix acme-redirect help 2020-12-15 13:56:21 +00:00
Mészáros Mihály
fa01cfeed6 Move acme to new file 2020-12-15 13:25:56 +00:00
Jens Elkner
12c7d19a47 support of --acme-redirect <URL> 2020-12-15 13:24:10 +00:00
Mészáros Mihály
d4686750ee Move acme to new file 2020-12-15 13:04:11 +00:00
Jens Elkner
9b0dd4380c acme-redirect: add option to man page, fix help text 2020-12-15 13:01:51 +00:00
Jens Elkner
7e525c8e1c support of --acme-redirect <URL> 2020-12-15 13:01:51 +00:00
Mészáros Mihály
d84028b6db Simplify the ipv6 ::/128 (in6addr_any) check 2020-12-10 14:17:00 +01:00
Mészáros Mihály
dd0ffdb51a Add comment to ioa_addr_is_zero 2020-12-10 14:15:26 +01:00
Camden Narzt
0880d7cd0f
fix compilation on macOS Big Sur
You must define `__APPLE_USE_RFC_3542` in order to use the `IPV6_DONTFRAG` sockopt: https://opensource.apple.com/source/xnu/xnu-6153.141.1/bsd/netinet6/in6.h.auto.html
```
 * To use the new IPv6 Sockets options introduced by RFC 3542
 * the constant __APPLE_USE_RFC_3542 must be defined before
 * including <netinet/in.h>
```
2020-12-09 16:15:40 -07:00
Mészáros Mihály
b0fb4a9a0a Rename new timestamp options, and fix these cli handling 2020-12-08 11:51:25 +01:00
Mészáros Mihály
9a0d9d8c5d Replace new-timestamp_format=>new-timestamp-format 2020-12-08 11:07:53 +01:00
Mészáros Mihály
00659f3948
Merge pull request #599 from cedk/libressl
Do not use FIPS and remove hardcode OPENSSL_VERSION_NUMBER with LibreSSL
2020-12-08 08:48:15 +01:00
Mészáros Mihály
c0822dab95
Merge pull request #618 from PaulWay/paulway_log_real_time
Print full date and time in logs
2020-12-08 08:45:48 +01:00
Mészáros Mihály
330744de24
Merge pull request #655 from Startup-Stack/proxy-protocol
Add support for proxy protocol V1
2020-12-08 08:37:54 +01:00
Mészáros Mihály
75309e5c2d
Merge pull request #643 from tupelo-schneck/master
Allow RFC6062 TCP relay data to look like TLS; fixes #605
2020-12-08 08:16:31 +01:00
Mészáros Mihály
3b3c5849cc bump version 2020-12-07 15:26:00 +01:00
Mészáros Mihály
9c7deff4b8 Separate addr zero check from allow_loopback_peers 2020-12-07 14:28:23 +01:00
Sandro Gauci
649cbf9661 fixed logic for banning loopback and zero addr 2020-12-07 12:27:25 +01:00
Mészáros Mihály
560684c894 Tidy: Move zero check to own function 2020-12-07 08:32:09 +01:00
Sandro Gauci
6c774b9fb8 ioa_addr_is_loopback now also covers :: 2020-11-30 14:05:22 +01:00
Sandro Gauci
af50d63a15 ioa_addr_is_loopback ipv6 now properly blocks ::1 2020-11-30 14:04:27 +01:00
Sandro Gauci
ff5e5478a3 ioa_addr_is_loopback now covers 0.0.0.0/8 2020-11-30 14:02:35 +01:00
Peter Linss
c00d69e67f
Add support for proxy protocol V1 2020-11-18 17:20:24 -08:00
Robert Tupelo-Schneck
a83bffd942 Allow RFC6062 TCP relay data to look like TLS; fixes #605 2020-10-30 12:34:31 -04:00
Paul Wayper
c315c288bd Add options for new log timestamp and setting timestamp format
This adds the `--new-log-timestamp` and `--new-timestamp-format <value>` options
to the `turnserver` program.

Setting `--new-log-timestamp` on the command line, or `new-log-timestamp` in the
configuration file, will cause all logs to be written with an ISI-8601 timestamp
(`YYYY-MM-DDTHH:MM:SSZZZZZ` with `T` being literal and `ZZZZZ` being `+` or `-`
and the hour and minute offset from GMT for the local timezone).  This replaces
the 'number of seconds since daemon was started' format.

Setting the `--new-timestamp-format <format>` option with a given format, or
`new-log-timestamp=<format>` in the configuration file, will use this instead
of the standard timestamp format.  Timestamp format strings up to 48 characters
can be accommodated; more will be truncated.  This will only be used when the
`--new-log-timestamp` option (above) is set.

Thanks to Hendrik Huels <hendrik.huels@outlook.de> for the idea and some of the
code for setting the log timestamp string.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-09-01 21:07:44 +10:00
Paul Wayper
ed88f1605a Neater ISO-8601 timestamp format string
Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-09-01 20:57:54 +10:00
Paul Wayper
f59e9f8ad4 Allow the log timestamp format to be set
This allows the timestamp format in log output to be set by a function.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-09-01 18:43:56 +10:00
Paul Wayper
5e87c44469 Merge turn_log_func_default and vrtpprintf
The function `turn_log_func_default` calls the function `vrtpprintf` to print to syslog
or the log file.  The latter does exactly the same string formatting as the former, so
here we merge the two functions into one to do the string formatting once.  This also
makes sure that the log line is consistent on all outputs.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-09-01 18:35:01 +10:00
Paul Wayper
16eeb53e07 Allow new log format to be turned on if required
This provides the 'use_new_timestamp_log_format' variable in `ns_turn_utils.h`.  By
default it is set to 0 and the old 'seconds since daemon was started' timestamp will
be emitted.  However, if it is set to 1 or any 'true' number the new date and time
timestamp format will be used instead.

This has also resulted in a small clean-up of some of the string length handling.

Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-08-31 22:34:54 +10:00
Mészáros Mihály
c5b0bd0e22 Update prometheus gcc 10 compatible 2020-08-27 20:27:09 +02:00
Paul Wayper
762ee23482 Fixing a few errors - C still coming back to me
Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-08-26 21:05:08 +10:00
Paul Wayper
599a61eea6 Print full date and time in logs
Signed-off-by: Paul Wayper <paulway@mabula.net>
2020-08-25 21:46:15 +10:00
Mészáros Mihály
87d85f06bd Add log for prometheus collector start 2020-08-03 15:16:09 +02:00
Mészáros Mihály
388d939ed9 Change prometheus exporter port to 9641 2020-08-03 14:24:20 +02:00
Miquel Ortega
c65ce15fde Fix peer and realm on delete 2020-08-03 10:32:29 +02:00
Mészáros Mihály
c9cd99e4f5 Disable prometheus by default 2020-08-03 10:25:56 +02:00
Cédric Krier
5b6739a793 Do not use FIPS and remove hardcode OPENSSL_VERSION_NUMBER with LibreSSL
Fix #552
2020-07-19 10:48:44 +02:00
Mészáros Mihály
2f9ac538f5 Add ifdef around default value 2020-07-08 10:00:53 +02:00
Mészáros Mihály
2acb952670 tidy after PR #517 2020-07-08 09:47:24 +02:00
Mészáros Mihály
063def2c0a Merge branch 'prometheus' 2020-07-07 20:23:08 +02:00
Mészáros Mihály
93a8c8aa78 Fix null pointer dereferenceThanks to Thomas Moeller for the report! 2020-07-03 11:07:40 +02:00
wolmi
a5d1fbba57
Merge branch 'master' into prometheus 2020-06-29 09:33:20 +02:00
Mészáros Mihály
6d605d353f Bump version 2020-06-24 17:05:18 +02:00
Mészáros Mihály
fefc55041c tidy 2020-06-24 16:51:53 +02:00
Mészáros Mihály
170da11407 init with zero any new or reused stun buffers 2020-06-24 16:51:53 +02:00
islamoglus
a43d3b63b4 ignore md5 for boringssl 2020-06-11 07:40:00 +03:00
Miquel Ortega
798349fb5b Change gauge to counters metrics 2020-06-05 11:29:22 +02:00
Miquel Ortega
83cf9ea6c4 Merge branch 'prometheus' of github.com:wolmi/coturn into prometheus 2020-05-05 19:44:16 +02:00
Miquel Ortega
2789a27fb9 Added no-promethsu CLI option 2020-05-05 15:49:50 +02:00
Mészáros Mihály
2b2f116c2d Bump version 2020-04-30 20:41:17 +02:00
Mészáros Mihály
e228a5e745 Quick and dirty fix for tot_recv_messages wrong count in e.g. secure_tls_client_c2c_tcp_relay.sh 2020-04-30 12:15:54 +00:00
Greg Fodor
38e7daf3d6 Merge remote master 2020-04-28 17:18:30 +00:00
wolmi
7bbe78a5f2
Merge branch 'master' into prometheus 2020-04-28 12:56:33 +02:00
Mészáros Mihály
ded19f58c8 do not require to set cli password if no-cli 2020-04-28 11:14:08 +02:00
Mészáros Mihály
991a82e104
Merge branch 'master' into master 2020-04-28 09:47:20 +02:00
Mészáros Mihály
1e4456ea92
Merge pull request #506 from dbrgn/rename-prod
Rename "prod" config option to "no-software-attribute"
2020-04-28 09:18:51 +02:00
Mészáros Mihály
24346fbaba
Merge pull request #522 from weberhofer/master
Drop of supplementary group IDs
2020-04-28 09:06:57 +02:00
Greg Fodor
52320f8ac9 Add flags to disable periodic use of dynamic tables 2020-04-18 01:27:54 +00:00
Mészáros Mihály
fb8dc8a736 Change DH key size default from 1066 to 2066 2020-04-15 22:07:26 +02:00
Johannes Weberhofer
acbf7e15c9
Drop of supplementary group IDs
Fix related to POS36-C and rpmlint error "missing-call-to-setgroups-before-setuid".
2020-04-11 10:33:55 +02:00
Miquel Ortega
fb3bd0d353 Added checks to make prometheus optional 2020-04-02 17:28:21 +02:00
Miquel Ortega
aeb0474344 Added some comments 2020-04-02 10:45:32 +02:00
Miquel Ortega
d485088409 Added metrics for total traffic 2020-04-02 10:35:50 +02:00
Miquel Ortega
3e22d7e199 Refactor to use only one function to set metrics 2020-04-02 10:26:01 +02:00
Miquel Ortega
9ed631c495 Prometheus server init and first metrics 2020-04-02 00:51:42 +02:00
Miquel Ortega
b9802690d1 First code to implement prometheus metrics 2020-04-02 00:49:28 +02:00
Danilo Bargen
520e172b22 Rename "prod" config option to "no-software-attribute"
As discussed in https://github.com/coturn/coturn/pull/478, if the
parameter only controls whether or not to send the software attribute
and not other production-relevant configurations, it should be named
accordingly.

The old --prod configuration option still works, but is now deprecated
and undocumented.
2020-03-13 11:03:05 +01:00
Mészáros Mihály
4722697645 Fix compiler warnings
* Changed type from int to size_t to avoid warning
  warning: comparison between signed and unsigned integer expressions
* Fixed string truncation warning
2020-03-03 15:26:01 +01:00
Mészáros Mihály
c6bca3cef7 Merge branch 'http-server-fixes' 2020-02-19 07:49:05 +01:00
Mészáros Mihály
c534eaef41 Merge branch 'input-validation'
Merge PR #472
2020-02-18 14:46:11 +01:00
Mészáros Mihály
79361c170f Merge branch 'fips' 2020-02-18 14:36:37 +01:00
Mészáros Mihály
e09bcd9f7a Fix: CVE-2020-6062 / TALOS-2020-0985 2020-02-18 12:32:36 +01:00
Mészáros Mihály
51a7c2b9bf Fix: CVE-2020-6061/TALOS-2020-0984 2020-02-17 10:34:56 +01:00
Bertold Van den Bergh
ace903fd07 Add support for loadbalanced TCP connections (haproxy protocol v2) 2020-02-13 01:56:43 +01:00
Mészáros Mihály
fbd79ed560
Merge pull request #466 from chanduthedev/null-check
added null check for second char
2020-02-12 08:02:15 +01:00
Mészáros Mihály
4badbbf018
Merge pull request #470 from FeralInteractive/compiler-fixes
Compiler warning fixes
2020-02-12 07:56:54 +01:00
Feral Interactive
efa7a47632 Silence shadow variable declaration warning.
'sar', 'value', and 'vlen' already exist in an outer scope and are safe to reuse since they're overwritten before being used again.
2019-11-20 00:03:46 +00:00
Feral Interactive
9b8baa8055 Validate the size of an attribute before returning it to the caller.
Previously this was being done in stun_attr_get_next_str() to check that the previous attribute didn't exceed the size of the underlying buffer, however by that point any maliciously crafted attributes would have already had their chance to attack the caller.
2019-11-19 23:48:41 +00:00
Feral Interactive
14cb1c94e7 Validate the size of the buffer in stun_get_command_message_len_str().
Without this the caller could read off the end of the underlying buffer if it receives a maliciously crafted packet with an invalid header size.
2019-11-19 23:48:34 +00:00
Feral Interactive
353e3b98e6 Add some casts to appease compiler warnings about narrowing. 2019-11-19 23:47:19 +00:00
Feral Interactive
b1990b6130 Liberally apply const where appropriate. 2019-11-19 23:47:11 +00:00
Feral Interactive
763d1f1b9c Fix a memory leak when an SHATYPE isn't supported.
Deallocating `str` happens at the end of the function, so don't skip it when encountering an unsupported SHATYPE.
2019-11-19 23:45:37 +00:00