Bug 13452 - subtree rename can fail due to index modification during the search
Summary: subtree rename can fail due to index modification during the search
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.8.2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
Depends on: 13483
Blocks: 13448
  Show dependency treegraph
Reported: 2018-05-28 01:16 UTC by Andrew Bartlett
Modified: 2018-07-08 19:42 UTC (History)
2 users (show)

See Also:

a possible patch (3.79 KB, patch)
2018-05-28 01:19 UTC, Andrew Bartlett
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2018-05-28 01:16:42 UTC
When the index is modified during a callback from a search, the search list being returned is not stable and can therefore miss entries.

The one-level index is a good example under subtree_rename, as entries are removed from the list as the search progresses.
Comment 1 Andrew Bartlett 2018-05-28 01:19:35 UTC
Created attachment 14217 [details]
a possible patch
Comment 2 Andrew Bartlett 2018-05-28 10:59:46 UTC
Posted with tests to the list here:

Comment 3 Andrew Bartlett 2018-07-08 19:42:17 UTC
Fixed in master with d02cd236dcbd8a44ecc85d1f7e95a48c95c0a479 for Samba 4.9 and ldb 1.4.0

Fixed in v4-8-test with 5c1d9b0b9acd5f4a1d2030f23829183cbbeb072d for Samba 4.8.3 and ldb.1.3.4.

A backport to 4.7 and below is possible.