Bug 7314 - registry: creation of sorted subkey record is racy (not atomic)
registry: creation of sorted subkey record is racy (not atomic)
Product: Samba 3.5
Classification: Unclassified
Component: File services
Other Linux
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2010-03-31 10:32 UTC by Michael Adam
Modified: 2010-03-31 11:03 UTC (History)
0 users

See Also:

Fix for 3.5.2 (1.84 KB, patch)
2010-03-31 10:34 UTC, Michael Adam
vl: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Adam 2010-03-31 10:32:24 UTC
Called, from key_exists, scan_sorted_subkeys re-creates the sorted
subkeys record of the given key and then searches through it.

The race is that between creation and parsing of the sorted subkey
record, another process that stores some other subkey of the same
parent key will delete the sorted subkey record, resulting in an
WERR_BADFILE of an operation that should actually succeed.
In a heavily contended situation this can lead to operations
that pretend to have failed although they actually succeeded.
Comment 1 Michael Adam 2010-03-31 10:34:25 UTC
Created attachment 5583 [details]
Fix for 3.5.2

This patch fixes the issue by wrapping the creation and parsing
into a transaction.
Comment 2 Karolin Seeger 2010-03-31 11:03:09 UTC
Pushed to v3-5-test.
Closing out bug report.