{"id":"CVE-2025-40362","aliases":["CVE-2025-40362"],"related":[],"kind":"vulnerability","state":"published","title":"ceph: fix multifs mds auth caps issue","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix multifs mds auth caps issue\n\nThe mds auth caps check should also validate the\nfsname along with the associated caps. Not doing\nso would result in applying the mds auth caps of\none fs on to the other fs in a multifs ceph cluster.\nThe bug causes multiple issues w.r.t user\nauthentication, following is one such example.\n\nSteps to Reproduce (on vstart cluster):\n1. Create two file systems in a cluster, say 'fsname1' and 'fsname2'\n2. Authorize read only permission to the user 'client.usr' on fs 'fsname1'\n    $ceph fs authorize fsname1 client.usr / r\n3. Authorize read and write permission to the same user 'client.usr' on fs 'fsname2'\n    $ceph fs authorize fsname2 client.usr / rw\n4. Update the keyring\n    $ceph auth get client.usr >> ./keyring\n\nWith above permssions for the user 'client.usr', following is the\nexpectation.\n  a. The 'client.usr' should be able to only read the contents\n     and not allowed to create or delete files on file system 'fsname1'.\n  b. The 'client.usr' should be able to read/write on file system 'fsname2'.\n\nBut, with this bug, the 'client.usr' is allowed to read/write on file\nsystem 'fsname1'. See below.\n\n5. Mount the file system 'fsname1' with the user 'client.usr'\n     $sudo bin/mount.ceph usr@.fsname1=/ /kmnt_fsname1_usr/\n6. Try creating a file on file system 'fsname1' with user 'client.usr'. This\n   should fail but passes with this bug.\n     $touch /kmnt_fsname1_usr/file1\n7. Mount the file system 'fsname1' with the user 'client.admin' and create a\n   file.\n     $sudo bin/mount.ceph admin@.fsname1=/ /kmnt_fsname1_admin\n     $echo \"data\" > /kmnt_fsname1_admin/admin_file1\n8. Try removing an existing file on file system 'fsname1' with the user\n   'client.usr'. This shoudn't succeed but succeeds with the bug.\n     $rm -f /kmnt_fsname1_usr/admin_file1\n\nFor more information, please take a look at the corresponding mds/fuse patch\nand tests added by looking into the tracker mentioned below.\n\nv2: Fix a possible null dereference in doutc\nv3: Don't store fsname from mdsmap, validate against\n    ceph_mount_options's fsname and use it\nv4: Code refactor, better warning message and\n    fix possible compiler warning\n\n[ Slava.Dubeyko: \"fsname check failed\" -> \"fsname mismatch\" ]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix multifs mds auth caps issue\n\nThe mds auth caps check should also validate the\nfsname along with the associated caps. Not doing\nso would result in applying the mds auth caps of\none fs on to the other fs in a multifs ceph cluster.\nThe bug causes multiple issues w.r.t user\nauthentication, following is one such example.\n\nSteps to Reproduce (on vstart cluster):\n1. Create two file systems in a cluster, say 'fsname1' and 'fsname2'\n2. Authorize read only permission to the user 'client.usr' on fs 'fsname1'\n    $ceph fs authorize fsname1 client.usr / r\n3. Authorize read and write permission to the same user 'client.usr' on fs 'fsname2'\n    $ceph fs authorize fsname2 client.usr / rw\n4. Update the keyring\n    $ceph auth get client.usr >> ./keyring\n\nWith above permssions for the user 'client.usr', following is the\nexpectation.\n  a. The 'client.usr' should be able to only read the contents\n     and not allowed to create or delete files on file system 'fsname1'.\n  b. The 'client.usr' should be able to read/write on file system 'fsname2'.\n\nBut, with this bug, the 'client.usr' is allowed to read/write on file\nsystem 'fsname1'. See below.\n\n5. Mount the file system 'fsname1' with the user 'client.usr'\n     $sudo bin/mount.ceph usr@.fsname1=/ /kmnt_fsname1_usr/\n6. Try creating a file on file system 'fsname1' with user 'client.usr'. This\n   should fail but passes with this bug.\n     $touch /kmnt_fsname1_usr/file1\n7. Mount the file system 'fsname1' with the user 'client.admin' and create a\n   file.\n     $sudo bin/mount.ceph admin@.fsname1=/ /kmnt_fsname1_admin\n     $echo \"data\" > /kmnt_fsname1_admin/admin_file1\n8. Try removing an existing file on file system 'fsname1' with the user\n   'client.usr'. This shoudn't succeed but succeeds with the bug.\n     $rm -f /kmnt_fsname1_usr/admin_file1\n\nFor more information, please take a look at the corresponding mds/fuse patch\nand tests added by looking into the tracker mentioned below.\n\nv2: Fix a possible null dereference in doutc\nv3: Don't store fsname from mdsmap, validate against\n    ceph_mount_options's fsname and use it\nv4: Code refactor, better warning message and\n    fix possible compiler warning\n\n[ Slava.Dubeyko: \"fsname check failed\" -> \"fsname mismatch\" ]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nceph: corrige problema de capacidades de autenticación mds multifs\n\nLa verificación de capacidades de autenticación mds también debería validar el fsname junto con las capacidades asociadas. No hacerlo resultaría en la aplicación de las capacidades de autenticación mds de un fs en el otro fs en un clúster ceph multifs. El error causa múltiples problemas con respecto a la autenticación de usuario, el siguiente es un ejemplo.\n\nPasos para Reproducir (en clúster vstart):\n1. Cree dos sistemas de archivos en un clúster, por ejemplo 'fsname1' y 'fsname2'\n2. Autorice permiso de solo lectura al usuario 'client.usr' en el fs 'fsname1'\n    $ceph fs authorize fsname1 client.usr / r\n3. Autorice permiso de lectura y escritura al mismo usuario 'client.usr' en el fs 'fsname2'\n    $ceph fs authorize fsname2 client.usr / rw\n4. Actualice el keyring\n    $ceph auth get client.usr >> ./keyring\n\nCon los permisos anteriores para el usuario 'client.usr', la siguiente es la expectativa.\n  a. El 'client.usr' debería poder solo leer los contenidos y no tener permitido crear o eliminar archivos en el sistema de archivos 'fsname1'.\n  b. El 'client.usr' debería poder leer/escribir en el sistema de archivos 'fsname2'.\n\nPero, con este error, al 'client.usr' se le permite leer/escribir en el sistema de archivos 'fsname1'. Vea a continuación.\n\n5. Monte el sistema de archivos 'fsname1' con el usuario 'client.usr'\n     $sudo bin/mount.ceph usr@.fsname1=/ /kmnt_fsname1_usr/\n6. Intente crear un archivo en el sistema de archivos 'fsname1' con el usuario 'client.usr'. Esto debería fallar pero pasa con este error.\n     $touch /kmnt_fsname1_usr/file1\n7. Monte el sistema de archivos 'fsname1' con el usuario 'client.admin' y cree un archivo.\n     $sudo bin/mount.ceph admin@.fsname1=/ /kmnt_fsname1_admin\n     $echo “data” > /kmnt_fsname1_admin/admin_file1\n8. Intente eliminar un archivo existente en el sistema de archivos 'fsname1' con el usuario 'client.usr'. Esto no debería tener éxito pero tiene éxito con el error.\n     $rm -f /kmnt_fsname1_usr/admin_file1\n\nPara más información, por favor, eche un vistazo al parche mds/fuse correspondiente y las pruebas añadidas consultando el rastreador mencionado a continuación.\n\nv2: Corrige una posible desreferencia nula en doutc\nv3: No almacene fsname de mdsmap, valide contra el fsname de ceph_mount_options y úselo\nv4: Refactorización de código, mejor mensaje de advertencia y corrige posible advertencia del compilador\n\n[ Slava.Dubeyko: 'fsname check failed'  ->  'fsname mismatch' ]","source":"nvd"}],"published":"2025-12-16T13:40:02.467Z","modified":"2026-10-15T22:19:09.207Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"596afb0b8933ba6ed7227adcc538db26feb25c74","fixed":"07640d34a781bb2e39020a39137073c03c4aa932","status":"affected"},{"type":"git","introduced":"596afb0b8933ba6ed7227adcc538db26feb25c74","fixed":"ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523","status":"affected"},{"type":"git","introduced":"596afb0b8933ba6ed7227adcc538db26feb25c74","fixed":"22c73d52a6d05c5a2053385c0d6cd9984732799d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.10","status":"unaffected"},{"type":"semver","introduced":"6.12.58","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.8","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/07640d34a781bb2e39020a39137073c03c4aa932","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ca3da8b27ab9a0923ad477447cfb8fc7f4b4c523","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/22c73d52a6d05c5a2053385c0d6cd9984732799d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:59:40.317Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40362","url":"https://www.cve.org/CVERecord?id=CVE-2025-40362","licence":"CVE Terms of Use","modified":"2026-10-15T22:02:46.619Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40362","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40362","licence":"Public domain","modified":"2026-10-15T22:19:09.207Z"}],"updatedAt":"2026-11-25T22:59:09.474Z","epss":{"score":0.00174,"percentile":0.07134,"date":"2026-12-01T12:00:22.000Z"}}