nday
CVE-2025-40271

fs/proc: fix uaf in proc_readdir_de()

Linux / Linux

Preuve de concept publique parue 149 jours après la divulgation. nday n’a encore aucune trace de correctif ; cela ne veut pas dire qu’il n’en existe pas. Cette vulnérabilité figure dans une seule des 4 sources de PoC : exploitdb. Aucune inscription au catalogue KEV de la CISA à ce jour.

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
étape actuelle
POC
divulgation
délai avant PoC
T+149d POC : date seule
CVSS
7.8 HIGH v3.1

Cycle de vie

Axe en UTC ; point = minute exacte, barre large = date seule, creux = inconnue ou déduite.
date inconnue
DISdivulguée
2025-12-06T21:50Z
PATcorrectif
aucune donnée
ANAanalyse
aucune donnée
POCPoC
2026-05-04, date seule
ITWexploitée
aucune donnée
KEVKEV
aucune donnée

Résumé

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.

Journal des événements

+DISdivulgation

Fiche CVE publiée par Linux. CVSS 7.8, gravité élevée.

source cvelist · importé en masse par nday le · brut
{
  "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-04date seule, selon la source
+POCPoC publique

Exploit-DB recense un code d’exploitation public : « Linux Kernel proc_readdir_de() 6.18-rc5 - Local Privilege Escalation » (EDB-52550).

source exploitdb 52550 · importé en masse par nday le · brut
{
  "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.

Échanges entre chercheurs

0 chercheur en a parlé ces 7 derniers jours

Publications sur X de chercheurs suivis par nday citant cette CVE, telles que publiées. nday ne les vérifie pas.

nday n’a encore recueilli aucune publication sur X d’un chercheur de sa liste citant cette CVE.

Discussion

0 comments

No comments yet.