Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1828558

Summary: tangd exit code for random get request leaves tangd@.service in failed state
Product: Red Hat Enterprise Linux 8 Reporter: James Hartsock <hartsjc>
Component: tangAssignee: Sergio Correia <scorreia>
Status: CLOSED ERRATA QA Contact: Martin Zelený <mzeleny>
Severity: medium Docs Contact: Khushbu Borole <kborole>
Priority: high    
Version: 8.2CC: dapospis, jafiala, mzeleny, rsroka, scorreia
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tang-7-6.el8 Doc Type: Bug Fix
Doc Text:
.`tangd` now handles invalid requests correctly Previously, the `tangd` daemon returned an error exit code for some invalid requests. As a consequence, `tangd.socket@.service` failed, which in turn might have caused problems if the number of such failed units increased. With this update, `tangd` exits with an error code only when the `tangd` server itself is facing problems. As a result, `tangd` handles invalid requests correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 16:06:17 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 James Hartsock 2020-04-27 20:17:28 UTC
Description of problem:
tangd exit code for random get request causes tand.socket@.service to be left in failed state.  So when system is being scanned for vulnerabilities the system can end up having several thousands of these failed services.  These events at a minimum are noise and annoying to administrators.  But if these grow enough, sure can cause delays in systemd.

Version-Release number of selected component (if applicable):
  tang-7-5.el8 
  (also issue on RHEL 7)

How reproducible:
  VERY

Steps to Reproduce:
1. systemctl start tangd.socket
2. echo get / | nc localhost 80
3. systemctl --failed



Actual results:
===============
[root@rhel8-2 ~]# systemctl --failed
  UNIT                                         LOAD   ACTIVE SUB    DESCRIPTION                  
● tangd.0.1:80-127.0.0.1:57160.service loaded failed failed Tang Server (127.0.0.1:57160)

[root@rhel8-2 ~]# systemctl status tangd.0.1:80-127.0.0.1:57160.service 
● tangd.0.1:80-127.0.0.1:57160.service - Tang Server (127.0.0.1:57160)
   Loaded: loaded (/usr/lib/systemd/system/tangd@.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-04-27 15:06:01 CDT; 4min 34s ago
  Process: 48961 ExecStart=/usr/libexec/tangd /var/db/tang (code=exited, status=1/FAILURE)
 Main PID: 48961 (code=exited, status=1/FAILURE)

Apr 27 15:06:01 rhel8-2.localdomain systemd[1]: Started Tang Server (127.0.0.1:57160).
Apr 27 15:06:01 rhel8-2.localdomain systemd[1]: tangd.0.1:80-127.0.0.1:57160.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 15:06:01 rhel8-2.localdomain systemd[1]: tangd.0.1:80-127.0.0.1:57160.service: Failed with result 'exit-code'.



Expected results:
=================
[root@rhel8-2 ~]# systemctl --failed
0 loaded units listed. Pass --all to see loaded but inactive units, too.



Additional info:
================
While this single occurrence is just annoying, on an enterprise subnet that is regularly scanned for security vulnerabilities a system can easily have thousands of these failed entries.

Can of course replicate that easily with:
[root@rhel8-2 ~]# while true ; do echo get / | nc localhost 80 ; done
^C
[root@rhel8-2 ~]# systemctl --failed | grep -c tangd
1714

Comment 4 Sergio Correia 2020-12-07 11:09:03 UTC
PR: https://github.com/latchset/tang/pull/55

Comment 19 errata-xmlrpc 2021-05-18 16:06:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (tang bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1917