Author : Adiscon Support

rsyslog -devel packages are being removed soon

If you use rsyslog’s devel packages on your system, you will receive errors soon. Be sure to read the complete posting to avoid trouble!

As part of rsyslog’s new release schedule and version naming, devel releases will no longer be named according to the “normal” numbering scheme. This also means that the previous “devel” branches will disappear, as git master branch now is the always-current devel version.

Keep on your mind that we previously had a release cycle of 3 to 9 month for a new feature to appear in a stable version. That was because new feature releases were only done when a complete devel turnaround was done, and relatively many new features were added. For this reason, some people opted to run devel versions in production, and thus needed specific tarballs (and packages) for them.

With the new six week release cycle, we get new features rather quickly into the stable builds. So it usually should be no problem to wait for the next stable to use that recently-implemented new feature. As such, there is no need any longer for special devel releases, and thus no need for devel tarballs and packages.

Well… almost. One thing we would like to have is a “daily devel version”. The idea is that if the testbench runs are OK, a new tarball and a set of packages is generated automatically and posted to a special archive. In general, that archive should receive an update once a day. So people really interested in the [b]leading edge can simply install from that daily package archive — and report bugs quickly, so helping the development process. Unfortunately, time is precious and we don’t know when and if we can setup the required automation. Most probably not before January 2015, and how it works out then needs to be seen.

In the interim, we will begin to delete the -devel packages. The old -devel tarballs will remain available, at least for the time being. The problem with -devel packages is that folks may have set their system to use the -devel repro. If we would just keep it as is, those systems would never again receive any updates, neither security-releated nor others, simply because -devel versions no longer exist in the way they were. That would pose a potentially big security risk. As such, we will delete the -devel content, and begin to do so early next week. If you use the -devel packages, be sure to switch the v8-stable instead.

rsyslog 8.6.0 (v8-stable) released

We have released rsyslog 8.6.0.

This is the first stable release under a new release cycle and versioning scheme. This new scheme is important news in itself. For more details, please have a look here:

http://www.rsyslog.com/rsyslogs-new-release-cycle-and-versioning-scheme/

Version 8.6.0 contains important new features like the ability to monitor files via wildcards in imfile. It also contains new, experimental zero message queue modules (special thanks to team member Brian Knox), improvements to RainerScript and mmnormalize (thanks to Singh Janmejay) and a couple of other improvements.

This release also contains important bug fixes.

This is a recommended upgrade for all users.

 

ChangeLog:

http://www.rsyslog.com/changelog-for-8-6-0-v8-stable/

Download:

http://www.rsyslog.com/downloads/download-v8-stable/

As always, feedback is appreciated.

Best regards,
Florian Riedl

rsyslog’s new release cycle and versioning scheme

With today’s release of rsyslog 8.6.0, we start a new release schedule and versioning scheme. In a nutshell, we will be doing stable releases every six weeks now, and devel releases will be distributed via git exclusively.

We have made this move after reflecting the changes in user participation in open source development as well as analyzing what big projects like the Linux kernel, Firefox and Chrome are doing. I am very excited about the new methodology and sincerely hope it will make new features even more readily available to a large user base. Details on the new system are in the embedded presentation.

Changelog for 8.6.0 (v8-stable)

Version 8.6.0 [v8-stable] 2014-12-02
NOTE: This version also incorporates all changes and enhancements made for
v8.5.0, but in a stable release. For details see immediately below.

  • configuration-setting rsyslogd command line options deprecated
    For most of them, there are now proper configuration objects. Some few will be completely dropped if nobody insists on them.  Additional info at
    http://blog.gerhards.net/2014/11/phasing-out-legacy-command-line-options.html
  • new and enhanced plugins for 0mq. These are currently experimantal.
    Thanks to Brian Knox who contributed the modules and is their author.
  • empty rulesets have been permitted. They no longer raise a syntax error.
  • add parameter -N3 to enable config check of partial config file
    Use for config include files. Disables checking if any action exists at
    all.
  • rsyslogd -e option has finally been removed
    It is deprectated since many years.
  • testbench improvements
    Testbench is now more robust and has additional tests.
  • testbench is now by default disabled
    To enable it, use –enable-testbench. This was done as the testbench now does better checking if required modules are present and this in turn would lead to configure error messages where non previously were if we would leave –enable-testbench on by default. Thus we have turned it off. This should not be an issue for those few testbench users.
  • add new RainerScript functions warp() and replace()
    Thanks to Singh Janmejay for the patch.
  • mmnormalize can now also work on a variable
    Thanks to Singh Janmejay for the patch.
  • new property date options for day ordinal and week number
    Thanks to github user arrjay for the patch
  • remove –enable-zlib configure option, we always require it
    It’s hard to envision a system without zlib, so we turn this off
    closes https://github.com/rsyslog/rsyslog/issues/76
  • slight source-tree restructuring: contributed modules are now in their own ./contrib directory. The idea is to make it clearer to the end user which plugins are supported by the rsyslog project (those in ./plugins).
  • bugfix: imudp makes rsyslog hang on shutdown when more than 1 thread used
    closes https://github.com/rsyslog/rsyslog/issues/126
  • bugfix: not all files closed on auto-backgrounding startup
    This could happen when not running under systemd. Some low-numbered fds were not closed in that case.
  • bugfix: typo in queue configuration parameter made parameter unusable
    Thanks to Bojan Smojver for the patch.
  • bugfix: unitialized buffer off-by-one error in hostname generation
    The DNS cache used uninitialized memory, which could lead to invalid hostname generation.
    Thanks to Jarrod Sayers for alerting us and provinding analysis and patch recommendations.
  • bugfix imuxsock: possible segfault when SysSock.Use=”off”
    Thanks to alexjfisher for reporting this issue.
    closes https://github.com/rsyslog/rsyslog/issues/140
  • bugfix: RainerScript: invalid ruleset names were accepted during ruleset defintion, but could of course not be used when e.g. calling a ruleset.
    IMPORTANT: this may cause existing configurations to error out on start, as they invalid names could also be used e.g. when assigning rulesets.
  • bugfix: some module entry points were not called for all modules callbacks like endCnfLoad() were primarily being called for input modules. This has been corrected. Note that this bugfix has some regression potential.
  • bugfix omlibdbi: connection was taken down in wrong thread
    This could have consequences depending on the driver being used. In general, it looks more like a cosmetic issue. For example, with MySQL it lead to a small memory but also an annoying message about a thread not properly torn down.
  • imttcp was removed because it was an incompleted experimental module
  • pmrfc3164sd because it was a custom module nobody used
    We used to keep this as a sample inside the tree, but whoever wants to look at it can check in older versions inside git
  • omoracle was removed because it was orphaned and did not build/work for quite some years and nobody was interested in fixing it

rsyslog 8.5.0 (v8-devel) released

We have just released 8.5.0 of the v8-devel branch.

This begins the next v8 devel series. Most importantly, it contains a greatly refactored imfile, which now supports wildcards inside filenames. There are also some other improvements, as well as some bugfixes that are not yet included in the stable versions (this will happen soon with the next release).

For more details about using wildcards in imfile, please take a look at this presentation:

Using Wildcards with rsyslog’s File Monitor

ChangeLog:

http://www.rsyslog.com/changelog-for-8-5-0-v8-devel/

Download:

http://www.rsyslog.com/download-v8-devel/

As always, feedback is appreciated.

Best regards,
Florian Riedl

Changelog for 8.5.0 (v8-devel)

Version 8.5.0 [v8-stable] 2014-10-24

  • imfile greatly refactored and support for wildcards added
  • PRI-handling code refactored for more clarity and robustness
  • ommail: add support for RainerScript config system [action() object]
    This finally adds support for the new config style. Also, we now permit to set a constant subject text without the need to create a template for it.
  • refactored the auto-backgrounding method
    The code is now more robust and also offers possibilities for enhanced error reporting in the future. This is also assumed to fix some races where a system startup script hang due to “hanging” rsyslogd.
  • make gntls tcp syslog driver emit more error messages
    Messages previously emitted only to the debug log are now emitted as syslog error messages. It has shown that they contain information  helpful to the user for troubleshooting config issues. Note that this change is a bit experimental, as we are not sure if there are situations where large amounts of error messages may be emitted.
  • bugfix: imfile did not complain if configured file did not exist
    closes https://github.com/rsyslog/rsyslog/issues/137
  • bugfix: build failure on systems which don’t have json_tokener_errors
    Older versions of json-c need to use a different API (which don’t exists on newer versions, unfortunately…)
    Thanks to Thomas D. for reporting this problem.
  • imgssapi: log remote peer address in some error messages
    Thanks to Bodik for the patch.

RSyslog Windows Agent 2.4 Released

Adiscon is proud to announce the 2.4 release of RSyslog Windows Agent.

This is the maintenance release and contains mainly bugfixes.

Most notably, this version includes OpenSSL library 1.0.1j. This fixes all security issues from the OpenSSL Security Advisory (2014-10-15).

Detailed information can be found in the version history below.

Build-IDs: Service 2.4.120, Client 2.4.151

Features

  • Updated embedded OpenSSL library to 1.0.1j

Bugfixes

  • Fixed minor problem filtering in non-existent properties.
  • Fixed minor shutdown isssues in EventLog Monitor V2

 

Version 2.4 is a free download. Customers with existing 1.x keys can contact our Sales department for upgrade prices. If you have a valid Upgrade Insurance ID, you can request a free new key by sending your Upgrade Insurance ID to sales@adiscon.com. Please note that the download enables the free 30-day trial version if used without a key – so you can right now go ahead and evaluate it.

