Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883401 - www-servers/nginx-1.23.2 crashes with USE=auth_ldap due to nginx changes
Summary: www-servers/nginx-1.23.2 crashes with USE=auth_ldap due to nginx changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: https://github.com/kvspb/nginx-auth-l...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-11-28 10:07 UTC by Dennis Lichtenthäler
Modified: 2022-12-03 00:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from the auth_ldap module's pull request (nginx-1.23.2-mod_auth_ldap-fix.patch,887 bytes, patch)
2022-11-28 10:08 UTC, Dennis Lichtenthäler
Details | Diff
Update the ebuild to use the module's patch (nginx-1.23.2-r2-ebuild.patch,746 bytes, patch)
2022-11-28 10:09 UTC, Dennis Lichtenthäler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Lichtenthäler 2022-11-28 10:07:11 UTC
nginx-1.23.2 includes a patch (http://hg.nginx.org/nginx/rev/711737177b77) that changes nginx's handling of auth headers. This appears to be incompatible with the latest nginx-auth-ldap module release and causes nginx worker processes to reproducibly crash.

Reproducible: Always

Steps to Reproduce:
1. Add auth_ldap USE flag to www-servers/nginx
2. Add the module configuration (the default config breaks as well: https://github.com/kvspb/nginx-auth-ldap)
3. Restart nginx and access it
Actual Results:  
Crashes with a sementation fault:
#0  ngx_http_core_access_phase (r=0x55d878090ec0, ph=0x55d878040d40) at src/http/ngx_http_core_module.c:1126

Expected Results:  
Shouldn't crash with a segmentation fault :-)

There's a patch in the auth_ldap module's github at https://github.com/kvspb/nginx-auth-ldap/pull/250/commits/f0a5f61d9aad59c23e2c877094a8f17c43bee5b5 which works in my environment. There's no activity in the pull request however, so perhaps we could add that patch here?

I'll attach it and an ebuild patch to actually use it.
Comment 1 Dennis Lichtenthäler 2022-11-28 10:08:13 UTC
Created attachment 837931 [details, diff]
Patch from the auth_ldap module's pull request
Comment 2 Dennis Lichtenthäler 2022-11-28 10:09:29 UTC
Created attachment 837933 [details, diff]
Update the ebuild to use the module's patch
Comment 3 Larry the Git Cow gentoo-dev 2022-12-03 00:07:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1542f080b666233bf679c899daec39fed3f0a4c

commit e1542f080b666233bf679c899daec39fed3f0a4c
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2022-12-02 23:57:48 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2022-12-02 23:57:48 +0000

    www-servers/nginx: fix ldap crash
    
    Closes: https://bugs.gentoo.org/883401
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../files/nginx-1.23.2-mod_auth_ldap-fix.patch      | 21 +++++++++++++++++++++
 ...ginx-1.23.2-r2.ebuild => nginx-1.23.2-r3.ebuild} |  6 ++++++
 2 files changed, 27 insertions(+)