https://bugs.openldap.org/show_bug.cgi?id=9212
Bug ID: 9212 Summary: [2.5] entry_schema_check can leave text uninitialized Product: OpenLDAP Version: 2.5 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: ryan@openldap.org Target Milestone: ---
76df74dbeab47195e42946a474c3a5f8557c168d removed some important snprintfs in schema_check.c. Now we can get uninitialized data in *text for these cases. For example:
$ ./clients/tools/ldapmodify -H ldap://:9000 -x -D cn=admin,dc=example,dc=com -w secret dn: cn=test,dc=example,dc=com changetype: add objectclass: device
adding new entry "cn=test,dc=example,dc=com"
dn: cn=test,dc=example,dc=com add: sn sn: test
modifying entry "cn=test,dc=example,dc=com" ldap_modify: Object class violation (65) additional info: |
$ ./clients/tools/ldapmodify -H ldap://:9000 -x -D cn=admin,dc=example,dc=com -w secret dn: cn=test,dc=example,dc=com add: sn sn: test
modifying entry "cn=test,dc=example,dc=com" ldap_modify: Object class violation (65) additional info:
^[[?1;2c $
https://bugs.openldap.org/show_bug.cgi?id=9212
--- Comment #1 from Ryan Tandy ryan@openldap.org --- Another one in back-meta/init.c (not as bad, the buffer is pre-initialized):
$ cat meta.ldif dn: olcDatabase={1}meta,cn=config objectClass: olcMetaConfig olcSuffix: dc=example,dc=com
dn: olcMetaSub=uri,olcDatabase={1}meta,cn=config objectClass: olcMetaTargetConfig olcDbURI: "ldap:///dc=example,dc=com" olcDbIDAssertAuthzFrom: * olcDbIDAssertBind: bindmethod=sasl flags=non-prescriptive
2.4:
$ ldapadd -H ldap://:9000 -x -D cn=root,cn=config -w secret -f meta.ldif adding new entry "olcDatabase={1}meta,cn=config"
adding new entry "olcMetaSub=uri,olcDatabase={1}meta,cn=config" ldap_add: Other (e.g., implementation specific) error (80) additional info: olcDbIDAssertBind: value #0: inconsistent idassert configuration (likely authz="*" used with "non-prescriptive" flag)
2.5:
$ ldapadd -H ldap://:9000 -x -D cn=root,cn=config -w secret -f meta.ldif adding new entry "olcDatabase={1}meta,cn=config"
adding new entry "olcMetaSub=uri,olcDatabase={1}meta,cn=config" ldap_add: Other (e.g., implementation specific) error (80) additional info: <olcDbIDAssertBind> failed startup
https://bugs.openldap.org/show_bug.cgi?id=9212
Ryan Tandy ryan@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |IN_PROGRESS Ever confirmed|0 |1
--- Comment #2 from Ryan Tandy ryan@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/32
https://bugs.openldap.org/show_bug.cgi?id=9212
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |TEST Status|IN_PROGRESS |RESOLVED Target Milestone|--- |2.5.0
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- Commits: • e1876446 by Ryan Tandy at 2020-04-13T18:57:50+00:00 ITS#9212 Restore snprintf to caller-provided buffer
76df74dbeab47195e42946a474c3a5f8557c168d removed some snprintfs to buffers that are actually returned to the client. Restore these.
https://bugs.openldap.org/show_bug.cgi?id=9212
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |FIXED Status|RESOLVED |VERIFIED