CVE-2024-36001

In the Linux kernel, the following vulnerability has been resolved: netfs: Fix the pre-flush when appending to a file in writethrough mode In netfs_perform_write(), when the file is marked NETFS_ICTX_WRITETHROUGH or O_*SYNC or RWF_*SYNC was specified, write-through caching is performed on a buffered file. When setting up for write-through, we flush any conflicting writes in the region and wait for the write to complete, failing if there's a write error to return. The issue arises if we're writing at or above the EOF position because we skip the flush and - more importantly - the wait. This becomes a problem if there's a partial folio at the end of the file that is being written out and we want to make a write to it too. Both the already-running write and the write we start both want to clear the writeback mark, but whoever is second causes a warning looking something like: ------------[ cut here ]------------ R=00000012: folio 11 is not under writeback WARNING: CPU: 34 PID: 654 at fs/netfs/write_collect.c:105 ... CPU: 34 PID: 654 Comm: kworker/u386:27 Tainted: G S ... ... Workqueue: events_unbound netfs_write_collection_worker ... RIP: 0010:netfs_writeback_lookup_folio Fix this by making the flush-and-wait unconditional. It will do nothing if there are no folios in the pagecache and will return quickly if there are no folios in the region specified. Further, move the WBC attachment above the flush call as the flush is going to attach a WBC and detach it again if it is not present - and since we need one anyway we might as well share it.
Configurations

Configuration 1 (hide)

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

History

23 Sep 2025, 18:39

Type Values Removed Values Added
First Time Linux
Linux linux Kernel
References () https://git.kernel.org/stable/c/5eaf23b2e81349f6614f88396dc468fda89fc0b9 - () https://git.kernel.org/stable/c/5eaf23b2e81349f6614f88396dc468fda89fc0b9 - Patch
References () https://git.kernel.org/stable/c/c97f59e276d4e93480f29a70accbd0d7273cf3f5 - () https://git.kernel.org/stable/c/c97f59e276d4e93480f29a70accbd0d7273cf3f5 - Patch
CWE CWE-787
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8
CPE cpe:2.3:o:linux:linux_kernel:6.9:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:*

21 Nov 2024, 09:21

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: netfs: soluciona el lavado previo al agregar un archivo en modo de escritura directa. En netfs_perform_write(), cuando se especifica el archivo marcado como NETFS_ICTX_WRITETHROUGH o O_*SYNC o RWF_*SYNC, escriba -El almacenamiento en caché se realiza en un archivo almacenado en búfer. Al configurar la escritura directa, eliminamos cualquier escritura conflictiva en la región y esperamos a que se complete la escritura, fallando si hay un error de escritura que devolver. El problema surge si escribimos en la posición EOF o por encima de ella porque nos saltamos el color y, lo que es más importante, la espera. Esto se convierte en un problema si hay un folio parcial al final del archivo que se está escribiendo y queremos escribir en él también. Tanto la escritura que ya se está ejecutando como la escritura que comenzamos quieren borrar la marca de reescritura, pero quienquiera que esté en segundo lugar genera una advertencia similar a: ------------[cortar aquí]---- -------- R=00000012: el folio 11 no está bajo reescritura ADVERTENCIA: CPU: 34 PID: 654 en fs/netfs/write_collect.c:105 ... CPU: 34 PID: 654 Comm: kworker/u386 :27 Contaminado: GS... ... Cola de trabajo: events_unbound netfs_write_collection_worker... RIP: 0010:netfs_writeback_lookup_folio Solucione este problema haciendo que el lavado y la espera sean incondicionales. No hará nada si no hay publicaciones en el caché de páginas y regresará rápidamente si no hay publicaciones en la región especificada. Además, mueva el archivo adjunto de WBC por encima de la llamada de descarga, ya que la descarga conectará un WBC y lo separará nuevamente si no está presente, y dado que necesitamos uno de todos modos, también podríamos compartirlo.
References () https://git.kernel.org/stable/c/5eaf23b2e81349f6614f88396dc468fda89fc0b9 - () https://git.kernel.org/stable/c/5eaf23b2e81349f6614f88396dc468fda89fc0b9 -
References () https://git.kernel.org/stable/c/c97f59e276d4e93480f29a70accbd0d7273cf3f5 - () https://git.kernel.org/stable/c/c97f59e276d4e93480f29a70accbd0d7273cf3f5 -

20 May 2024, 13:00

Type Values Removed Values Added
New CVE

Information

Published : 2024-05-20 10:15

Updated : 2025-09-23 18:39


NVD link : CVE-2024-36001

Mitre link : CVE-2024-36001

CVE.ORG link : CVE-2024-36001


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-787

Out-of-bounds Write