14459 Commits

Author SHA1 Message Date
901eb09860 openssl: add check for LIBRESSL
Disable use of "@SECLEVEL" in default cipher string and
avoid SSL_CONF_CTX_set_flags() API when LIBRESSL is used.
This means tlscommands will not work.

closes: https://github.com/rsyslog/rsyslog/issues/4210
2020-03-11 08:17:01 +01:00
Michael Zimmermann
b50d72b051 openssl tls: stop leaking ctx 2020-03-10 14:38:33 +01:00
taavi.valjaots
f219fa3003 ksi bugfix: Hardcoded default hash algorithm replaced with 'default'.
Instead of hardcoded SHA-256 KSI_getHashAlgorithmByName("default")
is used to get default hash function.
Function rsksiSetHashFunction and SetCnfParam updated.
2020-03-10 13:07:35 +02:00
taavi.valjaots
8b3c24a768 ksi bugfix: When KSI module is suddenly closed, files are finalized.
In async. mode all pending signature requests are closed immediately and
unsigned block marker is attached with message about sudden closure.
Similar approach is used for blocks that already contain some records.
Empty blocks are just closed without any metadata.
2020-03-10 12:59:17 +02:00
Rainer Gerhards
26bd4b61bb
Merge pull request #4205 from rgerhards/i4192
queue subsystem: cap max queue size to 2^31-1
2020-03-04 17:12:06 +01:00
Rainer Gerhards
6ef5b3e1db
Merge pull request #4208 from rgerhards/testbench-complex1
testbench: adjust queue enqueue timeouts to current standards
2020-03-04 15:52:28 +01:00
Rainer Gerhards
1d972b7b01
Merge pull request #4206 from rgerhards/imdiag-debug
testbench: add some diagnostic info to analyze false positives
2020-03-04 13:06:11 +01:00
Rainer Gerhards
9753d18f1f
testbench: adjust queue enqueue timeouts to current standards
Timeouts were too short to take care of slow CI environments.
2020-03-04 12:38:15 +01:00
Rainer Gerhards
8509bb0b2d
maintain ChangeLog 2020-03-04 10:58:30 +01:00
Rainer Gerhards
f49c294d8f
Merge pull request #4195 from w-simon/master
imudp: fix compiler errors
2020-03-04 10:54:56 +01:00
Rainer Gerhards
b17fec0c71
testbench: add some diagnostic info to analyze false positives
We have some false positives with imfile checks and this commit
both improves the testbench framework slightly and adds debug
info.

The debug info should be remove when we finally find the cause
of the issue, but it does not hurt if it stays for a quite a
while. Thus we can analyze the false positives over an extended
period of time - what is what it looks like we need to do to
find the root cause.
2020-03-04 10:51:22 +01:00
Rainer Gerhards
2e7207e3a5
queue subsystem: cap max queue size to 2^31-1
closes https://github.com/rsyslog/rsyslog/issues/4192
2020-03-04 10:33:55 +01:00
Rainer Gerhards
a9290fbc85
Merge pull request #4203 from rgerhards/tmp
imudp: remove no longer needed variable
2020-03-03 18:21:05 +01:00
Rainer Gerhards
b1a17b8ccb
imudp: remove no longer needed variable
Depending on circumstances, this could also break compilation.
Detected while working on a related PR.

see also https://github.com/rsyslog/rsyslog/pull/4195
2020-03-03 10:04:33 +01:00
Rainer Gerhards
36bffb61a1
maintain ChangeLog 2020-03-02 08:41:23 +01:00
Rainer Gerhards
ec0d7649a8
Merge pull request #4201 from leneron/fix-3761-call-rulename
fix -o which produces missing space between call and rulename
2020-03-02 08:35:44 +01:00
Tetiana Ohnieva
04240ebb69 fix -o which produces missing space between call and rulename
closes #3761
2020-02-28 14:03:20 +02:00
Jeff Marckel
f604d5269b imjournal: remove strcat call 2020-02-27 11:52:32 -06:00
Wen Yang
3fe88f21eb imudp: fix compiler errors
fix the following compiler errors with 4.19 kernel:

