CVE-2025-39927

In the Linux kernel, the following vulnerability has been resolved: ceph: fix race condition validating r_parent before applying state Add validation to ensure the cached parent directory inode matches the directory info in MDS replies. This prevents client-side race conditions where concurrent operations (e.g. rename) cause r_parent to become stale between request initiation and reply processing, which could lead to applying state changes to incorrect directory inodes. [ idryomov: folded a kerneldoc fixup and a follow-up fix from Alex to move CEPH_CAP_PIN reference when r_parent is updated: When the parent directory lock is not held, req->r_parent can become stale and is updated to point to the correct inode. However, the associated CEPH_CAP_PIN reference was not being adjusted. The CEPH_CAP_PIN is a reference on an inode that is tracked for accounting purposes. Moving this pin is important to keep the accounting balanced. When the pin was not moved from the old parent to the new one, it created two problems: The reference on the old, stale parent was never released, causing a reference leak. A reference for the new parent was never acquired, creating the risk of a reference underflow later in ceph_mdsc_release_request(). This patch corrects the logic by releasing the pin from the old parent and acquiring it for the new parent when r_parent is switched. This ensures reference accounting stays balanced. ]
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.34:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*

History

21 Oct 2026, 13:18

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/dc5aad078abc416dd3d555c50f5308c16ba918a7 -

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ceph: corregir condición de carrera al validar r_parent antes de aplicar el estado Añadir validación para asegurar que el inodo del directorio padre en caché coincide con la información del directorio en las respuestas de MDS. Esto previene condiciones de carrera del lado del cliente donde operaciones concurrentes (p. ej., renombrar) hacen que r_parent quede obsoleto entre el inicio de la solicitud y el procesamiento de la respuesta, lo que podría llevar a aplicar cambios de estado a inodos de directorio incorrectos. [ idryomov: incorporó una corrección de kerneldoc y una corrección de seguimiento de Alex para mover la referencia CEPH_CAP_PIN cuando r_parent se actualiza: Cuando el bloqueo del directorio padre no está retenido, req->r_parent puede quedar obsoleto y se actualiza para apuntar al inodo correcto. Sin embargo, la referencia CEPH_CAP_PIN asociada no se estaba ajustando. El CEPH_CAP_PIN es una referencia en un inodo que se rastrea con fines contables. Mover este pin es importante para mantener la contabilidad equilibrada. Cuando el pin no se movía del padre antiguo al nuevo, creaba dos problemas: La referencia en el padre antiguo y obsoleto nunca se liberaba, causando una fuga de referencias. Nunca se adquiría una referencia para el nuevo padre, creando el riesgo de un desbordamiento negativo de referencias más tarde en ceph_mdsc_release_request(). Este parche corrige la lógica liberando el pin del padre antiguo y adquiriéndolo para el nuevo padre cuando se cambia r_parent. Esto asegura que la contabilidad de referencias se mantenga equilibrada. ]

Information

Published : 2025-10-01 08:15

Updated : 2026-10-21 13:18


NVD link : CVE-2025-39927

Mitre link : CVE-2025-39927

CVE.ORG link : CVE-2025-39927


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-362

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')