If you have a DNA configuration to provide values for a given attribute, but do not specify the dnamagicregen attribute and value, and you attempt to add/modify that given attribute, the server will crash in _dna_pre_op_modify():
/* If we have a value, see if it's the magic value. */ if (bv) { len = strlen(config_entry->generate); if (len == bv->bv_len) { if (!slapi_UTF8NCASECMP(bv->bv_val, config_entry->generate, len)) { slapi_ch_array_add(&types_to_generate, slapi_ch_strdup(type)); } }
because the server does not first check if config_entry->generate is NULL before doing the strlen.
Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=875862
attachment 0001-Ticket-517-crash-in-DNA-if-no-dnaMagicRegen-is-speci.patch
master:
[mareynol@localhost ds]$ git merge ticket517 Updating 40e68b1..d978359 Fast-forward ldap/servers/plugins/dna/dna.c | 49 ++++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 27 deletions(-)
[mareynol@localhost ds]$ git push origin master Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.21 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 40e68b1..d978359 master -> master
1.2.11
git push origin 389-ds-base-1.2.11 Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.22 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git d4dbb3d..322c4ec 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
Metadata Update from @nkinder: - Issue assigned to mreynolds - Issue set to the milestone: 1.2.11.17
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/517
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.