RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1880436 - Replace GNUTLS_SHUT_RDWR by GNUTLS_SHUT_WR when ending TLS connections
Summary: Replace GNUTLS_SHUT_RDWR by GNUTLS_SHUT_WR when ending TLS connections
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-18 14:15 UTC by Renaud Métrich
Modified: 2023-12-15 19:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-12 10:26:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rsyslog librelp pull 220 0 None closed gnutls "bugfix": handle receives who break connection on close 2020-10-22 10:05:14 UTC
Github rsyslog rsyslog pull 4424 0 None closed Replace GNUTLS_SHUT_RDWR by GNUTLS_SHUT_WR when ending TLS connections 2020-10-22 10:05:14 UTC
Red Hat Knowledge Base (Solution) 5417021 0 None None None 2020-09-18 15:15:19 UTC

Description Renaud Métrich 2020-09-18 14:15:56 UTC
This bug was initially created as a copy of Bug #1880434

I am copying this bug because: 

Initially found on RHEL7

Description of problem:

Some TLS servers don't replay to graceful shutdown requests "for optimization".
This results in rsyslog's omfwd+gtls client to wait forever for a reply of the TLS server which never comes, due to shutting down the connection with gnutls_bye(GNUTLS_SHUT_RDWR).

Commands such as "systemctl restart rsyslog" just hang for 1m30 and rsyslogd gets killed upon timeout by systemd.

The hang can be reproduced at will when sending the logs to a Kiwi Syslog server, which apparently doesn't send the TLS reply upon connection termination request.

This is a request to backport PR https://github.com/rsyslog/rsyslog/pull/4424.


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

rsyslog-8


How reproducible:

Always with a Kiwi backend but I don't have this to test myself.


Steps to Reproduce:
1. Stop rsyslog

Actual results:

systemd kills rsyslogd after 1min30

Expected results:

no killing

Comment 2 Renaud Métrich 2020-09-18 14:18:05 UTC
A workaround is to tune rsyslog.service unit to let systemd kill it after 10 seconds instead of regular 1m30 timeout.

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# mkdir -p /etc/systemd/system/rsyslog.service.d
# cat > /etc/systemd/system/rsyslog.service.d/bz1880436.conf << EOF
[Service]
TimeoutStopSec=10s
EOF

# systemctl daemon-reload
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This cannot be considered as a Solution since the journal will contain error messages due to killing the unit.

Comment 3 Renaud Métrich 2020-09-28 15:59:41 UTC
Please also add PR https://github.com/rsyslog/librelp/pull/220 (for omrelp)


Note You need to log in before you can comment on or make changes to this bug.