Bug 15007 - replmd_process_linked_attribute() receives its arguments in the wrong order
Summary: replmd_process_linked_attribute() receives its arguments in the wrong order
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.11.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2022-03-11 01:03 UTC by Jo Sutton
Modified: 2023-10-02 22:54 UTC (History)
0 users

See Also:

patch for master (1.21 KB, patch)
2022-03-11 01:34 UTC, Jo Sutton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jo Sutton 2022-03-11 01:03:49 UTC
The parameters 'element_ctx' and 'old_el' are reversed.

This incorrect ordering was introduced in commit b9c5417b523c4c53cb275c12ec84bbc849705bec.
Comment 1 Jo Sutton 2022-03-11 01:34:41 UTC
Created attachment 17202 [details]
patch for master
Comment 2 Stefan Metzmacher 2022-03-15 21:04:21 UTC
Is this triggering a specific bug?
Comment 3 Jo Sutton 2022-03-15 21:15:02 UTC
I don't know, this is just something I noticed when looking at the code. But it seems like it could possibly cause some issues.
Comment 4 Andrew Bartlett 2022-04-14 03:02:42 UTC
Removing embargo.

If you look into it, you see that
	attrs[0] = attr->lDAPDisplayName;

so the two variables will be identical and if not then it will go boom in talloc looking for the talloc header, which is not a security issue.
Comment 5 Samba QA Contact 2022-05-02 20:14:11 UTC
This bug was referenced in samba master:

Comment 6 Jo Sutton 2023-10-02 22:54:03 UTC
This is fixed in all supported versions (Samba 4.17 and above).