imudp.c:1216:2: error: implicit declaration of function 'prctl'
[-Werror=implicit-function-declaration]
  if(prctl(PR_SET_NAME, thrdName, 0, 0, 0) != 0) {
  ^

Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
2020-02-26 15:54:12 +08:00
Rainer Gerhards
6499a67116
bump version numbers for next scheduled release 2020-02-25 16:21:42 +01:00
Rainer Gerhards
f869c99b00
Merge branch 'master' into v8-stable v8.2002.0 2020-02-25 14:16:26 +01:00
Rainer Gerhards
af45cbe768
maintain ChangeLog 2020-02-25 14:13:46 +01:00
Rainer Gerhards
c840cbf5a4
Merge pull request #4160 from qu0zl/greg.farrell/add_imfile_rate_limits
Add per minute rate limiting to imfile plugin
2020-02-25 14:11:30 +01:00
Rainer Gerhards
c100f8b10f
maintain ChangeLog 2020-02-24 09:55:23 +01:00
Rainer Gerhards
f2afcb45b2
Merge pull request #4166 from rgerhards/i4164
core: add global parameter "security.abortOnIDResolutionFail"
2020-02-24 09:47:25 +01:00
Rainer Gerhards
3574f39a4b
maintain ChangeLog 2020-02-24 08:57:09 +01:00
Rainer Gerhards
4f2394a9d1
Merge pull request #4174 from jwslater0823/master
testbench: modify es_response_get_msgnum.py for python3
2020-02-24 08:47:49 +01:00
Rainer Gerhards
4d1f7bd11a
Merge pull request #4182 from alorbach/pr-issue-4170
openssl nsd driver: Switch to SSL_CTX_use_certificate_chain_file API
2020-02-24 08:43:03 +01:00
Rainer Gerhards
ce106d3086
Merge pull request #4188 from rgerhards/i4187
core bugfix: too early parsing of incoming messages
2020-02-24 08:40:51 +01:00
Rainer Gerhards
a74a0943f9
maintain ChangeLog 2020-02-20 17:38:18 +01:00
Rainer Gerhards
822ac8df1c
Merge pull request #4177 from alorbach/pr-issue-4134
testbench: Fixed two minor issues in omkafkadynakey.sh test.
2020-02-20 17:36:22 +01:00
Rainer Gerhards
04599b9de8
Merge pull request #4168 from alorbach/pr-issue-4158
testbench: increased max extra data length in tcpflood from 256 to 512KB
2020-02-20 17:34:27 +01:00
Rainer Gerhards
7b9243afc2
maintain ChangeLog 2020-02-20 17:30:57 +01:00
Rainer Gerhards
6ff41a3f8b
Merge pull request #4167 from jvymazal/config.enabled_fix
Fixed processing of 'cofig.enabled' directive
2020-02-20 17:29:19 +01:00
Rainer Gerhards
c4a9d637da
core bugfix: too early parsing of incoming messages
In theory, rsyslog should call parsers on the queue worker threads whenever
possible. This enables the parsers to be executed in parallel. There are
some cases where parsers needs to be called earlier, namely when parsed
data is needed for rate-limiting.

The logic to do this previously did not work correctly and was fixed six
years ago (!) by b51dd22. Unfortunately, b51dd22 was overly agressive:
it actually makes the early parser call now mandatory, effectively moving
parsing to the input side where there is no to little concurrency.

We still do not need to call the parser when all messages, regardless of
severity, need to be rate-limited. This is the default and very frequent
case. This patch introduces support for this and as such makes parsers
able to run in parallel in the frequent case again.

closes https://github.com/rsyslog/rsyslog/issues/4187
2020-02-20 13:15:57 +01:00
493b04b846 openssl nsd driver: Switch to SSL_CTX_use_certificate_chain_file API
Switched from SSL_CTX_use_certificate_file to SSL_CTX_use_certificate_chain_file
API for loading the certificate into the certificate store.

According to the openssl doc, the SSL_CTX_use_certificate_chain_file API has the
advantage that it can load the main certificate (First in the PEM) and many chain
certificates after that automatically.

See notes section for more:
https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_use_certificate_chain_file.html

closes: https://github.com/rsyslog/rsyslog/issues/4170
2020-02-19 14:26:25 +01:00
608c4907ab testbench: Fixed two minor issues in omkafkadynakey.sh test.
- topic check was done on wrong (hardcoded topic)
- rsyslog_out_log was overwritten by kafkacat check which caused the
  seq_check to fail at the end.

closes: https://github.com/rsyslog/rsyslog/issues/4134
2020-02-17 11:00:03 +01:00
jwslater0823
343a0853a0
testbench: modify es_response_get_msgnum.py for python3
python3 does not like mixing spaces and tabs for indentation, so we get rid of the tab before print().
2020-02-15 16:34:51 -08:00
Jiri Vymazal
ba5b68be84 Fixed processing of 'cofig.enabled' directive
Previously the directive was processed way too late which caused
false errors whenever it was set to 'off' and possibly other
problems.
2020-02-12 10:14:51 +01:00
f4aa6473d8 testbench: set max extra data length for tcpflood from 256 to 512KB.
Added a imrelp test for big messages (256KB).

see also: https://github.com/rsyslog/rsyslog/issues/4158
2020-02-11 18:01:56 +01:00
Rainer Gerhards
cbcaf2c7e5
core: add global parameter "security.abortOnIDResolutionFail"
This parameter controls whether or not rsyslog aborts when a name ID
lookup fails (for user and group names). This is necessary as a security
measure, as otherwise the wrong permissions can be assigned or privileges
are not dropped.

CHANGE OF BEHAVIOR
The default for this parameter is "on". In previous versions, the default
was "off" (by virtue) of this parameter not existing. As such, existing
configurations may now error out.

We have decided to accept this change of behavior because of the potential
security implications.

closes https://github.com/rsyslog/rsyslog/issues/4164
2020-02-11 12:54:19 +01:00
Rainer Gerhards
4de426bcf8
Merge pull request #4159 from rgerhards/tb-random-testid
testbench: create random test_id
2020-02-11 12:12:43 +01:00
Rainer Gerhards
0603e3ac86
testbench: add random data to test_id
We use the test_id to generate unique files during parallel
runs. So far we used a combination of ms-based timestamp and
hash of test name. Practice shows that under some circumstances
the generated ids are not unique and thus test get file conflicts
and false positives.

This is now changed so that the test_id we add 4 bytes of random
data to the test ID. This is hopefully sufficient to make the IDs
of test runing in parallel unique.
2020-02-10 18:11:58 +01:00
Rainer Gerhards
3858b85f74
maintain ChangeLog 2020-02-10 09:02:13 +01:00
Rainer Gerhards
3d3c89dd24
Merge pull request #4163 from rgerhards/imfile-timeout-fix
imfile bugfix: timeout did not work on very busy system
2020-02-07 15:47:58 +01:00
Rainer Gerhards
493db68b31
imfile bugfix: timeout did not work on very busy system
The timeout feature was soley based on timeouts of the poll()
system call. On a very busy system, this would probably happen
very seldomly.  Moreover, the timeout could occur later than
expected on any system with high load.

The issue was not reported from practice but discovered during
CI system improvements.
2020-02-05 19:05:53 +01:00
Greg Farrell
7442c03e0c Add per minute rate limiting to imfile plugin
Add MaxBytesPerMinute and MaxLinesPerMinute options.
These take integer values and, respectively, limit the number
of bytes or lines that may be sent in a minute.

This can be used to put a limit on the count or volume of logs
that may be sent for an imfile.
2020-02-04 15:16:04 +00:00
Rainer Gerhards
d17544dd2f
maintain ChangeLog 2020-01-30 10:32:44 +01:00
Rainer Gerhards
e9412218f4
Merge pull request #4123 from rgerhards/tb-fix-imfile
build system: change --enable-imfile-tests default to "yes"
2020-01-30 10:31:05 +01:00
Rainer Gerhards
7c2eaa8f2e
build system: change --enable-imfile-tests default to "yes"
This was accidentally set to "no". Test for imfile should by
default run when imfile is enabled.

We also temporarily disable the failing tests - this makes
it posible to run the remaining tests during CI and prevent
future errors. That is better than nothing. Tests are to be
re-enabled when the imfile bug mentioned below is fixed.

see also https://github.com/rsyslog/rsyslog/issues/4120

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2020-01-30 09:36:35 +01:00