https://bugs.openldap.org/show_bug.cgi?id=9493
Issue ID: 9493 Summary: slapo-accesslog handling of deletion of multi-valued configuration attributes removes wrong value from list Product: OpenLDAP Version: 2.4.57 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: overlays Assignee: bugs@openldap.org Reporter: svella@technologist.com Target Milestone: ---
I observed this in the debugger while working on a small feature addition to slapo-accesslog.
log_cf_gen(), when handling the initial configuration of oldAccessLogOldAttr (accesslog.c:989), linked list li_oldattrs is being built by inserting each value in order at the head of the list, resulting in the list being in reverse order. But when handling LDAP_MOD_DELETE of same attribute (accesslog.c:989), it is using the index of the removed value (valx) to find and removed the entry in the linked list, but it's counting from the head of li_oldattrs and not the tail, resulting in the wrong item being removed from the list unless counting from the head or the tail happens find the same item.
(Line numbers refer to commit 6c469f07935e351e349bf38fc223dab704c51a76)
Handling of oldAccessLogBase appears to have the same problem, and a cursory glance through the source of other overlays reveals a similar pattern, and I'm guessing the same problem.
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs_review
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |replication
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Assignee|bugs@openldap.org |hyc@openldap.org Target Milestone|--- |2.5.4
https://bugs.openldap.org/show_bug.cgi?id=9493
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |CONFIRMED Ever confirmed|0 |1
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|replication |
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.5.4 |2.6.0 Assignee|hyc@openldap.org |bugs@openldap.org
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.6.0 |2.7.0
https://bugs.openldap.org/show_bug.cgi?id=9493
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- Also trying to delete the first value will crash the server. Fix is coming
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |IN_PROGRESS
--- Comment #2 from Ondřej Kuzník ondra@mistotebe.net --- https://git.openldap.org/openldap/openldap/-/merge_requests/455
https://bugs.openldap.org/show_bug.cgi?id=9493
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- (In reply to Ondřej Kuzník from comment #2)
https://git.openldap.org/openldap/openldap/-/merge_requests/455
This only seems to address accesslog, but the reporter noted it affects other overlays as well?
https://bugs.openldap.org/show_bug.cgi?id=9493
--- Comment #4 from Ondřej Kuzník ondra@mistotebe.net ---
This only seems to address accesslog, but the reporter noted it affects other overlays as well?
Yes, I might be opening bugs for the other as I go.
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9758
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9762
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9763
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9764
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9767
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9768
https://bugs.openldap.org/show_bug.cgi?id=9493
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9770
https://bugs.openldap.org/show_bug.cgi?id=9493
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |TEST Status|IN_PROGRESS |RESOLVED
--- Comment #5 from Quanah Gibson-Mount quanah@openldap.org --- • 42529005 by Ondřej Kuzník at 2021-12-13T17:01:22+00:00 ITS#9493 Accesslog cn=config fixes
• af2f8910 by Ondřej Kuzník at 2021-12-13T17:01:22+00:00 ITS#9493 Ensure we can process cn=config deletes
https://bugs.openldap.org/show_bug.cgi?id=9493
--- Comment #6 from Quanah Gibson-Mount quanah@openldap.org --- 1/2 of this goes into 2.6:
RE26:
• 42529005 by Ondřej Kuzník at 2021-12-13T17:01:22+00:00 ITS#9493 Accesslog cn=config fixes
https://bugs.openldap.org/show_bug.cgi?id=9493
--- Comment #7 from Quanah Gibson-Mount quanah@openldap.org --- Err, 2.6 commit is:
• 4ae0217f by Ondřej Kuzník at 2021-12-14T16:41:49+00:00 ITS#9493 Accesslog cn=config fixes