Skip to content
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

LDAP segmentation fault #12593

OzanCansel opened this issue Dec 25, 2023 · 0 comments

LDAP segmentation fault #12593

OzanCansel opened this issue Dec 25, 2023 · 0 comments


Copy link

I did this

curl --insecure --user! ldap://,DC=sunnyvalley,DC=io??sub?(|(

When i run this command it crashes with segmentation fault.

  • Curl binary is built from master but it is same in 8.5.0. According to my findings, it is related with openldap.c. It doesn't happen with ldap.c. It doesn't happen when i use ldaps.

Console output at the segmentation fault.

*   Trying
* Connected to ( port 389
* LDAP local: ldap://,DC=sunnyvalley,DC=io

Why does it crash ?

At this line li->send is NULL so it gives segmentation fault.

Core file with binary (ubuntu 22.04) (commit: 9faeebc)

I expected the following

Working without crash. If it doesn't support ldap and ldaps in the same binary, it can give helpful message and exit gracefully.

curl/libcurl version

curl 8.6.0-DEV (Linux) libcurl/8.6.0-DEV OpenSSL/3.0.2 zlib/1.2.11 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) OpenLDAP/2.5.16
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets

operating system

Linux ozanc-dev 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging a pull request may close this issue.

2 participants