remote syslog PRI vulnerability – CVE: CVE-2014-3634

===============================

CVE: CVE-2014-3634

Status of this report
———————
FINAL

Reporter
——-
Rainer Gerhards, rsyslog project lead

Affected
——–
– rsyslog, most probably all versions (checked 5.8.6+)
– sysklogd (checked most recent versions)
– potentially others (see root cause)

Root Cause
———-
Note: rsyslogd was forked from sysklogd, and the root cause applies to
both. For simplicity, here I use sysklogd as this is the base code.

The system header file /usr/include/*/syslog.h contains the following definitions

#define    LOG_NFACILITIES    24    /* current number of facilities */
#define    LOG_FACMASK    0x03f8    /* mask to extract facility part */
/* facility of pri */
#define    LOG_FAC(p)    (((p) & LOG_FACMASK) >> 3)

[This is from Ubuntu 12.04LTS, but can be found similarly in most, if
not all, distributions].

The define LOG_NFACILITIES is used by sysklogd to size arrays for facility
processing. In sysklogd, an array for selector matching is using this. Rsyslog
has additional array. The macro LOG_FAC() is used to extract the facility from
a syslog PRI [RFC3164, RFC 5424]. Its result is used to address the arrays.
Unfortunately, the LOG_FACMASK permits PRI values up to 0x3f8 (1016 dec). This
translates to 128 facilities. Consequently, for PRI values above 191 the
LOG_NFACILITIES arrays are overrun.

Other applications may have similar problems, as LOG_NFACILITES “sounds” like
the max value that LOG_FAC() can return. It would probably make sense to
check why there is a difference between LOG_NFACILITES and LOG_FACMASK, and
if this really needs to stay. A proper fix would probably be to make LOG_FAC
return a valid (maybe special) facility if an invalid one is provided. This
is the route taken in rsyslog patches.

Effect in Practice
——————

General
~~~~~~~
Almost all distributions do ship rsyslog without remote reception by
default and almost all distros also put firewall rules into place that
prevent reception of syslog messages from remote hosts (even if rsyslog
would be listening). With these defaults, it is impossible to trigger
the vulnerability in v7 and v8. Older versions may still be vulnerable
if a malicious user writes to the local log socket.

Even when configured to receive remote message (on a central server),
it is good practice to protect such syslog servers to accept only
messages from trusted peers, e.g. within the relay chain. If setup in
such a way, a trusted peer must be compromised to send malfromed
messages. This further limits the magnitude of the vulnerability.

If, however, any system is permitted to send data unconditionally to
the syslogd, a remote attack is possible.

sysklogd
~~~~~~~~
Sysklogd is mildly affected. Having a quick look at the current git master
branch, the wrong action may be applied to messages with invalid facility.

A segfault seems unlikely, as the maximum misadressing is 104 bytes of the
f_pmask table, which is always within properly allocated memory (albeit to
wrong data items). This can lead to triggering invalid selector lines and
thus wrongly writing to files or wrongly forwarding to other hosts.

rsyslogd
~~~~~~~~
Rsyslogd experiences the same problem as sysklogd.

However, more severe effects can occur, BUT NOT WITH THE DEFAULT CONFIGURATION.
The most likely and thus important attack is a remote DoS. Some
of the additional tables are writable and can cause considerable misadressing.
This is especially true for versions 7 and 8. In those versions, remote code
injection may also be possible by a carefully crafted package. It sounds hard
to do, but it cannot be totally outruled [we did not check this in depth].

A segfault (and thus Dos) has the following preconditions:
– the rsyslog property “pri-text” must be used, either in
* templates
* conditional statements (RainerScript and property-based filters)
– the property must actually be accessed
With traditional selector lines, this depends on the facility causing
a misadressing that leads to reading a 1 from the misaccessed location.

When the preconditions are met, misadressing happens. The code uses a string
table and a table of string lengths. Depending on memory layout at time of
misadressing and depending on the actual invalid PRI value, the lookup to
the string table can lead to a much to long length, which is the used in
buffer copy calculations. High PRI values close to the max of 1016 potentially
cause most problems, but we have also seen segfaults with very low invalid
PRI values.

Note that, as usual in such situations, a segfault may not happen immediately.
Instad some data structures may be damaged (e.g. from the memory allocator)
which will later on result in a segfault.

In v5 and below, a segfault is very unlikely, as snprintf() is used to generate
the pri-text property. As such, no write overrun can happen (but still garbagge
be contained inside the property). A segfault could theoretically happen if the
name lookup table indices cause out-of-process misadressing. We could not manage
to produce a segfault with v5.

