CVE-2026-89595: fsnotify: Fix stale object mask after concurrent mark updates

Published Sep 11, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

fsnotify: Fix stale object mask after concurrent mark updates

When a mark gets a new event bit, fanotify and inotify may avoid recalculating the object mask if the cached aggregate already contains that bit. This is racy with a recalculation triggered by a concurrent update to another mark on the same connector.

The concurrent scan can read the mark before the new bit is added, while the updater reads the old aggregate before that scan publishes its result. The updater then skips recalculation and the scan publishes a mask without the bit, leaving the object mask stale after both updates complete.

This can be reproduced with two fanotify groups watching the same inode: one thread removes FANMODIFY from one existing mark while another thread adds FANMODIFY to the other mark. After both fanotifymark() calls return, writes can fail to produce FANMODIFY for the group whose mark now contains the bit. This was reproduced on an unmodified v6.12.95 kernel. The equivalent inotify interleaving loses INMODIFY events.

For normal fanotify additions, recalculate whenever the raw mark mask changes. The normal mask is not cleared asynchronously, so an unchanged addition cannot introduce missing interest. Always recalculate ignore-mask updates because FSMODIFY handling may clear the ignore mask without taking mark->lock, making snapshot comparisons unreliable.

Always recalculate after updating an existing inotify watch. Its replace path temporarily sets mark->mask to zero, so a concurrent scan can observe zero even when the old and final masks are equal. Assigning the replacement mask directly would avoid the transient zero, but existing-watch updates are infrequent, so unconditional recalculation is simpler.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 11, 2026
CVE Published
via MITRE·07:44 PM
Data Sourced
via MITRE·07:44 PM
Description

Frequently Asked Questions

1

Who is affected by this race condition?

Systems using fanotify or inotify marks on the same inode can be affected when concurrent mark updates occur. The issue was reproduced with two fanotify groups, and an equivalent inotify interleaving can lose IN_MODIFY events.

2

What conditions are required to trigger it?

An attacker or workload needs to cause a specific concurrent update race: one mark removes a modification event bit while another mark adds that bit on the same connector. The updates must interleave so that object-mask recalculation observes stale state.

3

What is the practical impact?

After both mark-update calls complete, filesystem writes may not generate FAN_MODIFY events for a fanotify group whose mark includes that bit. In inotify, the equivalent race can cause IN_MODIFY events to be lost.

4

Is there evidence that an unmodified kernel configuration is affected?

Yes. The issue was reproduced on an unmodified v6.12.95 kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203