# CVE-2025-40362: ceph: fix multifs mds auth caps issue

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **Published:** 2025-12-16T13:40:02.467Z
- **Modified:** 2026-10-15T22:19:09.207Z

## Who should check

- Anyone running Linux \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< 07640d34a781bb2e39020a39137073c03c4aa932; \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523; \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< 22c73d52a6d05c5a2053385c0d6cd9984732799d
- Anyone running Linux 6.10

## 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" \]

## Affected and fixed versions

- Linux: \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< 07640d34a781bb2e39020a39137073c03c4aa932; \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523; \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< 22c73d52a6d05c5a2053385c0d6cd9984732799d (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- Upgrade Linux to 22c73d52a6d05c5a2053385c0d6cd9984732799d or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40362. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40362.md
Affected: Linux >= 596afb0b8933ba6ed7227adcc538db26feb25c74, < 07640d34a781bb2e39020a39137073c03c4aa932; >= 596afb0b8933ba6ed7227adcc538db26feb25c74, < ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523; >= 596afb0b8933ba6ed7227adcc538db26feb25c74, < 22c73d52a6d05c5a2053385c0d6cd9984732799d; Linux 6.10
Fixed in: Linux 07640d34a781bb2e39020a39137073c03c4aa932, Linux 22c73d52a6d05c5a2053385c0d6cd9984732799d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40362 being exploited?

There is no confirmed exploitation: CVE-2025-40362 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40362?

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-40362?

Linux \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< 07640d34a781bb2e39020a39137073c03c4aa932; \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523; \>= 596afb0b8933ba6ed7227adcc538db26feb25c74, \< 22c73d52a6d05c5a2053385c0d6cd9984732799d; Linux 6.10.

### Is there a fix for CVE-2025-40362?

Yes. Fixed in Linux 07640d34a781bb2e39020a39137073c03c4aa932, Linux 22c73d52a6d05c5a2053385c0d6cd9984732799d. Upgrade Linux to 22c73d52a6d05c5a2053385c0d6cd9984732799d or later.

### How do I check if I'm affected by CVE-2025-40362?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/07640d34a781bb2e39020a39137073c03c4aa932>
- other: <https://git.kernel.org/stable/c/ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523>
- other: <https://git.kernel.org/stable/c/22c73d52a6d05c5a2053385c0d6cd9984732799d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40362>

HTML: <https://flawdb.com/CVE-2025-40362> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40362>
