From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FE3B3101BF for ; Wed, 24 Jun 2026 16:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782318833; cv=none; b=Me1qdFE4ZCTh/3TxX1ggueV0SvtqLt57zedlBdUm3B9MZrmpQHyt3BGhgTcjeY1HvStV001qpVon3fyHBcVia4dldBPKBOO6BV+wcI+v14YwZEiJxoOg4RueA/wZBdvolWz3E6Dm/BD3PmesHKqnKDWFRCBN6gRpO5WXDO68UK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782318833; c=relaxed/simple; bh=gUvoIt0C1yBFvb/AZyDDEpBof3Aa1XhzoqzgDClyIuA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=sNjM2lpmmaW69CyyxqXT/x7p3BpjmJAz3To4xSbijmh/uJhf/w+R+iEGcxd/vN8XUK5aIz3Rl0o4c1VgK1FXAcOgrT0x8+FTzEoEhI2HxAAzoaZ8qE5DXC7omIkEUiO0LYkoaBUS/o3VDNB0y9uGejRQ0UDokksnBeKdEScjwgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vc7BkOWT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vc7BkOWT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 949031F000E9; Wed, 24 Jun 2026 16:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782318832; bh=kOpx9jNhBhoNmzVGPA+4qT6RB09gahfyZRm2ll7qWWw=; h=From:To:Cc:Subject:Date:Reply-To; b=vc7BkOWTdmc/NpGy28rvTuezLzlZWB8bsho7YZUktBfk6dVd0AEojAT8XGTJyWLah ox8iHXVy9Yn2FYMjsZR7MkIc4mYX5cgbzuiQUpOJ1FUrEgnli6iHHdqITVu9IxbNYT 1BAYw4/EaqvpOgT3PozZY+M0+2T+a16fztH+zuY4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-52990: fsnotify: fix inode reference leak in fsnotify_recalc_mask() Date: Wed, 24 Jun 2026 17:30:14 +0100 Message-ID: <2026062444-CVE-2026-52990-41ab@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4398; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sOBoNB302jmmbsH+6TGSubAout0aKw/zXWHCLf7KxxE=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2rD/m/f018WNCRNihGf9Szb7fnfPW8Ef2AfslV7cnL Ump6Sr60hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATialgWLBL4+cE7g1H4pM0 tj6Ul18jkHLW4RTDgvm9Qs6Ky63/PdTo4rt2gJ9j2RSjfwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== 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). The Linux kernel CVE team has assigned CVE-2026-52990 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit c3638b5b13740fa31762d414bbce8b7a694e582a and fixed in 6.12.91 with commit 8c8afa6444e6bdc145d2bf2f3aeeca6da3e36b42 Issue introduced in 5.19 with commit c3638b5b13740fa31762d414bbce8b7a694e582a and fixed in 6.18.33 with commit b740cc86816bbc87902ae9db74cd21abde3c8d63 Issue introduced in 5.19 with commit c3638b5b13740fa31762d414bbce8b7a694e582a and fixed in 7.0.10 with commit 5c80289503da3658e3df80280598c68d181eadbd Issue introduced in 5.19 with commit c3638b5b13740fa31762d414bbce8b7a694e582a and fixed in 7.1 with commit 4aca914ac152f5d055ddcb36704d1e539ac08977 Issue introduced in 5.10.220 with commit ff34ebaa6f6dc1eebce6a8d6f12a1566f33d00fe Issue introduced in 5.15.154 with commit 4f145b67c075324b13d6ae7d5abb6e7a1dbac26d Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-52990 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/notify/mark.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/8c8afa6444e6bdc145d2bf2f3aeeca6da3e36b42 https://git.kernel.org/stable/c/b740cc86816bbc87902ae9db74cd21abde3c8d63 https://git.kernel.org/stable/c/5c80289503da3658e3df80280598c68d181eadbd https://git.kernel.org/stable/c/4aca914ac152f5d055ddcb36704d1e539ac08977