Failed async release can unlock under a later holder
Description
Impact
An async lock can lose mutual exclusion after executor submission raises during release. A thread pool may already have queued the release. If the application reuses the same lock instance, that release can run during a later hold and allow another process to enter. On Linux, a local account sharing the application’s process and thread quota could trigger the submission failure.
Affected version and mitigation
The confirmed affected release is filelock 4.2.12. Upgrade to 4.3.0 or later.
Async exclusive and reader/writer locks now cancel a queued backend call when submission fails, or settle its result if it already started. Isolate the application’s thread allowance from untrusted accounts. On an affected version, stop work that depends on the lock and restart the process after a submission failure. Fix in PR #986.
Credits
Reported in the filelock scan as ANT-2026-BZ7APGNK.