2025-03-09 03:03:50 +00:00

33 lines
3.6 KiB
JSON

{
"id": "CVE-2025-21777",
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"published": "2025-02-27T03:15:18.377",
"lastModified": "2025-02-27T03:15:18.377",
"vulnStatus": "Awaiting Analysis",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Validate the persistent meta data subbuf array\n\nThe meta data for a mapped ring buffer contains an array of indexes of all\nthe subbuffers. The first entry is the reader page, and the rest of the\nentries lay out the order of the subbuffers in how the ring buffer link\nlist is to be created.\n\nThe validator currently makes sure that all the entries are within the\nrange of 0 and nr_subbufs. But it does not check if there are any\nduplicates.\n\nWhile working on the ring buffer, I corrupted this array, where I added\nduplicates. The validator did not catch it and created the ring buffer\nlink list on top of it. Luckily, the corruption was only that the reader\npage was also in the writer path and only presented corrupted data but did\nnot crash the kernel. But if there were duplicates in the writer side,\nthen it could corrupt the ring buffer link list and cause a crash.\n\nCreate a bitmask array with the size of the number of subbuffers. Then\nclear it. When walking through the subbuf array checking to see if the\nentries are within the range, test if its bit is already set in the\nsubbuf_mask. If it is, then there is duplicates and fail the validation.\nIf not, set the corresponding bit and continue."
},
{
"lang": "es",
"value": "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\u00fafer de anillo asignado contienen una matriz de \u00edndices de todos los subb\u00faferes. La primera entrada es la p\u00e1gina del lector y el resto de las entradas establecen el orden de los subb\u00faferes en c\u00f3mo se crear\u00e1 la lista de enlaces del b\u00fafer de anillo. El validador actualmente se asegura de que todas las entradas est\u00e9n dentro del rango de 0 y nr_subbufs. Pero no verifica si hay duplicados. Mientras trabajaba en el b\u00fafer de anillo, corromp\u00ed esta matriz, donde agregu\u00e9 duplicados. El validador no lo detect\u00f3 y cre\u00f3 la lista de enlaces del b\u00fafer de anillo encima. Afortunadamente, la corrupci\u00f3n fue solo que la p\u00e1gina del lector tambi\u00e9n estaba en la ruta del escritor y solo present\u00f3 datos corruptos pero no bloque\u00f3 el kernel. Pero si hab\u00eda duplicados en el lado del escritor, entonces podr\u00eda corromper la lista de enlaces del b\u00fafer de anillo y causar un bloqueo. Cree una matriz de m\u00e1scara de bits con el tama\u00f1o del n\u00famero de subb\u00faferes. Luego, b\u00f3rrelo. Al recorrer la matriz subbuf para verificar si las entradas est\u00e1n dentro del rango, verifique si su bit ya est\u00e1 configurado en subbuf_mask. Si es as\u00ed, entonces hay duplicados y falla la validaci\u00f3n. Si no es as\u00ed, configure el bit correspondiente y contin\u00fae."
}
],
"metrics": {},
"references": [
{
"url": "https://git.kernel.org/stable/c/0d547a6f5e8fad26ebc12f501d7d19fccdbad6bf",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/3ec743d558f111d8999aea24577ba66c65ee2eeb",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/f5b95f1fa2ef3a03f49eeec658ba97e721412b32",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
]
}