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 8A6153EC829 for ; Fri, 25 Sep 2026 10:26:01 +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=1790331962; cv=none; b=e8CDPv+ER0oN8+pKgyVAOuXcafldbLp4aKQSbrg+P/yhw/c/BHAiy5V97E7F/Nn1n4z1EdptRS4F+1uDlC2qek/DEf+d0eNqSER4mHu0QnnnGNbSzQLaIApHXc8p4U1o/CQAHKIsS7HX4I2iNmlyM2yAdmpeOfKD/fpg2lhgkSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790331962; c=relaxed/simple; bh=p+s1p41hgFTggivFRoFHGDsirY20sv0oDxSP4fe8SeI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p/vuPhql0/wM2KVqoBqdCVXP27RSnh584a7i34rIhkAOqHvMe3IBuY4+YIYjh0UvZx1H4Qs+kGnLTdB4ptR2Krfyoa4EGlsIg4JoHWzNG70jtLWSx+ElbFvDOUoY0PFc7L7fPQM8cYJn+vXw2QBqjh8HicUbCj5Ao2Wbn+pIWOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xtZSDtX9; 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="xtZSDtX9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC4701F000FF; Fri, 25 Sep 2026 10:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790331961; bh=XcdJeN+uSeEOb9Mo59SJhAi6x0MV7M12Jl196wH0RPI=; h=From:To:Cc:Subject:Date:Reply-To; b=xtZSDtX9YnKUXVbCDvO+oAjPcT/pxlo2USTfwNlcKfcu/XlSFZZUrsjVeOGsYAGk+ 3Ma+fVbMO94kxHLiCIi+SLLQvNjAJtmJYWJLE+Y9ZWMILHXlX9vWfAULC7SzTEL4uD EwNSj0WuksBNQRBZeajf3fGjjAhgwEUCyjJ7Ef7E= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97594: landlock: Fix use-after-free of the source's parent directory Date: Fri, 25 Sep 2026 12:22:54 +0200 Message-ID: <2026092559-CVE-2026-97594-e0cf@gregkh> X-Mailer: git-send-email 2.55.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=3674; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WWvdeMimjd1kgmTnYdTXkFcIRmdL73qZdhu4F8mryaw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvN2jfr2RYVt2LfTE9Y/y804kmPKFZXtF7pXduL28Q 00n6e+HjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIUyeGeQbLlgZ3Rz0JiFut /OlZI8szu1PK/xgW9Pmtc6ztdNRoNWEyjD+mwaaraNcIAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: landlock: Fix use-after-free of the source's parent directory current_check_refer_path() reads old_dentry->d_parent without holding a reference nor a lock on it, and then dereferences it in collect_domain_accesses() and in the audit record. A reference on a child does not pin its parent: __d_move() reassigns dentry->d_parent and drops the reference the child held on its former parent. hook_path_rename() is not affected because the rename path calls lock_rename() before the hook, so the source cannot be reparented under it. hook_path_link() has no such protection: filename_linkat() holds a reference on the source dentry but neither locks nor references its parent, so a concurrent rename(2) can reparent the source while security_path_link() runs, and the former parent can then be removed and freed while the hook walks it. A process can trigger this after entering a Landlock domain that handles at least one filesystem access right. The process can then race a linkat(2) loop against rename(2) and rmdir(2): BUG: KASAN: slab-use-after-free in collect_domain_accesses+0x278/0x290 Read of size 4 at addr ffff888160bd53f4 by task llrepro2/549 collect_domain_accesses+0x278/0x290 current_check_refer_path+0x952/0x1120 security_path_link+0x1be/0x320 filename_linkat+0x342/0x6d0 __x64_sys_linkat+0xfa/0x150 Freed by task 562: kmem_cache_free+0x139/0x4c0 i_callback+0x4b/0x80 rcu_core+0x7dc/0x10a0 Take a reference on the dentry selected as the source parent, using dget() for the common-mount-root case and dget_parent() otherwise. Release it after the hierarchy walk and synchronous audit logging. [mic: Clarify the caller, reachability, and reference handling] The Linux kernel CVE team has assigned CVE-2026-97594 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit b91c3e4ea756b12b7d992529226edce1cfd854d7 and fixed in 6.18.53 with commit 379efd2ce8b26fd35feb13ccc2f671ff105a5052 Issue introduced in 5.19 with commit b91c3e4ea756b12b7d992529226edce1cfd854d7 and fixed in 7.2.7 with commit ba29c46ccfe3ebadfb8aa18149186c49f84b14f8 Issue introduced in 5.19 with commit b91c3e4ea756b12b7d992529226edce1cfd854d7 and fixed in 7.3-rc3 with commit 2c6dc792538260a8087ac5b22c31b3b8e47c85d6 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-97594 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: security/landlock/fs.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/379efd2ce8b26fd35feb13ccc2f671ff105a5052 https://git.kernel.org/stable/c/ba29c46ccfe3ebadfb8aa18149186c49f84b14f8 https://git.kernel.org/stable/c/2c6dc792538260a8087ac5b22c31b3b8e47c85d6