Versions 7.6.3 and 7.6.4 already have partial fixes for the issue and will not
be vulnerable to a segfault (but the mild other issues described).

All other versions 7 and 8 are vulnerable. Version 6 was not checked as it seems
no longer be used in practice (it was an interim version). No patch for version 6
will be provided.

Note that a segfault of rsyslog can cause message loss. There are multiple
scenarios for this, but likely ones are:

– reception via UDP, where all messages arriving during downtime are lost
– corruption of disk queue structures, which can lead to loss of all disk
queue contents (manual recovery is possible).

This list does not try to be complete. Note that disk queue corruption is likely
to occur in default settings, because the important queue information file (.qi)
is only written on successful shutdown. Without a valid .qi file, queue message
files cannot be processed.

How to Exploit
————–
A syslog message with an invalid PRI value needs to be sent. It is sufficient
to send just the PRI as in this example

“<201>”

Any message starting with “<PRI>” where PRI is an integer greater than 191
can trigger the problem. The maximum offset that can be generated is with
PRI equal to 1016, as this is the modulus used due to LOG_FACMASK.

Note that messages with
– PRI > 191  and
– PRI modulus 1016 <= 191
will not lead to misadressing but go into the wrong bin.

Messsages with
– PRI > 191
– PRI modulus 1016 > 191
will go into the wrong bin and lead to misadressing.

Severity
——–
Given the triggering scenarios, the fact that multiple changes must be made to
default system configurations and potential problems we classify the severity
of this vulnerability as

MEDIUM

Note that the probability of a successful attack is LOW. However, the risk of
message loss is HIGH in those rare instances where an attack is successful. As
mentioned above, it cannot totally be outruled that remote code injection is
possible using this vulnerability.

This vulnerability is at least not publicly know. Based on (no) bug reports, it
seems unlikely that it is being exploited, but that’s obviously hard to know for
sure.

Patches
——-
Patches are available for versions known to be in wide-spread use.

Version 8.4.1 is not vulnerable. Version 7.6.6, while no longer being project
supported received a patch and is also not vulnerable.

New patches for the article available http://www.rsyslog.com/remote-syslog-pri-vulnerability-cve-2014-3683/

rsyslog 8.4.1 (v8-stable) released

We have just released 8.4.1 of the v8-stable branch.

This is primarily a bug-fixing release, but provides one small enhancement, the so-called “bracketing mode” of impstats. It tells impstats to emit begin and end message before and after emitting stats.

Please note that this releases also fixes a potential remote DoS, which may happen for some (non-default) configurations. As such, users are highly encouraged to upgrade to this version.

ChangeLog:

http://www.rsyslog.com/changelog-for-8-4-1-v8-stable/

Download:

http://www.rsyslog.com/downloads/download-v8-stable/

As always, feedback is appreciated.

Best regards,
Florian Riedl

Changelog for 8.4.1 (v8-stable)

Version 8.4.1 [v8-stable] 2014-09-30

  • imudp: add for bracketing mode, which makes parsing stats easier
  • permit at-sign in variable names
    closes: https://github.com/rsyslog/rsyslog/issues/110
  • bugfix: fix syntax error in anon_cc_numbers.py script
    Thanks to github user anthcourtney for the patch.
    closes: https://github.com/rsyslog/rsyslog/issues/109
  • bugfix: ompgsql: don’t loose uncomitted data on retry
    Thanks to Jared Johnson and Axel Rau for the patch.
  • bugfix: imfile: if a state file for a different file name was set, that different file (name) was monitored instead of the configured one. Now, the state file is deleted and the correct file monitored.
    closes: https://github.com/rsyslog/rsyslog/issues/103
  • bugfix: omudpspoof: source port was invalid
    Thanks to Pavel Levshin for the patch
  • bugfix: build failure on systems which don’t have json_tokener_errors
    Older versions of json-c need to use a different API (which don’t exists on newer versions, unfortunately…)
    Thanks to Thomas D. for reporting this problem.
  • bugfix: omelasticsearch does not work with broken/changed ES 1.0+ API
    closes: https://github.com/rsyslog/rsyslog/issues/104
  • bugfix: mmanon did not properly anonymize IP addresses starting with ‘9’
    Thanks to defa-at-so36.net for reporting this problem.
    closes: http://bugzilla.adiscon.com/show_bug.cgi?id=529
  • bugfix: build problems on SuSe Linux
    Thanks Andreas Stieger for the patch
  • bugfix: omelasticsearch error file did not work correctly on ES 1.0+ due to a breaking change in the ElasticSearch API.
    see also: https://github.com/rsyslog/rsyslog/issues/104
  • bugfix: potential abort when a message with PRI > 191 was processed if the “pri-text” property was used in active templates, this could be abused to a remote denial of service from permitted senders
    see also: CVE-2014-3634
Scroll to top