nday
CVE-2025-40271

fs/proc: fix uaf in proc_readdir_de()

Linux / Linux

Apareció una PoC pública 149 días después de la divulgación. nday aún no tiene constancia de una corrección; eso no significa que no exista parche. La recoge 1 de las 4 fuentes de PoC: exploitdb. No figura en el KEV de CISA.

tags accesslocalno user interaction exploitationExploit-DB productLinux kernel product typeoperating system
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA Linux
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the CNA Linux
Exploit-DB
Exploit-DB entries 52550
Linux kernel
affected products in the CVE record: Linux · Linux
operating system
affected products in the CVE record: Linux · Linuxthe product type of Linux kernel in nday's product registry
etapa
POC
divulgación
divulgación → PoC
T+149d POC: solo fecha
cvss
7.8 HIGH v3.1

Ciclo de vida

Eje x en UTC; punto = minuto exacto, barra ancha = solo fecha, hueco = desconocida o inferida.
fecha desconocida
DISdivulgada
2025-12-06T21:50Z
PATparcheada
sin registro aún
ANAanalizada
sin registro aún
POCPoC
2026-05-04, solo fecha
ITWexplotada
sin registro aún
KEVen KEV
sin registro aún

Descripción

In the Linux kernel, the following vulnerability has been resolved:

fs/proc: fix uaf in proc_readdir_de()

Pde is erased from subdir rbtree through rb_erase(), but not set the node to EMPTY, which may result in uaf access. We should use RB_CLEAR_NODE() set the erased node to EMPTY, then pde_subdir_next() will return NULL to avoid uaf access.

We found an uaf issue while using stress-ng testing, need to run testcase getdent and tun in the same time. The steps of the issue is as follows:

1) use getdent to traverse dir /proc/pid/net/dev_snmp6/, and current pde is tun3;

2) in the [time windows] unregister netdevice tun3 and tun2, and erase them from rbtree. erase tun3 first, and then erase tun2. the pde(tun2) will be released to slab;

3) continue to getdent process, then pde_subdir_next() will return pde(tun2) which is released, it will case uaf access.

CPU 0                                      |    CPU 1
-------------------------------------------------------------------------
traverse dir /proc/pid/net/dev_snmp6/      |   unregister_netdevice(tun->dev)   //tun3 tun2
sys_getdents64()                           |
  iterate_dir()                            |
    proc_readdir()                         |
      proc_readdir_de()                    |     snmp6_unregister_dev()
        pde_get(de);                       |       proc_remove()
        read_unlock(&proc_subdir_lock);    |         remove_proc_subtree()
                                           |           write_lock(&proc_subdir_lock);
        [time window]                      |           rb_erase(&root->subdir_node, &parent->subdir);
                                           |           write_unlock(&proc_subdir_lock);
        read_lock(&proc_subdir_lock);      |
        next = pde_subdir_next(de);        |
        pde_put(de);                       |
        de = next;    //UAF                |

rbtree of dev_snmp6 |

  pde(tun3)
   /    \
NULL  pde(tun2)

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:L
Local: needs a local or SSH session, or a user tricked into acting on the machine
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:L
Low: ordinary user privileges
User interaction UI:N
None: no action by anyone other than the attacker

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS 3.1 vector from the CVE record, scored by the CNA Linux.

Registro de eventos

+DISdivulgación

Linux publicó el registro CVE. CVSS 7.8, severidad alta.

fuente cvelist · nday , importación masiva · en bruto
{
  "id": 60481,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2025-40271",
  "occurred_at": "2025-12-06T21:50:53.266Z",
  "observed_at": "2026-11-12T17:00:49.411818Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "version": "3.1",
      "base_score": 7.8,
      "base_severity": "HIGH"
    },
    "ssvc": {
      "timestamp": "2026-06-16T19:37:49.226666Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2025-12-06T21:50:53.266Z",
    "assigner_short_name": "Linux"
  }
}
2026-05-04solo fecha, según la fuente
+POCPoC pública

Exploit-DB recoge el exploit público «Linux Kernel proc_readdir_de() 6.18-rc5 - Local Privilege Escalation» (EDB-52550).

fuente exploitdb 52550 · nday , importación masiva · en bruto
{
  "id": 24244,
  "type": "poc_published",
  "source": "exploitdb",
  "url": "https://www.exploit-db.com/exploits/52550",
  "occurred_at": "2026-05-04T00:00:00Z",
  "observed_at": "2026-11-12T15:24:40.221206Z",
  "is_backfill": true,
  "dedupe_key": "52550",
  "detail": {
    "url": "https://www.exploit-db.com/exploits/52550",
    "file": "exploits/linux/local/52550.c",
    "kind": "exploit",
    "tags": [],
    "type": "local",
    "title": "Linux Kernel proc_readdir_de() 6.18-rc5 - Local Privilege Escalation",
    "author": "aviralyash27",
    "edb_id": 52550,
    "cve_ids": [
      "CVE-2025-40271"
    ],
    "platform": "linux",
    "verified": false,
    "precision": "day",
    "confidence": "curated",
    "date_added": "2026-05-04",
    "date_updated": "2026-05-04",
    "date_published": "2026-05-04"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Debate de investigadores

0 investigadores lo mencionaron en los últimos 7 días

Publicaciones en X de investigadores de la lista de nday que mencionan este CVE, tal como se publicaron. nday no las verifica.

nday aún no ha recopilado publicaciones en X de investigadores de su lista sobre este CVE.

Discussion

0 comments

No comments yet.