2025-02-14 17:03:58 +00:00

136 lines
7.6 KiB
JSON

{
"id": "CVE-2024-57952",
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"published": "2025-02-12T14:15:31.540",
"lastModified": "2025-02-14T15:52:04.957",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"libfs: fix infinite directory reads for offset dir\"\n\nThe current directory offset allocator (based on mtree_alloc_cyclic)\nstores the next offset value to return in octx->next_offset. This\nmechanism typically returns values that increase monotonically over\ntime. Eventually, though, the newly allocated offset value wraps\nback to a low number (say, 2) which is smaller than other already-\nallocated offset values.\n\nYu Kuai <yukuai3@huawei.com> reports that, after commit 64a7ce76fb90\n(\"libfs: fix infinite directory reads for offset dir\"), if a\ndirectory's offset allocator wraps, existing entries are no longer\nvisible via readdir/getdents because offset_readdir() stops listing\nentries once an entry's offset is larger than octx->next_offset.\nThese entries vanish persistently -- they can be looked up, but will\nnever again appear in readdir(3) output.\n\nThe reason for this is that the commit treats directory offsets as\nmonotonically increasing integer values rather than opaque cookies,\nand introduces this comparison:\n\n\tif (dentry2offset(dentry) >= last_index) {\n\nOn 64-bit platforms, the directory offset value upper bound is\n2^63 - 1. Directory offsets will monotonically increase for millions\nof years without wrapping.\n\nOn 32-bit platforms, however, LONG_MAX is 2^31 - 1. The allocator\ncan wrap after only a few weeks (at worst).\n\nRevert commit 64a7ce76fb90 (\"libfs: fix infinite directory reads for\noffset dir\") to prepare for a fix that can work properly on 32-bit\nsystems and might apply to recent LTS kernels where shmem employs\nthe simple_offset mechanism."
},
{
"lang": "es",
"value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: Revertir \"libfs: fix infinite directory reads for offset dir\" El asignador de desplazamiento de directorio actual (basado en mtree_alloc_cyclic) almacena el siguiente valor de desplazamiento a devolver en octx-&gt;next_offset. Este mecanismo normalmente devuelve valores que aumentan mon\u00f3tonamente con el tiempo. Sin embargo, con el tiempo, el valor de desplazamiento recientemente asignado vuelve a un n\u00famero bajo (por ejemplo, 2) que es menor que otros valores de desplazamiento ya asignados. Yu Kuai informa que, despu\u00e9s del commit 64a7ce76fb90 (\"libfs: fix infinite directory reads for offset dir\"), si el asignador de desplazamiento de un directorio se cierra, las entradas existentes ya no son visibles a trav\u00e9s de readdir/getdents porque offset_readdir() deja de enumerar las entradas una vez que el desplazamiento de una entrada es mayor que octx-&gt;next_offset. Estas entradas desaparecen de forma persistente: se pueden buscar, pero nunca volver\u00e1n a aparecer en la salida de readdir(3). La raz\u00f3n para esto es que la confirmaci\u00f3n trata los desplazamientos de directorio como valores enteros que aumentan mon\u00f3tonamente en lugar de cookies opacas, e introduce esta comparaci\u00f3n: if (dentry2offset(dentry) &gt;= last_index) { En plataformas de 64 bits, el l\u00edmite superior del valor del desplazamiento de directorio es 2^63 - 1. Los desplazamientos de directorio aumentar\u00e1n mon\u00f3tonamente durante millones de a\u00f1os sin envolverse. Sin embargo, en plataformas de 32 bits, LONG_MAX es 2^31 - 1. El asignador puede envolverse despu\u00e9s de solo unas pocas semanas (en el peor de los casos). Revertir el commit 64a7ce76fb90 (\"libfs: arreglar lecturas de directorio infinitas para el desplazamiento dir\") para prepararse para una soluci\u00f3n que pueda funcionar correctamente en sistemas de 32 bits y podr\u00eda aplicarse a n\u00facleos LTS recientes donde shmem emplea el mecanismo simple_offset."
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "nvd@nist.gov",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"baseScore": 5.5,
"baseSeverity": "MEDIUM",
"attackVector": "LOCAL",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.8,
"impactScore": 3.6
}
]
},
"weaknesses": [
{
"source": "nvd@nist.gov",
"type": "Primary",
"description": [
{
"lang": "en",
"value": "NVD-CWE-noinfo"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.11",
"versionEndExcluding": "6.12.12",
"matchCriteriaId": "83A942FD-C5F9-457A-9D54-FBD80CCF0D53"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:-:*:*:*:*:*:*",
"matchCriteriaId": "5A3F9505-6B98-4269-8B81-127E55A1BF00"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*",
"matchCriteriaId": "62567B3C-6CEE-46D0-BC2E-B3717FBF7D13"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*",
"matchCriteriaId": "5A073481-106D-4B15-B4C7-FB0213B8E1D4"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*",
"matchCriteriaId": "DE491969-75AE-4A6B-9A58-8FC5AF98798F"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*",
"matchCriteriaId": "93C0660D-7FB8-4FBA-892A-B064BA71E49E"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*",
"matchCriteriaId": "034C36A6-C481-41F3-AE9A-D116E5BE6895"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*",
"matchCriteriaId": "8AF9DC49-2085-4FFB-A7E3-73DFAFECC7F2"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:6.13:rc7:*:*:*:*:*:*",
"matchCriteriaId": "5DFCDFB8-4FD0-465A-9076-D813D78FE51B"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/3f250b82040a72b0059ae00855a74d8570ad2147",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
]
},
{
"url": "https://git.kernel.org/stable/c/9e9e710f68bac49bd9b587823c077d06363440e0",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
]
},
{
"url": "https://git.kernel.org/stable/c/b662d858131da9a8a14e68661656989b14dbf113",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
]
}
]
}