https://bugs.openldap.org/show_bug.cgi?id=9262
--- Comment #2 from Howard Chu hyc@openldap.org --- (In reply to edeity from comment #1)
We've encountered a similar segfault.
Program terminated with signal SIGSEGV, Segmentation fault. #0 ldap_chain_op (op=op@entry=0x7f32a812df70, rs=rs@entry=0x7f32bd14b9a0, op_f=0x56207ba8aa50 <ldap_back_search>, ref=ref@entry=0x0, depth=depth@entry=0) at chain.c:422 422 for ( ; !BER_BVISNULL( ref ); ref++ ) {
The segfault occurred because ref itself is NULL as you can see, and BER_BVISNULL checks for ref->by_val:
Should be fixed by 2346dfd2a04cbc84c69b76249a41af070c2991ad, please test.
From what I can see, this can only occur if you have an entry of objectclass referral, but it has no ref attribute. Since the ref attribute is required by the referral OC schema, this should never happen.