Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 54CE94C98 for ; Wed, 24 Dec 2025 12:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766578222; cv=none; b=CBMpWUO+uTdHyeCogKeQ346Dt1LlTseVsDFTMs8sZbR2jpyT5+kl8tPUquHjIF+QYXULq0I1iJzH2Q6I15PtDE+iubTGuurrtIe5CiS8JSgUfCvWzJLcsfwmXMGP2QoTjU9X7x30YxnggLlY+dSYrxgw0xshntVKu41TE3R2xos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766578222; c=relaxed/simple; bh=r1foGHyBkgSnt/GnSpwl6znpRyyFVcvwjDz7kSwlyzc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=moG8XiaoHPR4VrkI7gf71pHQ8vjbhuhfakzAeu4kO6jlSCyyvKFr2I1ouMR2PCrieKD3ML162OAw4Y6IgEM5hvidVMt1nQeeEDjIR5wE2yL4dvYvL6f5P5SFwd88iEkRcSiZF5zzQSn4lC72L3d5XFl3ECjhA6FkgzQp0Zx7QrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JY41eyOG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JY41eyOG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 578E9C4CEFB; Wed, 24 Dec 2025 12:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766578221; bh=r1foGHyBkgSnt/GnSpwl6znpRyyFVcvwjDz7kSwlyzc=; h=From:To:Cc:Subject:Date:Reply-To:From; b=JY41eyOGkX49kuD/Uio5FaPjkrf1/exvSvrCL0YNXCeqe1c8CgN9IlJp1FZz3TRGx MSJfHwTCdWM69nNjUjvlPKaR9PdWdNE7qBS3fBUKlPiuZUJdOpa9QsgZEBmA/AYwz8 fn7BolwGyyF5L34Z5OKm/S0WS3Pn7Yo3tWNofaG8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68736: landlock: Fix handling of disconnected directories Date: Wed, 24 Dec 2025 13:10:12 +0100 Message-ID: <2025122413-CVE-2025-68736-30ec@gregkh> X-Mailer: git-send-email 2.52.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=4277; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QPLP9wNn11xA2iYc29i7X+EG17ThqRJu4uFxCku8ZB0=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneN1Qdfvyfl5hqK7DoFuuiIxLt6q3zhF9o7hHocKjMt J6h88+5I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYiVsow3982t1SZ80NKhLe+ RqC7zlG9r3/TGRb0nXzmpay+I+tiy4X1CYLijEkrjk4FAA== 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 handling of disconnected directories Disconnected files or directories can appear when they are visible and opened from a bind mount, but have been renamed or moved from the source of the bind mount in a way that makes them inaccessible from the mount point (i.e. out of scope). Previously, access rights tied to files or directories opened through a disconnected directory were collected by walking the related hierarchy down to the root of the filesystem, without taking into account the mount point because it couldn't be found. This could lead to inconsistent access results, potential access right widening, and hard-to-debug renames, especially since such paths cannot be printed. For a sandboxed task to create a disconnected directory, it needs to have write access (i.e. FS_MAKE_REG, FS_REMOVE_FILE, and FS_REFER) to the underlying source of the bind mount, and read access to the related mount point. Because a sandboxed task cannot acquire more access rights than those defined by its Landlock domain, this could lead to inconsistent access rights due to missing permissions that should be inherited from the mount point hierarchy, while inheriting permissions from the filesystem hierarchy hidden by this mount point instead. Landlock now handles files and directories opened from disconnected directories by taking into account the filesystem hierarchy when the mount point is not found in the hierarchy walk, and also always taking into account the mount point from which these disconnected directories were opened. This ensures that a rename is not allowed if it would widen access rights [1]. The rationale is that, even if disconnected hierarchies might not be visible or accessible to a sandboxed task, relying on the collected access rights from them improves the guarantee that access rights will not be widened during a rename because of the access right comparison between the source and the destination (see LANDLOCK_ACCESS_FS_REFER). It may look like this would grant more access on disconnected files and directories, but the security policies are always enforced for all the evaluated hierarchies. This new behavior should be less surprising to users and safer from an access control perspective. Remove a wrong WARN_ON_ONCE() canary in collect_domain_accesses() and fix the related comment. Because opened files have their access rights stored in the related file security properties, there is no impact for disconnected or unlinked files. The Linux kernel CVE team has assigned CVE-2025-68736 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit cb2c7d1a1776057c9a1f48ed1250d85e94d4850d and fixed in 6.18.2 with commit cadb28f8b3fd6908e3051e86158c65c3a8e1c907 Issue introduced in 5.13 with commit cb2c7d1a1776057c9a1f48ed1250d85e94d4850d and fixed in 6.19-rc1 with commit 49c9e09d961025b22e61ef9ad56aa1c21b6ce2f1 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-2025-68736 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/errata/abi-1.h 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/cadb28f8b3fd6908e3051e86158c65c3a8e1c907 https://git.kernel.org/stable/c/49c9e09d961025b22e61ef9ad56aa1c21b6ce2f1