Skip to content

Commit eb1492c

Browse files
author
CKI KWF Bot
committed
Merge: CVE-2025-40047: io_uring/waitid: always prune wait queue entry in io_waitid_wait()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1682 JIRA: https://issues.redhat.com/browse/RHEL-124977 CVE: CVE-2025-40047 ``` commit 2f8229d Author: Jens Axboe <axboe@kernel.dk> Date: Tue Oct 7 07:46:00 2025 -0600 io_uring/waitid: always prune wait queue entry in io_waitid_wait() For a successful return, always remove our entry from the wait queue entry list. Previously this was skipped if a cancelation was in progress, but this can race with another invocation of the wait queue entry callback. Cc: stable@vger.kernel.org Fixes: f31ecf6 ("io_uring: add IORING_OP_WAITID support") Reported-by: syzbot+b9e83021d9c642a33d8c@syzkaller.appspotmail.com Tested-by: syzbot+b9e83021d9c642a33d8c@syzkaller.appspotmail.com Link: https://lore.kernel.org/io-uring/68e5195e.050a0220.256323.001f.GAE@google.com/ Signed-off-by: Jens Axboe <axboe@kernel.dk> ``` Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com> --- <small>Created 2025-10-30 02:06 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://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12334433&issuetype=1&priority=4&summary=backporter+webhook+issue&components=kernel-workflow+/+backporter)</small> Approved-by: Jeff Moyer <jmoyer@redhat.com> Approved-by: Jarod Wilson <jarod@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents e48a080 + d8b28c0 commit eb1492c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

io_uring/waitid.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,14 @@ static int io_waitid_wait(struct wait_queue_entry *wait, unsigned mode,
232232
if (!pid_child_should_wake(wo, p))
233233
return 0;
234234

235+
list_del_init(&wait->entry);
236+
235237
/* cancel is in progress */
236238
if (atomic_fetch_inc(&iw->refs) & IO_WAITID_REF_MASK)
237239
return 1;
238240

239241
req->io_task_work.func = io_waitid_cb;
240242
io_req_task_work_add(req);
241-
list_del_init(&wait->entry);
242243
return 1;
243244
}
244245

0 commit comments

Comments
 (0)