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 3BF2634CFD0 for ; Tue, 16 Dec 2025 13:41:04 +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=1765892466; cv=none; b=F+tIZiGJOPWNG4T4QgyM2tKCq5IY4mJhpB1vpP+qJ0crTvUXMg4xpbi4quxZitsJKZ9kXNizu1S4fUhpdio1cIDkMTIahqNL99I3qh2Mwzxl3igiII2Hkvh96cxfrgRzhliubifMSWHziQ9StZ3O4pr423Di8ZdXhhQ8vdu63Lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765892466; c=relaxed/simple; bh=TeAGFklRReuYfQ4TJwT6mUwKA/8pZR0d/vadKvpTBe0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZJz+sS22iL/sIHcrQIw5koIUkMvEFy5z2kmoGUCCnr6C9v6EF9aKeE7czRSzDQMwt9YKRO68Hdc0SKNJ7YlWb1T9B13CqZFuBWJjj8P3bR/2wOudcP8nTX5jUTFnYdlYiRZML0ji1015WiuhwdFgFKT9QjVDZ26dbKGg5mT+VI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZccZdwvY; 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="ZccZdwvY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CDD7C19422; Tue, 16 Dec 2025 13:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765892464; bh=TeAGFklRReuYfQ4TJwT6mUwKA/8pZR0d/vadKvpTBe0=; h=From:To:Cc:Subject:Date:Reply-To:From; b=ZccZdwvYlWBGnUQz7j2qAaiyPd0XQKe4QiCxR2XCuE9mWezJ8J+Z7NCjjo7Yj95af xwooCoVhaIB4NHNt67Dt2tchNTfa3c/k0ADOLx96pVx+7Pt7yOJepuoakL0L4fbyj0 /RhL7tYbE5aHYYrq5dm2mJRxvAhXkmo2+xQFA8cU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40362: ceph: fix multifs mds auth caps issue Date: Tue, 16 Dec 2025 14:40:48 +0100 Message-ID: <2025121645-CVE-2025-40362-c4d6@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=4017; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=K7bUGl1NKfFLLyva23/XBViepEhEKRxn8W5NQ0cqTzQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOibGeK+bnCeXaGHvMuqYSO3WDUtpijnUsro9lNy2d9 Ujn4PfcjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIViLDgktTf0zw+ulxqtBf +ZFz+ov8Z7719Qyz2V+5Oh7Vv7G+4GTgNl/nnJ76Rq29AA== 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: ceph: fix multifs mds auth caps issue The mds auth caps check should also validate the fsname along with the associated caps. Not doing so would result in applying the mds auth caps of one fs on to the other fs in a multifs ceph cluster. The bug causes multiple issues w.r.t user authentication, following is one such example. Steps to Reproduce (on vstart cluster): 1. Create two file systems in a cluster, say 'fsname1' and 'fsname2' 2. Authorize read only permission to the user 'client.usr' on fs 'fsname1' $ceph fs authorize fsname1 client.usr / r 3. Authorize read and write permission to the same user 'client.usr' on fs 'fsname2' $ceph fs authorize fsname2 client.usr / rw 4. Update the keyring $ceph auth get client.usr >> ./keyring With above permssions for the user 'client.usr', following is the expectation. a. The 'client.usr' should be able to only read the contents and not allowed to create or delete files on file system 'fsname1'. b. The 'client.usr' should be able to read/write on file system 'fsname2'. But, with this bug, the 'client.usr' is allowed to read/write on file system 'fsname1'. See below. 5. Mount the file system 'fsname1' with the user 'client.usr' $sudo bin/mount.ceph usr@.fsname1=/ /kmnt_fsname1_usr/ 6. Try creating a file on file system 'fsname1' with user 'client.usr'. This should fail but passes with this bug. $touch /kmnt_fsname1_usr/file1 7. Mount the file system 'fsname1' with the user 'client.admin' and create a file. $sudo bin/mount.ceph admin@.fsname1=/ /kmnt_fsname1_admin $echo "data" > /kmnt_fsname1_admin/admin_file1 8. Try removing an existing file on file system 'fsname1' with the user 'client.usr'. This shoudn't succeed but succeeds with the bug. $rm -f /kmnt_fsname1_usr/admin_file1 For more information, please take a look at the corresponding mds/fuse patch and tests added by looking into the tracker mentioned below. v2: Fix a possible null dereference in doutc v3: Don't store fsname from mdsmap, validate against ceph_mount_options's fsname and use it v4: Code refactor, better warning message and fix possible compiler warning [ Slava.Dubeyko: "fsname check failed" -> "fsname mismatch" ] The Linux kernel CVE team has assigned CVE-2025-40362 to this issue. Affected and fixed versions =========================== Fixed in 6.12.58 with commit 07640d34a781bb2e39020a39137073c03c4aa932 Fixed in 6.17.8 with commit ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523 Fixed in 6.18 with commit 22c73d52a6d05c5a2053385c0d6cd9984732799d 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-40362 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/ceph/mds_client.c fs/ceph/mdsmap.c fs/ceph/super.c fs/ceph/super.h 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/07640d34a781bb2e39020a39137073c03c4aa932 https://git.kernel.org/stable/c/ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523 https://git.kernel.org/stable/c/22c73d52a6d05c5a2053385c0d6cd9984732799d