Skip to content

LDAPObject.search_ext: Memory errors when providing dictionary #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jkoeniger opened this issue Jan 7, 2024 · 0 comments
Open

LDAPObject.search_ext: Memory errors when providing dictionary #556

jkoeniger opened this issue Jan 7, 2024 · 0 comments

Comments

@jkoeniger
Copy link

Issue description:

When using LDAPObject.search_ext and passing iterables via the attrlist argument the call can fail with a segmentation fault or other types of memory errors.

Steps to reproduce:

With a locally running slapd:

import ldap
l = ldap.initialize("ldap://localhost")
l.simple_bind_s("cn=admin,dc=nodomain","admin")
l.search_s("o=My Organisation, c=AU", ldap.SCOPE_SUBTREE, "objectclass=*", attrlist={"1":2})

This may result in

Segmentation fault (core dumped)

or

free(): invalid pointer
Aborted (core dumped)

or another memory related program abortion.

Operating system:

Distributor ID:	Ubuntu
Description:	Ubuntu 23.04
Release:	23.04
Codename:	lunar

bookworm/sid

Python version:

Tested with 3.7, 3.10, 3.11

python-ldap version:

3.4.4 and latest (ac5d051)

See #555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant