CVE-2025-38691

In the Linux kernel, the following vulnerability has been resolved: pNFS: Fix uninited ptr deref in block/scsi layout The error occurs on the third attempt to encode extents. When function ext_tree_prepare_commit() reallocates a larger buffer to retry encoding extents, the "layoutupdate_pages" page array is initialized only after the retry loop. But ext_tree_free_commitdata() is called on every iteration and tries to put pages in the array, thus dereferencing uninitialized pointers. An additional problem is that there is no limit on the maximum possible buffer_size. When there are too many extents, the client may create a layoutcommit that is larger than the maximum possible RPC size accepted by the server. During testing, we observed two typical scenarios. First, one memory page for extents is enough when we work with small files, append data to the end of the file, or preallocate extents before writing. But when we fill a new large file without preallocating, the number of extents can be huge, and counting the number of written extents in ext_tree_encode_commit() does not help much. Since this number increases even more between unlocking and locking of ext_tree, the reallocated buffer may not be large enough again and again.
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:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

Configuration 2 (hide)

cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

History

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: pNFS: Corrección de desreferencia de puntero no inicializado en el diseño de bloque/scsi El error ocurre en el tercer intento de codificar extensiones. Cuando la función ext_tree_prepare_commit() reasigna un búfer más grande para reintentar la codificación de extensiones, el array de páginas 'layoutupdate_pages' se inicializa solo después del bucle de reintento. Pero ext_tree_free_commitdata() es llamada en cada iteración e intenta colocar páginas en el array, desreferenciando así punteros no inicializados. Un problema adicional es que no hay límite en el tamaño máximo posible de búfer. Cuando hay demasiadas extensiones, el cliente puede crear un layoutcommit que es más grande que el tamaño máximo posible de RPC aceptado por el servidor. Durante las pruebas, observamos dos escenarios típicos. Primero, una página de memoria para extensiones es suficiente cuando trabajamos con archivos pequeños, adjuntamos datos al final del archivo o preasignamos extensiones antes de escribir. Pero cuando llenamos un nuevo archivo grande sin preasignar, el número de extensiones puede ser enorme, y contar el número de extensiones escritas en ext_tree_encode_commit() no ayuda mucho. Dado que este número aumenta aún más entre el desbloqueo y el bloqueo de ext_tree, el búfer reasignado puede no ser lo suficientemente grande una y otra vez.

Information

Published : 2025-09-04 16:15

Updated : 2026-10-19 21:10


NVD link : CVE-2025-38691

Mitre link : CVE-2025-38691

CVE.ORG link : CVE-2025-38691


JSON object : View

Products Affected

debian

  • debian_linux

linux

  • linux_kernel
CWE
CWE-908

Use of Uninitialized Resource