In the Linux kernel, the following vulnerability has been resolved: fs: ntfs3: fix infinite loop in attr_load_runs_range on inconsistent metadata We found an infinite loop bug in the ntfs3 file system that can lead to a Denial-of-Service (DoS) condition. A malformed NTFS image can cause an infinite loop when an attribute header indicates an empty run list, while directory entries reference it as containing actual data. In NTFS, setting evcn=-1 with svcn=0 is a valid way to represent an empty run list, and run_unpack() correctly handles this by checking if evcn + 1 equals svcn and returning early without parsing any run data. However, this creates a problem when there is metadata inconsistency, where the attribute header claims to be empty (evcn=-1) but the caller expects to read actual data. When run_unpack() immediately returns success upon seeing this condition, it leaves the runs_tree uninitialized with run->runs as a NULL. The calling function attr_load_runs_range() assumes that a successful return means that the runs were loaded and sets clen to 0, expecting the next run_lookup_entry() call to succeed. Because runs_tree remains uninitialized, run_lookup_entry() continues to fail, and the loop increments vcn by zero (vcn += 0), leading to an infinite loop. This patch adds a retry counter to detect when run_lookup_entry() fails consecutively after attr_load_runs_vcn(). If the run is still not found on the second attempt, it indicates corrupted metadata and returns -EINVAL, preventing the Denial-of-Service (DoS) vulnerability.
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: fs: ntfs3: solución de bucle infinito en attr_load_runs_range con metadatos inconsistentes Se encontró un error de bucle infinito en el sistema de archivos ntfs3 que puede conducir a una condición de Denegación de Servicio (DoS). Una imagen NTFS malformada puede causar un bucle infinito cuando un encabezado de atributo indica una lista de ejecuciones vacía, mientras que las entradas de directorio lo referencian como si contuviera datos reales. En NTFS, establecer evcn=-1 con svcn=0 es una forma válida de representar una lista de ejecuciones vacía, y run_unpack() lo maneja correctamente verificando si evcn + 1 es igual a svcn y retornando anticipadamente sin analizar ningún dato de ejecución. Sin embargo, esto crea un problema cuando hay inconsistencia de metadatos, donde el encabezado del atributo afirma estar vacío (evcn=-1) pero el llamador espera leer datos reales. Cuando run_unpack() retorna éxito inmediatamente al ver esta condición, deja el runs_tree sin inicializar con run->runs como NULL. La función llamadora attr_load_runs_range() asume que un retorno exitoso significa que las ejecuciones fueron cargadas y establece clen en 0, esperando que la siguiente llamada a run_lookup_entry() tenga éxito. Debido a que runs_tree permanece sin inicializar, run_lookup_entry() sigue fallando, y el bucle incrementa vcn en cero (vcn += 0), lo que lleva a un bucle infinito. Este parche agrega un contador de reintentos para detectar cuándo run_lookup_entry() falla consecutivamente después de attr_load_runs_vcn(). Si la ejecución aún no se encuentra en el segundo intento, indica metadatos corruptos y retorna -EINVAL, previniendo la vulnerabilidad de Denegación de Servicio (DoS).
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | LOW |
| Privileges Required | LOW |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | HIGH |
| Source | Type | Description |
|---|---|---|
| [email protected] | Primary |
en
CWE-835
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x702bdcc9bec0> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x702b53f50e80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x702bcbbf4f00> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x702b53f53280> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x702bdcc9ac00> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x702bdc0d1180> | Operating System |
| Vulnerable | CPE |
|---|---|
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |