Skip to content
Heist/ feed
Back to feed
HighFix available

workqueue: Put the pwq after detaching the rescuer from the pool

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: workqueue: Put the pwq after detaching the rescuer from the pool The commit 68f83057b913("workqueue: Reap workers via kthread_stop() and remove detach_completion") adds code to reap the normal workers but mistakenly does not handle the rescuer and also removes the code waiting for the rescuer in put_unbound_pool(), which caused a use-after-free bug reported by Cheung Wall. To avoid the use-after-free bug, the pool’s reference must be held until the detachment is complete. Therefore, move the code that puts the pwq after detaching the rescuer from the pool.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.16, 6.13.4
CVEs
CVE-2025-21786
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 17:36 UTC · Revision 1

Source evidence

workqueue: Put the pwq after detaching the rescuer from the pool

core-osv · Original source

Published 27 Feb 2025, 02:18 UTC

In the Linux kernel, the following vulnerability has been resolved: workqueue: Put the pwq after detaching the rescuer from the pool The commit 68f83057b913("workqueue: Reap workers via kthread_stop() and remove detach_completion") adds code to reap the normal workers but mistakenly does not handle the rescuer and also removes the code waiting for the rescuer in put_unbound_pool(), which caused a use-after-free bug reported by Cheung Wall. To avoid the use-after-free bug, the pool’s reference must be held until the detachment is complete. Therefore, move the code that puts the pwq after detaching the rescuer from the pool.

osv:CVE-2025-21786

Kernel

Fixed versions: 6.12.16, 6.13.4

Complete source record
{
  "id": "238c4a9783ec3cc2cbb42a59a08115bf0339011b958d86964960e2fd1bb11011",
  "url": "https://osv.dev/vulnerability/CVE-2025-21786",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "workqueue: Put the pwq after detaching the rescuer from the pool",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: workqueue: Put the pwq after detaching the rescuer from the pool The commit 68f83057b913(\"workqueue: Reap workers via kthread_stop() and remove detach_completion\") adds code to reap the normal workers but mistakenly does not handle the rescuer and also removes the code waiting for the rescuer in put_unbound_pool(), which caused a use-after-free bug reported by Cheung Wall. To avoid the use-after-free bug, the pool’s reference must be held until the detachment is complete. Therefore, move the code that puts the pwq after detaching the rescuer from the pool.",
    "evidence": "osv:CVE-2025-21786",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.16",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-21786",
      "aliases": [
        "CVE-2025-21786"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "68f83057b913467a999e1bf9e0da6a119668f769"
                },
                {
                  "fixed": "e7c16028a424dd35be1064a68fa318be4359310f"
                },
                {
                  "fixed": "835b69c868f53f959d4986bbecd561ba6f38e492"
                },
                {
                  "fixed": "e76946110137703c16423baf6ee177b751a34b7e"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21786.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.11.0"
                },
                {
                  "fixed": "6.12.16"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21786.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.846434599Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/835b69c868f53f959d4986bbecd561ba6f38e492",
        "https://git.kernel.org/stable/c/e76946110137703c16423baf6ee177b751a34b7e",
        "https://git.kernel.org/stable/c/e7c16028a424dd35be1064a68fa318be4359310f",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21786.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-21786",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21786.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-21786",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497886,
  "published_at": "2025-02-27T02:18:26.406+00:00"
}