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

ns-slapd crashes at startup if a backend has no suffix #5870

Closed
tbordaz opened this issue Jul 31, 2023 · 2 comments · Fixed by #5871
Closed

ns-slapd crashes at startup if a backend has no suffix #5870

tbordaz opened this issue Jul 31, 2023 · 2 comments · Fixed by #5871
Assignees
Labels
priority_high need urgent fix / highly valuable / easy to fix
Milestone

Comments

@tbordaz
Copy link
Contributor

tbordaz commented Jul 31, 2023

Issue Description
If a backend (nsBackendInstance) contains no nsslapd-suffix value then the server crash at startup when it tries to retrieve referral entries

#0  0x00007efda24bc58b in __strcmp_avx2 () 
#1  0x00007efda28f79bc in slapi_exist_referral (be=0x7efd9ebd78c0) 
#2  0x00007efd9e34deae in ldbm_instance_startall (li=0x7efda15abf00) 
#3  0x00007efd9e3792e3 in ldbm_back_start (pb=0x7efd9eb79f60) 
#4  0x00007efda2952093 in plugin_call_func (list=0x7efd9ea08000, operation=operation@entry=212, pb=0x7efd9eb79f60, call_one=call_one@entry=1)
#5  0x00007efda2953d20 in plugin_call_one (pb=, operation=212, list=) 
#6  plugin_dependency_startall (errmsg=, operation=212, plugin_list=0x0, argv=, argc=)
#7  plugin_startall (argc=argc@entry=5, argv=argv@entry=0x7ffdf6fb4d58, plugin_list=plugin_list@entry=0x0) 
#8  0x0000564f73b8c6a9 in main (argc=5, argv=0x7ffdf6fb4d58) 

ATM this bug is a corner case and was reproduced crafting dse.ldif.
It was introduced by fix #5598

Package Version and Platform:

  • It applies on 2.3 and main

Steps to Reproduce
ATM only crafting dse.ldif

Expected results
DS should not crash

@tbordaz tbordaz added the needs triage The issue will be triaged during scrum label Jul 31, 2023
@tbordaz tbordaz self-assigned this Jul 31, 2023
@tbordaz tbordaz added priority_high need urgent fix / highly valuable / easy to fix and removed needs triage The issue will be triaged during scrum labels Jul 31, 2023
@tbordaz tbordaz added this to the 2.3 milestone Jul 31, 2023
tbordaz added a commit to tbordaz/389-ds-base that referenced this issue Jul 31, 2023
Bug description:
	With $5598, the server checks at startup if it exists
	some referrals entries in the various backends/suffixes.
	If a backend has no defined suffix (not clear how it
	occurs except crafting dse.ldif) the checking
	triggers a sigsev

Fix description:
	Check it exists a suffix before using it

relates: 389ds#5870

Reviewed by:
@tbordaz
Copy link
Contributor Author

tbordaz commented Aug 7, 2023

469e9b8..afdcca1 main
837fad7..f08d15a 389-ds-base-2.3
de1271c..c98a1f0 389-ds-base-1.4.3

Note: original fix #5598 was not ported in 1.4.4, so this fix does not apply on 1.4.4

@tbordaz tbordaz modified the milestones: 2.3, 1.4.3 Aug 16, 2023
@jchapma
Copy link
Contributor

jchapma commented Jan 4, 2024

500e707..01191c2 389-ds-base-2.2 -> 389-ds-base-2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority_high need urgent fix / highly valuable / easy to fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants