CVE-2024-57941

In the Linux kernel, the following vulnerability has been resolved: netfs: Fix the (non-)cancellation of copy when cache is temporarily disabled When the caching for a cookie is temporarily disabled (e.g. due to a DIO write on that file), future copying to the cache for that file is disabled until all fds open on that file are closed. However, if netfslib is using the deprecated PG_private_2 method (such as is currently used by ceph), and decides it wants to copy to the cache, netfs_advance_write() will just bail at the first check seeing that the cache stream is unavailable, and indicate that it dealt with all the content. This means that we have no subrequests to provide notifications to drive the state machine or even to pin the request and the request just gets discarded, leaving the folios with PG_private_2 set. Fix this by jumping directly to cancel the request if the cache is not available. That way, we don't remove mark3 from the folio_queue list and netfs_pgpriv2_cancel() will clean up the folios. This was found by running the generic/013 xfstest against ceph with an active cache and the "-o fsc" option passed to ceph. That would usually hang
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*

History

15 Oct 2025, 13:50

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: netfs: Arreglar la (no) cancelación de copia cuando el caché está deshabilitado temporalmente Cuando el almacenamiento en caché de una cookie está deshabilitado temporalmente (por ejemplo, debido a una escritura DIO en ese archivo), la copia futura al caché para ese archivo se deshabilita hasta que todos los fds abiertos en ese archivo se cierren. Sin embargo, si netfslib está usando el método PG_private_2 obsoleto (como el que usa actualmente ceph) y decide que quiere copiar al caché, netfs_advance_write() simplemente abandonará en la primera verificación al ver que el flujo de caché no está disponible e indicará que se ocupó de todo el contenido. Esto significa que no tenemos subsolicitudes para proporcionar notificaciones para controlar la máquina de estado o incluso para fijar la solicitud y la solicitud simplemente se descarta, dejando los folios con PG_private_2 establecido. Arregle esto saltando directamente para cancelar la solicitud si el caché no está disponible. De esa manera, no eliminamos mark3 de la lista folio_queue y netfs_pgpriv2_cancel() limpiará los folios. Esto se descubrió al ejecutar el xfstest genérico/013 contra ceph con un caché activo y la opción "-o fsc" pasada a ceph. Eso generalmente se bloqueaba
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CWE NVD-CWE-noinfo
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
References () https://git.kernel.org/stable/c/ba37bdfe59fb43e80dd79290340a21864ba4b61e - () https://git.kernel.org/stable/c/ba37bdfe59fb43e80dd79290340a21864ba4b61e - Patch
References () https://git.kernel.org/stable/c/d0327c824338cdccad058723a31d038ecd553409 - () https://git.kernel.org/stable/c/d0327c824338cdccad058723a31d038ecd553409 - Patch
First Time Linux
Linux linux Kernel

21 Jan 2025, 13:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-01-21 13:15

Updated : 2025-10-15 13:50


NVD link : CVE-2024-57941

Mitre link : CVE-2024-57941

CVE.ORG link : CVE-2024-57941


JSON object : View

Products Affected

linux

  • linux_kernel