Skip to content
Snippets Groups Projects
user avatar
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/468

JIRA: https://issues.redhat.com/browse/RHEL-81475


CVE: CVE-2025-21786

```
commit e76946110137703c16423baf6ee177b751a34b7e
Author: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Date:   Thu Jan 23 16:25:35 2025 +0800

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

    The commit 68f83057("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.

Reported-by: default avatarcheung wall <zzqq0103.hey@gmail.com>
    Cc: cheung wall <zzqq0103.hey@gmail.com>
    Link: https://lore.kernel.org/lkml/CAKHoSAvP3iQW+GwmKzWjEAOoPvzeWeoMO0Gz7Pp3_4kxt-RMoA@mail.gmail.com/


    Fixes: 68f83057("workqueue: Reap workers via kthread_stop() and remove detach_completion")
Signed-off-by: default avatarLai Jiangshan <jiangshan.ljs@antgroup.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org&gt;```>

Signed-off-by: default avatarCKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>

---

<small>Created 2025-02-27 22:37 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small

>

Approved-by: default avatarWaiman Long <longman@redhat.com>
Approved-by: default avatarPhil Auld <pauld@redhat.com>
Approved-by: default avatarCKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: default avatarJulio Faracco <jfaracco@redhat.com>
23492db8
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..