#51054 AddressSanitizer: heap-buffer-overflow in ldap_utf8prev
Closed: wontfix 3 years ago by mreynolds. Opened 3 years ago by mreynolds.

Issue Description

Description of problem:

=================================================================
==25779==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020004ab18f at pc 0x7fc94e717094 bp 0x7fc92c563b60 sp 0x7fc92c563b50
READ of size 1 at 0x6020004ab18f thread T14
    #0 0x7fc94e717093 in ldap_utf8prev (/usr/lib64/dirsrv/libslapd.so.0+0x243093)
    #1 0x7fc94e6fe6c2 in str2simple (/usr/lib64/dirsrv/libslapd.so.0+0x22a6c2)
    #2 0x7fc93fb00560 in __aclp__parse_aci ldap/servers/plugins/acl/aclparse.c:320
    #3 0x7fc93fb00560 in acl_parse ldap/servers/plugins/acl/aclparse.c:94
    #4 0x7fc93fb043ae in acl_verify_syntax ldap/servers/plugins/acl/aclparse.c:1763
    #5 0x7fc93fad46d4 in acl_check_mods ldap/servers/plugins/acl/acl.c:1568
    #6 0x7fc94e699612 in plugin_call_acl_mods_access (/usr/lib64/dirsrv/libslapd.so.0+0x1c5612)
    #7 0x7fc93c14983e in ldbm_back_modify ldap/servers/slapd/back-ldbm/ldbm_modify.c:616
    #8 0x7fc94e652cd9  (/usr/lib64/dirsrv/libslapd.so.0+0x17ecd9)
    #9 0x7fc94e656c8b in do_modify (/usr/lib64/dirsrv/libslapd.so.0+0x182c8b)
    #10 0x55ba957df916  (/usr/sbin/ns-slapd+0x45916)
    #11 0x7fc94be9c567  (/lib64/libnspr4.so+0x2b567)
    #12 0x7fc94b8372dd in start_thread (/lib64/libpthread.so.0+0x82dd)
    #13 0x7fc94b06b132 in __GI___clone (/lib64/libc.so.6+0xfc132)

0x6020004ab18f is located 1 bytes to the left of 3-byte region [0x6020004ab190,0x6020004ab193)
allocated by thread T14 here:
    #0 0x7fc94ec94d70 in strdup (/lib64/libasan.so.5+0x3bd70)
    #1 0x7fc94e5b078d in slapi_ch_strdup (/usr/lib64/dirsrv/libslapd.so.0+0xdc78d)
    #2 0x7fc93fb00544 in __aclp__parse_aci ldap/servers/plugins/acl/aclparse.c:318
    #3 0x7fc93fb00544 in acl_parse ldap/servers/plugins/acl/aclparse.c:94
    #4 0x7fc93fb043ae in acl_verify_syntax ldap/servers/plugins/acl/aclparse.c:1763
    #5 0x7fc93fad46d4 in acl_check_mods ldap/servers/plugins/acl/acl.c:1568
    #6 0x7fc94e699612 in plugin_call_acl_mods_access (/usr/lib64/dirsrv/libslapd.so.0+0x1c5612)
    #7 0x7fc93c14983e in ldbm_back_modify ldap/servers/slapd/back-ldbm/ldbm_modify.c:616
    #8 0x7fc94e652cd9  (/usr/lib64/dirsrv/libslapd.so.0+0x17ecd9)
    #9 0x7fc94e656c8b in do_modify (/usr/lib64/dirsrv/libslapd.so.0+0x182c8b)
    #10 0x55ba957df916  (/usr/sbin/ns-slapd+0x45916)
    #11 0x7fc94be9c567  (/lib64/libnspr4.so+0x2b567)

Thread T14 created by T0 here:
    #0 0x7fc94ecabe73 in __interceptor_pthread_create (/lib64/libasan.so.5+0x52e73)
    #1 0x7fc94be9c23e  (/lib64/libnspr4.so+0x2b23e)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib64/dirsrv/libslapd.so.0+0x243093) in ldap_utf8prev

Version-Release number of selected component (if applicable):
389-ds-base-1.4.1.3-7.module+el8.1.0+4150+5b8c2c1f.x86_64

Steps to Reproduce:

  1. Rebuild 389-ds-base with ASAN
  2. Run tests/suites/acl/syntax_test.py::test_aci_invalid_syntax_fail[test_Use_double_equal_instead_of_equal_in_the_targetfilter]

Metadata Update from @mreynolds:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1758478

3 years ago

Commit 13f8dc7 fixes this issue

b7c17bd..05749c0 389-ds-base-1.4.3 -> 389-ds-base-1.4.3

Metadata Update from @mreynolds:
- Issue close_status updated to: None (was: Fixed)

3 years ago

https://pagure.io/389-ds-base/pull-request/51062

Previous commit caused regressions - we can not be so strict on the quotations at this time.

Metadata Update from @mreynolds:
- Issue status updated to: Open (was: Closed)

3 years ago

Commit 916d13b relates to this ticket

Commit 916d13b relates to this ticket

d73cdd1..f2e9961 389-ds-base-1.4.3 -> 389-ds-base-1.4.3

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/4107

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests