#1112254 apache2-bin: LDAP Basic auth working with bullseye but segfault when upgraded to bookworm

Package:
apache2-bin
Source:
apache2-bin
Description:
Apache HTTP Server (modules and other binary files)
Submitter:
Sebastien Koechlin
Date:
2025-08-28 13:15:02 UTC
Severity:
normal
#1112254#5
Date:
2025-08-27 21:01:56 UTC
From:
To:
Dear Maintainers,

During upgrade to bookworm, access to locations requising a basic auth using a local openldap server stop working.

openldap is running on the same host, access is done using ldap://localhost/ without TLS.

Configuration is:
	<Directory /a/b/www/restrictedsubdir/>
                # Auth LDAP
                AuthBasicProvider ldap
                AuthType Basic
                AuthName "Restricted access"
                AuthLDAPURL "ldap://localhost/ou=users,dc=xxx,dc=fr?cn?sub?(objectClass=person)" NONE
                AuthLDAPBindDN "cn=webserver,ou=system,dc=xxx,dc=fr"
                AuthLDAPBindPassword "xxxx"
                Require valid-user
        </Directory>

When upgraded, apache report (with LDAPLibraryDebug 7):

  ldap_simple_bind
  ldap_sasl_bind
  [Wed Aug 27 22:03:16.104849 2025] [core:notice] [pid 18603:tid 18603] AH00051: child pid 18624 exit signal
  Segmentation fault (11), possible coredump in /tmp

Nothing is traced in the accesslog nor in the LDAP server logs.

ldapsearch is working fine using the same credentials provided using AuthLDAPBindDN / AuthLDAPBindPassword

authentication using simple-ldap-login wordpress plugin (PHP8) is working fine too.

Other access without authentication, or using the file provider are fine.

Backtrace is:
Reading symbols from /usr/sbin/apache2...
(No debugging symbols found in /usr/sbin/apache2)
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 18609]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f675582ab86 in ldap_int_put_controls () from /lib/x86_64-linux-gnu/libldap_r-2.4.so.2
(gdb) bt
#0  0x00007f675582ab86 in ldap_int_put_controls () from /lib/x86_64-linux-gnu/libldap_r-2.4.so.2
#1  0x00007f675582ff35 in ldap_build_bind_req () from /lib/x86_64-linux-gnu/libldap_r-2.4.so.2
#2  0x00007f67558300f7 in ldap_sasl_bind () from /lib/x86_64-linux-gnu/libldap_r-2.4.so.2
#3  0x00007f6755830cf6 in ldap_simple_bind () from /lib/x86_64-linux-gnu/libldap_r-2.4.so.2
#4  0x00007f6754c8ff25 in ?? () from /usr/lib/apache2/modules/mod_ldap.so
#5  0x00007f6754c90228 in ?? () from /usr/lib/apache2/modules/mod_ldap.so
#6  0x00007f6754c938b7 in ?? () from /usr/lib/apache2/modules/mod_ldap.so
#7  0x00007f675588172b in ?? () from /usr/lib/apache2/modules/mod_authnz_ldap.so
#8  0x00007f675589bab2 in ?? () from /usr/lib/apache2/modules/mod_auth_basic.so
#9  0x000055e48edaa580 in ap_run_check_user_id ()
#10 0x000055e48edad228 in ap_process_request_internal ()
#11 0x000055e48edcf208 in ap_process_async_request ()
#12 0x000055e48edcf45e in ap_process_request ()
#13 0x000055e48edcb224 in ?? ()
#14 0x000055e48edbfd90 in ap_run_process_connection ()
#15 0x00007f6754c7cbbc in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#16 0x00007f6754c7cf26 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#17 0x00007f6754c7cf71 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#18 0x00007f6754c7d67f in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#19 0x000055e48ed958e0 in ap_run_mpm ()
#20 0x000055e48ed8d178 in main ()

Bug #578566 does not resolv the issue.

#1112254#10
Date:
2025-08-28 08:34:31 UTC
From:
To:
Your issue looks related to this bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109084

#1112254#15
Date:
2025-08-28 13:09:29 UTC
From:
To:
You are right, I did not notice that I have the Bullseye packages installed.

I "downgrade" to Bookworm and it resolve the issue.

2025-08-28 15:00:41 upgrade apache2:amd64 2.4.65-1~deb11u1 2.4.62-1~deb12u2
2025-08-28 15:00:43 upgrade apache2-bin:amd64 2.4.65-1~deb11u1 2.4.62-1~deb12u2
2025-08-28 15:00:43 upgrade apache2-data:all 2.4.65-1~deb11u1 2.4.62-1~deb12u2
2025-08-28 15:00:44 upgrade apache2-utils:amd64 2.4.65-1~deb11u1 2.4.62-1~deb12u2

Thanks a lot.