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 1150694 - Encoding of SearchResultEntry is missing tag
Summary: Encoding of SearchResultEntry is missing tag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-08 17:19 UTC by Noriko Hosoi
Modified: 2020-09-13 21:13 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.3.3.1-6.el7
Doc Type: Bug Fix
Doc Text:
Cause: The encoding of the PreReadControl,PostReadControl does not contain the tag (LDAP_RES_SEARCH_ENTRY = constructed+application). Consequence: The missing tag is a violation of LDAP (Lightweight Directory Access Protocol). Fix: Add the tag to the ber encoding. Result: The server does not violate the protocol.
Clone Of:
Environment:
Last Closed: 2015-03-05 09:36:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1251 0 None None None 2020-09-13 21:13:09 UTC
Red Hat Product Errata RHSA-2015:0416 0 normal SHIPPED_LIVE Important: 389-ds-base security, bug fix, and enhancement update 2015-03-05 14:26:33 UTC

Description Noriko Hosoi 2014-10-08 17:19:37 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47920

ldap/servers/slapd/result.c:2179 contains this:
ber_printf( ber, "{s{", slapi_entry_get_dn_const(e) );

However, the actual structure is:
SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
  objectName      LDAPDN,
  attributes      PartialAttributeList
}

Notice that the Application 4 tag is missing.

Comment 1 Sankar Ramalingam 2014-10-09 02:44:36 UTC
Please add verification steps

Comment 2 Noriko Hosoi 2014-10-09 03:04:21 UTC
Hi Thierry, 
Could there be an isolated reproducer for this issue?
If yes, could you share with us?

Comment 3 thierry bordaz 2014-10-09 07:55:39 UTC
Hello Noriko,

In the ticket I provided a test case https://fedorahosted.org/389/attachment/ticket/47920/ticket47920_test.py.

By isolated reproducer do you mean a test case integrated into the CI tests ?

thanks
thierry

Comment 4 Noriko Hosoi 2014-10-09 15:59:07 UTC
(In reply to thierry bordaz from comment #3)
> Hello Noriko,
> 
> In the ticket I provided a test case
> https://fedorahosted.org/389/attachment/ticket/47920/ticket47920_test.py.
> 
> By isolated reproducer do you mean a test case integrated into the CI tests ?
> 
> thanks
> thierry

Cool!  (Sorry, Thierry.  I should have remembered you added the test case... :p)

That's perfect for the verification.  Thanks, Thierry!

Comment 8 Amita Sharma 2014-11-24 16:53:23 UTC
executed 
https://fedorahosted.org/389/attachment/ticket/47920/ticket47920_test.py

Result ::
[root@dhcp201-126 export]# python test.py
*** <ldap.ldapobject.SimpleLDAPObject instance at 0x7ffa47daba70> ldap://localhost:389/ - SimpleLDAPObject.set_option
((17, 3), {})
=> result:
None
*** <ldap.ldapobject.SimpleLDAPObject instance at 0x7ffa47daba70> ldap://localhost:389/ - SimpleLDAPObject.simple_bind
(('cn=directory manager', 'Secret123', None, None), {})
=> result:
1
*** <ldap.ldapobject.SimpleLDAPObject instance at 0x7ffa47daba70> ldap://localhost:389/ - SimpleLDAPObject.result4
((1, 1, -1, 0, 0, 0), {})
=> result:
(97, [], 1, [])
*** <ldap.ldapobject.SimpleLDAPObject instance at 0x7ffa47daba70> ldap://localhost:389/ - SimpleLDAPObject.add_ext
(('uid=foo,dc=example,dc=com',
  [('objectClass', ['account']),
   ('uid', ['foo']),
   ('description', ['original description'])],
  None,
  None),
 {})
=> result:
2
*** <ldap.ldapobject.SimpleLDAPObject instance at 0x7ffa47daba70> ldap://localhost:389/ - SimpleLDAPObject.modify_ext
(('uid=foo,dc=example,dc=com',
  [(2, 'description', 'new description')],
  [('1.3.6.1.1.13.2', True, '0\x12\x04\x03uid\x04\x0bdescription')],
  None),
 {})
=> result:
3
*** <ldap.ldapobject.SimpleLDAPObject instance at 0x7ffa47daba70> ldap://localhost:389/ - SimpleLDAPObject.result4
((3, 1, -1, 0, 0, 0), {})
=> result:
(103,
 [],
 3,
 [('1.3.6.1.1.13.2',
   0,
   'dM\x04\x19uid=foo,dc=example,dc=com000\x0c\x04\x03uid1\x05\x04\x03foo0 \x04\x0bdescription1\x11\x04\x0fnew description')])
resp_ctrls[0].dn: uid=foo,dc=example,dc=com
resp_ctrls[0].entry:
{'description': ['new description'], 'uid': ['foo']}

Hence marking as VERIFIED.

Comment 10 errata-xmlrpc 2015-03-05 09:36:09 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://rhn.redhat.com/errata/RHSA-2015-0416.html


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