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 1721425 - 389 should assert that filters conform to schema
Summary: 389 should assert that filters conform to schema
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.2
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-18 09:29 UTC by thierry bordaz
Modified: 2020-11-04 03:07 UTC (History)
10 users (show)

Fixed In Version: 389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766
Doc Type: Bug Fix
Doc Text:
Cause: Using search filters that contain attributes that do not exist in the servers schema. Consequence: These filter are invlaid and will almost always be unindexed. Fix: Log a message when this occurs, and also added a new config setting to control how the server handles these filters Result: An admin can be notified when a client is using invalid filters, and has the option to reject these filters.
Clone Of:
Environment:
Last Closed: 2020-11-04 03:07:13 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 3408 0 None None None 2020-09-13 22:20:11 UTC
Red Hat Product Errata RHEA-2020:4695 0 None None None 2020-11-04 03:07:30 UTC

Description thierry bordaz 2019-06-18 09:29:49 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/389-ds-base/issue/50349

#### Issue Description
389 Should assert that all attributes in a filter are present and valid in schema. If there are attributes in a filter that are not in schema, this can lead to DOS due to fall-back to un-indexed scans, and it also can mask and cover-up application and development issues with queries. For example, the referenced case was caused by IPA mistakenly searching an attribute that can never be satisfied by ACI/filter. 

This should optionally be allowed to be disabled, due to some sites that use things like extensibleObject that by nature, bypass and violate schema. 

https://pagure.io/389-ds-base/pull-request/50252#comment-85208

Comment 11 mreynolds 2020-06-22 22:22:47 UTC
1843567 is now post, moving this bug to MODIFIED

Comment 15 bsmejkal 2020-07-22 09:51:09 UTC
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.6.8, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-221.el8.x86_64-x86_64-with-redhat-8.3-Ootpa', 'Packages': {'pytest': '5.4.3', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.10.0', 'html': '2.1.1', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.8-4.module+el8.3.0+7193+dfd1e8ad
nss: 3.44.0-15.el8
nspr: 4.21.0-2.el8_0
openldap: 2.4.46-15.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini
plugins: metadata-1.10.0, html-2.1.1, libfaketime-0.1.2
collected 4 items                                                                                                                                                                                                 

dirsrvtests/tests/suites/filter/schema_validation_test.py::test_filter_validation_config PASSED                                                                                                             [ 25%]
dirsrvtests/tests/suites/filter/schema_validation_test.py::test_filter_validation_enabled PASSED                                                                                                            [ 50%]
dirsrvtests/tests/suites/filter/schema_validation_test.py::test_filter_validation_warn_safe PASSED                                                                                                          [ 75%]
dirsrvtests/tests/suites/filter/schema_validation_test.py::test_filter_validation_warn_unsafe PASSED                                                                                                        [100%]

=============================================================================================== 4 passed in 14.78s ===============================================================================================

Marking as VERIFIED.

Comment 18 errata-xmlrpc 2020-11-04 03:07:13 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 (389-ds:1.4 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/RHEA-2020:4695


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