MEDIUM 5.5

CVE-2026-52990: Linux Kernel fsnotify Reference Leak Causes System Hangs

A vulnerability in the Linux kernel's file notification system causes an inode reference leak when monitoring marks are added and removed concurrently. When a file system mark transitions from being actively tracked to not, the kernel fails to properly release the inode reference, eventually causing processes (like umount) to hang indefinitely. This is a timing-sensitive race condition that requires specific concurrent activity to trigger.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
Affected products
2 configuration(s)
Published / Modified
2026-06-24 / 2026-07-14

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: fsnotify: fix inode reference leak in fsnotify_recalc_mask() fsnotify_recalc_mask() fails to handle the return value of __fsnotify_recalc_mask(), which may return an inode pointer that needs to be released via fsnotify_drop_object() when the connector's HAS_IREF flag transitions from set to cleared. This manifests as a hung task with the following call trace: INFO: task umount:1234 blocked for more than 120 seconds. Call Trace: __schedule schedule fsnotify_sb_delete generic_shutdown_super kill_anon_super cleanup_mnt task_work_run do_exit do_group_exit The race window that triggers the iref leak: Thread A (adding mark) Thread B (removing mark) ────────────────────── ──────────────────────── fsnotify_add_mark_locked(): fsnotify_add_mark_list(): spin_lock(conn->lock) add mark_B(evictable) to list spin_unlock(conn->lock) return /* ---- gap: no lock held ---- */ fsnotify_detach_mark(mark_A): spin_lock(mark_A->lock) clear ATTACHED flag on mark_A spin_unlock(mark_A->lock) fsnotify_put_mark(mark_A) fsnotify_recalc_mask(): spin_lock(conn->lock) __fsnotify_recalc_mask(): /* mark_A skipped: ATTACHED cleared */ /* only mark_B(evictable) remains */ want_iref = false has_iref = true /* not yet cleared */ -> HAS_IREF transitions true -> false -> returns inode pointer spin_unlock(conn->lock) /* BUG: return value discarded! * iput() and fsnotify_put_sb_watched_objects() * are never called */ Fix this by deferring the transition true -> false of HAS_IREF flag from fsnotify_recalc_mask() (Thread A) to fsnotify_put_mark() (thread B).

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-52990 is a reference leak in fsnotify_recalc_mask() within the Linux kernel's file notification subsystem. The vulnerability occurs when __fsnotify_recalc_mask() detects a transition of the HAS_IREF flag from set to cleared but the calling function discards the returned inode pointer without invoking the required fsnotify_drop_object() cleanup. The race window exists between the time a mark is added (unlocked) and mask recalculation is performed. Thread B removes a mark while Thread A adds another concurrently; the connector's reference state changes, but Thread A's subsequent recalc_mask call returns a pointer that is never released, accumulating unreleased references. The fix defers the HAS_IREF transition from fsnotify_recalc_mask() to fsnotify_put_mark(), eliminating the gap where the return value can be lost.

Business impact

This vulnerability impacts availability on systems relying on fsnotify-based monitoring (audit, SELinux, fanotify users, and other inode watch mechanisms). Hung task conditions disrupt critical operations like unmounting file systems, potentially stalling deployments, container orchestration, and storage maintenance. Systems experiencing concurrent file system monitoring changes under load are at highest risk. The hung task can propagate through system shutdown sequences, complicating recovery.

Affected systems

All Linux kernel versions containing the fsnotify subsystem are affected. The vulnerability manifests when file notification monitoring marks are actively added and removed concurrently on the same inode or connector. Systems running container workloads, audit daemons, SELinux, or applications using fanotify are most likely to encounter the race condition. Verify the specific kernel version in your environment against the vendor's fixed versions.

Exploitability

This is not a remote or local privilege escalation vulnerability. Exploitability requires local unprivileged user context and relies on inducing specific concurrent mark operations, making it a reliability/availability defect rather than a security boundary bypass. However, local users can inadvertently trigger the condition through normal fsnotify operations (e.g., simultaneous audit rule changes or concurrent inode watch setup), causing denial of service without requiring root privilege or special tools.

Remediation

Apply a kernel update that includes the fsnotify reference leak fix. Verify against the vendor advisory for the corrected kernel version. The fix involves deferring the HAS_IREF flag transition from fsnotify_recalc_mask() to fsnotify_put_mark() to ensure the inode reference is properly released. Until patched, avoid rapid concurrent addition and removal of file notification marks on the same inode; batch or serialize monitoring setup operations if possible.

Patch guidance

Obtain and deploy the patched Linux kernel version from your distribution or vendor. The fix is upstream in the mainline kernel; check your Linux vendor's security advisory for the corresponding stable backport version. Standard kernel update procedures (apt, yum, zypper with reboot) apply. Verify the patch is included by checking kernel changelog or release notes before deployment.

Detection guidance

Monitor system logs for hung task warnings mentioning fsnotify_sb_delete or umount in the call stack. Check for processes blocked in __schedule() during fsnotify-related operations. Systems under high fsnotify load (many concurrent audit rules, SELinux policy changes, or fanotify watches) combined with file system unmount attempts are prime indicators. Kernel WARN logs detailing hung tasks lasting over 120 seconds are the canonical symptom.

Why prioritize this

Prioritize this patch for systems running production workloads with active file system monitoring (audit, SELinux, container environments). The CVSS score of 5.5 (Medium) reflects local availability impact without confidentiality or integrity loss. However, hung umount operations can cascade into broader system outages, particularly in orchestrated environments. The fix is straightforward and low-risk, making deployment scheduling straightforward.

Risk score, explained

CVSS 3.1 score 5.5 (Medium) with vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H reflects local-only attack surface, low attack complexity (race window is narrow but reliably triggerable under load), low privilege requirement, and high availability impact. No confidentiality or integrity loss. The score appropriately captures a reliability defect with local DoS potential that does not elevate privileges or expose data.

Frequently asked questions

Will this cause data loss or security boundary violations?

No. This vulnerability is purely an availability defect causing hung processes and potential system hangs during unmount. It does not leak sensitive data, bypass access controls, or corrupt file system state. Once the kernel is patched, all affected processes resume normally.

Which Linux distributions are affected?

All distributions shipping the Linux kernel are affected. However, the race condition requires concurrent fsnotify mark operations to trigger, so systems with low or no fsnotify activity (audit disabled, no SELinux, no fanotify apps) are less likely to encounter the issue in practice. Check your vendor's security advisory for the specific patched kernel version.

Do I need to reboot immediately?

Rebooting is required to deploy the patched kernel. Schedule the reboot during a maintenance window. Systems not experiencing hung tasks can defer patching until the next planned maintenance cycle, though production deployments with active audit or SELinux should prioritize it.

Can this be exploited remotely or from unprivileged code?

No. The vulnerability requires local user context to trigger fsnotify operations (adding/removing monitoring marks). Remote exploitation is not possible. However, any local user with permission to modify inode watches or trigger audit rule changes can inadvertently cause the condition.

This analysis is based on the published CVE record and upstream kernel fix description. Actual exploitation impact may vary by kernel version, configuration, and workload. Always verify patched versions against your Linux vendor's official security advisory before deployment. No exploit code is provided. For operational questions, consult your vendor's security guidance or the Linux kernel security team. Source: NVD (public-domain), retrieved 2026-07-31. Analysis generated by SEC.co (claude-haiku-4-5).