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 1622168 - ipa-otpd: fix potential double-free and infinite loop in queue code
Summary: ipa-otpd: fix potential double-free and infinite loop in queue code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL: https://github.com/freeipa/freeipa/pu...
Whiteboard:
Depends On: 1622165
Blocks: 1508498 1624811
TreeView+ depends on / blocked
 
Reported: 2018-08-24 15:00 UTC by Robbie Harwood
Modified: 2021-12-10 17:14 UTC (History)
14 users (show)

Fixed In Version: ipa-4.6.4-8.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1622166
: 1624811 (view as bug list)
Environment:
Last Closed: 2018-10-30 11:00:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7566 0 None None None 2021-12-10 17:14:40 UTC
Red Hat Product Errata RHBA-2018:3187 0 None None None 2018-10-30 11:01:37 UTC

Description Robbie Harwood 2018-08-24 15:00:42 UTC
+++ This bug was initially created as a clone of Bug #1622165 +++

Upstream PR: https://github.com/freeipa/freeipa/pull/2283

The ipa-otpd code occasionally removes elements from one queue,
inspects and modifies them, and then inserts them into
another (possibly identical, possibly different) queue. When the next
pointer isn't cleared, this can result in element membership in both
queues, leading to double frees, or even self-referential elements,
causing infinite loops at traversal time.

Rather than eliminating the pattern, make it safe by clearing the next
field any time an element enters or exits a queue.

This is the crash spoore reported in 1508498.

Comment 7 Tibor Dudlák 2018-09-04 12:39:42 UTC
BZ marked as MODIFIED by mistake changing back to POST.

Comment 15 Scott Poore 2018-09-12 13:47:51 UTC
Verified.

Version ::

ipa-server-4.6.4-9.el7.x86_64


Results ::

STR job run on simple IPA Master-Replica-Client environment.

Run ID 	R-4849
Profile Name 	idm-76-otp-pos1
Run Name 	idm_bug_check_totp_7_lce-1
Tester 	spoore
State 	Complete Complete
Group 	idm
Start Date 	2018-09-11 18:12:13
Stop Date 	2018-09-12 06:12:13
Test Duration 	Days:0, Hrs:12, Mins:0, Secs:0
Lab Controller Engine 	LCE-1-10.8.48.121:8084

I did not see any crash reports during this run.  We were seeing crashes very frequently when we ran this test.

[root@qe-blade-04 log]# abrt-cli list
The Autoreporting feature is disabled. Please consider enabling it by issuing
'abrt-auto-reporting enabled' as a user with root privileges


[root@qe-blade-09 slapd-QE-STI-COM]# abrt-cli list
The Autoreporting feature is disabled. Please consider enabling it by issuing
'abrt-auto-reporting enabled' as a user with root privileges

Also, I adjusted the tests slightly to no longer throw failures when prompted for ldap password if the password was rejected.  As long as the prompt does not then allow login, I left it marked passed to simplify troubleshooting for this bug.  All cases of this that I investigated when this occurred were due to locked accounts which could be the result of the negative tests running too frequently.

Comment 17 errata-xmlrpc 2018-10-30 11:00:22 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, 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-2018:3187


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