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

Closed
OzanCansel opened this issue Dec 25, 2023 · 0 comments
Closed

LDAP segmentation fault #12593

OzanCansel opened this issue Dec 25, 2023 · 0 comments

Comments

@OzanCansel
Copy link

I did this

curl --insecure --user ozanadmin@corp.sunnyvalley.io:Ozn.1234! ldap://172.16.43.167:389/DC=corp,DC=sunnyvalley,DC=io??sub?(|(userPrincipalName=ozanadmin@corp.sunnyvalley.io)(sAMAccountName=ozanadmin@corp.sunnyvalley.io))

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 172.16.43.167:389...
* Connected to 172.16.43.167 (172.16.43.167) port 389
* LDAP local: ldap://172.16.43.167:389/DC=corp,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)

core-dump-commit-9faeebca883b3d8a57ca291e4f1b80382e236b5a.zip

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
Development

Successfully merging a pull request may close this issue.

2 participants