CVE-2025-71074

In the Linux kernel, the following vulnerability has been resolved: functionfs: fix the open/removal races ffs_epfile_open() can race with removal, ending up with file->private_data pointing to freed object. There is a total count of opened files on functionfs (both ep0 and dynamic ones) and when it hits zero, dynamic files get removed. Unfortunately, that removal can happen while another thread is in ffs_epfile_open(), but has not incremented the count yet. In that case open will succeed, leaving us with UAF on any subsequent read() or write(). The root cause is that ffs->opened is misused; atomic_dec_and_test() vs. atomic_add_return() is not a good idea, when object remains visible all along. To untangle that * serialize openers on ffs->mutex (both for ep0 and for dynamic files) * have dynamic ones use atomic_inc_not_zero() and fail if we had zero ->opened; in that case the file we are opening is doomed. * have the inodes of dynamic files marked on removal (from the callback of simple_recursive_removal()) - clear ->i_private there. * have open of dynamic ones verify they hadn't been already removed, along with checking that state is FFS_ACTIVE.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.35:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*

History

17 Jun 2026, 10:03

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: functionfs: corregir las condiciones de carrera de apertura/eliminación ffs_epfile_open() puede entrar en condición de carrera con la eliminación, lo que resulta en que file->private_data apunte a un objeto liberado. Existe un recuento total de archivos abiertos en functionfs (tanto ep0 como los dinámicos) y cuando llega a cero, los archivos dinámicos se eliminan. Desafortunadamente, esa eliminación puede ocurrir mientras otro hilo está en ffs_epfile_open(), pero aún no ha incrementado el recuento. En ese caso, la apertura tendrá éxito, dejándonos con UAF en cualquier read() o write() posterior. La causa raíz es que ffs->opened se utiliza incorrectamente; atomic_dec_and_test() frente a atomic_add_return() no es una buena idea cuando el objeto permanece visible todo el tiempo. Para desenredar eso * serializar los abridores en ffs->mutex (tanto para ep0 como para archivos dinámicos) * hacer que los dinámicos usen atomic_inc_not_zero() y fallen si teníamos cero ->opened; en ese caso, el archivo que estamos abriendo está condenado. * hacer que los inodos de los archivos dinámicos se marquen al eliminarse (desde la devolución de llamada de simple_recursive_removal()) - borrar ->i_private allí. * hacer que la apertura de los dinámicos verifique que no hayan sido ya eliminados, junto con la comprobación de que el estado es FFS_ACTIVE.

25 Mar 2026, 19:03

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/e5bf5ee266633cb18fff6f98f0b7d59a62819eee - () https://git.kernel.org/stable/c/e5bf5ee266633cb18fff6f98f0b7d59a62819eee - Patch
CPE cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.35:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
First Time Linux
Linux linux Kernel
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 4.7
CWE CWE-362

23 Jan 2026, 11:15

Type Values Removed Values Added
References
  • {'url': 'https://git.kernel.org/stable/c/b49c766856fb5901490de577e046149ebf15e39d', 'source': '416baaa9-dc9f-4396-8d5f-8c081fb06d67'}

13 Jan 2026, 16:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-01-13 16:16

Updated : 2026-06-17 10:03


NVD link : CVE-2025-71074

Mitre link : CVE-2025-71074

CVE.ORG link : CVE-2025-71074


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-362

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