CVE-2025-21777

In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Validate the persistent meta data subbuf array The meta data for a mapped ring buffer contains an array of indexes of all the subbuffers. The first entry is the reader page, and the rest of the entries lay out the order of the subbuffers in how the ring buffer link list is to be created. The validator currently makes sure that all the entries are within the range of 0 and nr_subbufs. But it does not check if there are any duplicates. While working on the ring buffer, I corrupted this array, where I added duplicates. The validator did not catch it and created the ring buffer link list on top of it. Luckily, the corruption was only that the reader page was also in the writer path and only presented corrupted data but did not crash the kernel. But if there were duplicates in the writer side, then it could corrupt the ring buffer link list and cause a crash. Create a bitmask array with the size of the number of subbuffers. Then clear it. When walking through the subbuf array checking to see if the entries are within the range, test if its bit is already set in the subbuf_mask. If it is, then there is duplicates and fail the validation. If not, set the corresponding bit and continue.
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:6.14:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*

History

28 Oct 2025, 20:36

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/0d547a6f5e8fad26ebc12f501d7d19fccdbad6bf - () https://git.kernel.org/stable/c/0d547a6f5e8fad26ebc12f501d7d19fccdbad6bf - Patch
References () https://git.kernel.org/stable/c/3ec743d558f111d8999aea24577ba66c65ee2eeb - () https://git.kernel.org/stable/c/3ec743d558f111d8999aea24577ba66c65ee2eeb - Patch
References () https://git.kernel.org/stable/c/f5b95f1fa2ef3a03f49eeec658ba97e721412b32 - () https://git.kernel.org/stable/c/f5b95f1fa2ef3a03f49eeec658ba97e721412b32 - Patch
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CPE cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*
CWE NVD-CWE-noinfo
First Time Linux linux Kernel
Linux
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ring-buffer: validar la matriz de subbuf de metadatos persistentes Los metadatos de un búfer de anillo asignado contienen una matriz de índices de todos los subbúferes. La primera entrada es la página del lector y el resto de las entradas establecen el orden de los subbúferes en cómo se creará la lista de enlaces del búfer de anillo. El validador actualmente se asegura de que todas las entradas estén dentro del rango de 0 y nr_subbufs. Pero no verifica si hay duplicados. Mientras trabajaba en el búfer de anillo, corrompí esta matriz, donde agregué duplicados. El validador no lo detectó y creó la lista de enlaces del búfer de anillo encima. Afortunadamente, la corrupción fue solo que la página del lector también estaba en la ruta del escritor y solo presentó datos corruptos pero no bloqueó el kernel. Pero si había duplicados en el lado del escritor, entonces podría corromper la lista de enlaces del búfer de anillo y causar un bloqueo. Cree una matriz de máscara de bits con el tamaño del número de subbúferes. Luego, bórrelo. Al recorrer la matriz subbuf para verificar si las entradas están dentro del rango, verifique si su bit ya está configurado en subbuf_mask. Si es así, entonces hay duplicados y falla la validación. Si no es así, configure el bit correspondiente y continúe.

27 Feb 2025, 03:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-02-27 03:15

Updated : 2025-10-28 20:36


NVD link : CVE-2025-21777

Mitre link : CVE-2025-21777

CVE.ORG link : CVE-2025-21777


JSON object : View

Products Affected

linux

  • linux_kernel