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 1067361 - Check IPA idranges before saving them to the cache
Summary: Check IPA idranges before saving them to the cache
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: Kaushik Banerjee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-20 10:32 UTC by Jakub Hrozek
Modified: 2020-05-02 17:38 UTC (History)
10 users (show)

Fixed In Version: sssd-1.11.2-47.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:51:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 3295 0 None None None 2020-05-02 17:38:31 UTC

Description Jakub Hrozek 2014-02-20 10:32:35 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2253

The IPA backend currently only checks the idranges on startup when reading them from the cache. If there are idranges with conflicts stored on the server the IPA backend will just put them into the cache without checking them which might lead to issues when SSSD is restarted and the idranges are checked.

Before saving the data from the server to the cache the idranges should be checked for collisions that same way as it is done during startup.

Comment 1 Namita Soman 2014-02-21 18:05:46 UTC
Please add steps to verify this

Comment 2 Jakub Hrozek 2014-02-26 14:18:27 UTC
Define two idranges that conflict (for example the range limits overlap) and then restart sssd. With the old version, the sssd would fail to start until you remove the cache, with the new version, the sssd should start, but in the logs you should see "Collision of ID ranges detected".

Comment 3 Jakub Hrozek 2014-02-26 14:21:03 UTC
Fixed upstream:
    master:
        096a9678919fae460342469989b97fd47d812823
        f69f3581658351003a6d9245045e41d0efb85022
        ff6e24f4474cca6226cd44c47ba2ec6ba6cf9a16 
    sssd-1-11:
        c9160931bd57b66bb1bf8312c05b9cb6da2497bc
        751a77c04f15e059dcca07f8fd72702db90fb83e
        b71e463bb8dca5aaca8e9677a92b679390c7b966

Comment 5 Steeve Goveas 2014-03-13 10:47:15 UTC
Verified in version
[root@dhcp207-218 ~]# rpm -q sssd
sssd-1.11.2-58.el7.x86_64

* Added a conflicting range

[root@dhcp207-218 ~]# ipa idrange-add test-range --base-id=123456 --rid-base=0 --range-size=10 --dom-sid=S-1-5-21-1910160501-511572375-3625658879
---------------------------
Added ID range "test-range"
---------------------------
  Range name: test-range
  First Posix ID of the range: 123456
  Number of IDs in the range: 10
  First RID of the corresponding RID range: 0
  Domain SID of the trusted domain: S-1-5-21-1910160501-511572375-3625658879
  Range type: Active Directory domain range

* Enabled sssd debugging

[root@dhcp207-218 ~]# grep -A1 debug /etc/sssd/sssd.conf
debug_level = 10
[sssd]

* Show conflicting ranges

[root@dhcp207-218 ~]# ipa idrange-find --dom-sid S-1-5-21-1910160501-511572375-3625658879
----------------
2 ranges matched
----------------
  Range name: ADTEST.QE_id_range
  First Posix ID of the range: 1148400000
  Number of IDs in the range: 200000
  First RID of the corresponding RID range: 0
  Domain SID of the trusted domain: S-1-5-21-1910160501-511572375-3625658879
  Range type: Active Directory domain range

  Range name: test-range
  First Posix ID of the range: 123456
  Number of IDs in the range: 10
  First RID of the corresponding RID range: 0
  Domain SID of the trusted domain: S-1-5-21-1910160501-511572375-3625658879
  Range type: Active Directory domain range
----------------------------
Number of entries returned 2
----------------------------

* No errors on restarting sssd

[root@dhcp207-218 ~]# systemctl restart sssd.service

[root@dhcp207-218 ~]# echo $?
0

* Collision between the 2 ranges found in logs

[root@dhcp207-218 ~]# grep -i collision /var/log/sssd/sssd_testrelm.test.log 
(Thu Mar 13 15:56:32 2014) [sssd[be[testrelm.test]]] [ipa_ranges_parse_results] (0x0020): Collision of ranges [test-range] and [ADTEST.QE_id_range] detected.
(Thu Mar 13 15:56:32 2014) [sssd[be[testrelm.test]]] [ipa_ranges_parse_results] (0x0020): Collision of ranges [test-range] and [ADTEST.QE_id_range] detected.
(Thu Mar 13 15:56:32 2014) [sssd[be[testrelm.test]]] [ipa_ranges_parse_results] (0x0020): Collision of ranges [test-range] and [ADTEST.QE_id_range] detected.
(Thu Mar 13 15:56:32 2014) [sssd[be[testrelm.test]]] [ipa_ranges_parse_results] (0x0020): Collision of ranges [test-range] and [ADTEST.QE_id_range] detected.
(Thu Mar 13 15:56:32 2014) [sssd[be[testrelm.test]]] [ipa_ranges_parse_results] (0x0020): Collision of ranges [test-range] and [ADTEST.QE_id_range] detected.

Comment 6 Ludek Smid 2014-06-13 12:51:52 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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