Bug 1028461

Summary: TLS encryption depends on order of directives in the rsyslog.conf on the server
Product: Red Hat Enterprise Linux 6 Reporter: Tomas Babej <tbabej>
Component: rsyslogAssignee: Tomas Heinrich <theinric>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: mkosek, pspacek, pvrabec, tbabej
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-18 19:34:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Babej 2013-11-08 14:00:44 UTC
Description of problem:

When setting up TLS encryption as described in the budled documentation (also available in http://www.rsyslog.com/doc/tls_cert_server.html), the order of directives in the rsyslog.conf on the server is important.

The following order works (rsyslog.conf on the server):

$InputTCPServerStreamDriverAuthMode anon
$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
$InputTCPServerRun 6514 # start up listener at port 10514

The following order does not work (rsyslog.conf on the server):

$InputTCPServerRun 6514 # start up listener at port 10514
$InputTCPServerStreamDriverAuthMode anon
$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode


Version-Release number of selected component (if applicable):

Up 2 date version in the RHEL 6.4

How reproducible:

always

Steps to Reproduce:
1. Configure rsyslog on the server, restart
2. Configure rsyslog on the client, restart
3. send a message to the log on the client, e.g. logger -p crit "This is TLS message"

Actual results:

Server recieves encrypted information from the client. When the rsyslog service is restarted on the client, few new encrypted messages are recieved.

Expected results:

Server can decrypt encrypted messages from the client.

Additional info:

Experienced on the RH413 Server Hardening course.

Comment 2 Tomas Heinrich 2013-11-08 22:45:54 UTC
(In reply to Tomas Babej from comment #0)
> Description of problem:
> 
> When setting up TLS encryption as described in the budled documentation
> (also available in http://www.rsyslog.com/doc/tls_cert_server.html), the
> order of directives in the rsyslog.conf on the server is important.

Yes, the order of the directives matters.

To quote from the document you refer to:

"Important: Keep in mind that the order of configuration directives is very important in rsyslog. As such, the samples given below do only work if the given order is preserved."

Here's a config sample:

$InputTCPServerStreamDriverPermittedPeer *.foo.net
$InputTCPServerRun 10514
$InputTCPServerStreamDriverPermittedPeer *.bar.net
$InputTCPServerRun 20514

Each of the two listeners started here is only affected by the directives preceding it, thus the order is essential.
This syntax is clumsy but it stems from the old sysklogd format. There is is a newer syntax in rsyslog v6+ that is not yet available in rhel6.

> Expected results:
> 
> Server can decrypt encrypted messages from the client.

If it is correctly configured, the server can decrypt encrypted messages.
This looks like a not-a-bug.

Comment 3 RHEL Program Management 2013-11-11 23:07:21 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Red Hat Bugzilla 2023-09-14 01:53:21 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days