1. Accueil
  2. Vulnérabilités
  3. CVE-2025-37747

CVE-2025-37747

perf: Fix hang while freeing sigtrap event

Publiée le 1 mai 2025 · modifiée le 5 nov. 2026 · Sources : NVD, CNA (éditeur ou attributeur), CERT-FR, EPSS (FIRST)

Faible 27/100

Résumé

In the Linux kernel, the following vulnerability has been resolved: perf: Fix hang while freeing sigtrap event Perf can hang while freeing a sigtrap event if a related deferred signal hadn't managed to be sent before the file got closed: perf_event_overflow() task_work_add(perf_pending_task) fput() task_work_add(____fput()) task_work_run() ____fput() perf_release() perf_event_release_kernel() _free_event() perf_pending_task_sync() task_work_cancel() -> FAILED rcuwait_wait_event() Once task_work_run() is running, the list of pending callbacks is removed from the task_struct and from this point on task_work_cancel() can't remove any pending and not yet started work items, hence the task_work_cancel() failure and the hang on rcuwait_wait_event(). Task work could be changed to remove one work at a time, so a work running on the current task can always cancel a pending one, however the wait / wake design is still subject to inverted dependencies when remote targets are involved, as pictured by Oleg: T1 T2 fd = perf_event_open(pid => T2->pid); fd = perf_event_open(pid => T1->pid); close(fd) close(fd) <IRQ> <IRQ> perf_event_overflow() perf_event_overflow() task_work_add(perf_pending_task) task_work_add(perf_pending_task) </IRQ> </IRQ> fput() fput() task_work_add(____fput()) task_work_add(____fput()) task_work_run() task_work_run() ____fput() ____fput() perf_release() perf_release() perf_event_release_kernel() perf_event_release_kernel() _free_event() _free_event() perf_pending_task_sync() perf_pending_task_sync() rcuwait_wait_event() rcuwait_wait_event() Therefore the only option left is to acquire the event reference count upon queueing the perf task work and release it from the task work, just like it was done before 3a5465418f5f ("perf: Fix event leak upon exec and file release") but without the leaks it fixed. Some adjustments are necessary to make it work: * A child event might dereference its parent upon freeing. Care must be taken to release the parent last. * Some places assuming the event doesn't have any reference held and therefore can be freed right away must instead put the reference and let the reference counting to its job.

Aucune traduction française : description d’origine affichée.

Produits et versions affectés

Linux (12 ligne(s))
Linux
ProduitVersionsCorrigé dansSource
Linux de 6.1.103 (inclus) à 6.1.191 (exclu) — CNA (éditeur ou attributeur)
Linux de 6.6.44 (inclus) à 6.6.160 (exclu) — CNA (éditeur ou attributeur)
Linux de 5.15.165 (inclus) à 5.16 (exclu) — CNA (éditeur ou attributeur)
Linux de 6.10.3 (inclus) à 6.11 (exclu) — CNA (éditeur ou attributeur)
Linux 6.11 — CNA (éditeur ou attributeur)
Linux kernel de 5.15.165 (inclus) à 5.16 (exclu) — NVD
Linux kernel de 6.1.103 (inclus) à 6.2 (exclu) — NVD
Linux kernel de 6.6.44 (inclus) à 6.7 (exclu) — NVD
Linux kernel de 6.10.3 (inclus) à 6.12.24 (exclu) — NVD
Linux kernel de 6.13 (inclus) à 6.13.12 (exclu) — NVD
Linux kernel de 6.14 (inclus) à 6.14.3 (exclu) — NVD
Linux kernel 6.15 — NVD

Correctif

Non renseigné par l’éditeur.

Contournement

Aucun contournement renseigné.

Savoir si vous êtes touché

Aucune méthode de vérification renseignée.

Chronologie

  1. — Publication de la CVE (cve)
  2. — Avis du CERT-FR (certfr:CERTFR-2026-AVI-1595)
  3. — Avis du CERT-FR (certfr:CERTFR-2026-AVI-1596)

Avis CERT-FR

Références

Provenance des données

Statut
NVD
Date de publication
NVD
Description
CNA (éditeur ou attributeur)
Score CVSS
NVD
Faiblesse (CWE)
NVD
Vecteur CVSS
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (CVSS 3.1, NVD)
Faiblesse
NVD-CWE-noinfo · Non classé

Comment sont obtenues et calculées ces données