io_uring/waitid: prevent cancel reference wrap

State
Published
Severity
7.8 High
Published
Nov 2, 2026
Updated
Nov 3, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

io_uring/waitid: prevent cancel reference wrap

io_waitid packs the cancellation state into bit 31 of ->refs and uses bits 30:0 as a 31-bit reference counter:

#define IO_WAITID_CANCEL_FLAG BIT(31) #define IO_WAITID_REF_MASK GENMASK(30, 0)

__io_waitid_cancel() marks a request canceled, then increments the low bits of ->refs to claim completion ownership. When another path owns the request, the increment remains even though cancellation returns false. The request remains discoverable by cancellation, so repeated failed attempts can wrap the 31-bit reference field to zero. A later cancellation can claim ownership and complete the request a second time.

Use atomic_fetch_or() when setting the cancel flag and inspect the old flag value. The first cancel attempt continues to the existing ownership increment, preserving its wake and issuer handoff semantics. Later attempts see the cancel flag and return without incrementing the reference field.

This makes repeated failed cancellation attempts idempotent while leaving the first-cancel state transitions unchanged.

ProductVersions
Linux Linuxf31ecf671ddc498f20219453395794ff2383e06b to before 20b67288574c7c3df6b8ea7ed3b7af90a868006f Affectedf31ecf671ddc498f20219453395794ff2383e06b to before 5bfeee1774791602a0d53eb717f00f172127a017 Affectedf31ecf671ddc498f20219453395794ff2383e06b to before 857aa2012b91cad6fdef54a4b6c632d9d0b6e64f Affectedf31ecf671ddc498f20219453395794ff2383e06b to before 22fb4a4518e305164c7f203608287564de292f34 Affectedf31ecf671ddc498f20219453395794ff2383e06b to before 98787d3fa4e99564d2b2bc21255b21f670c450d0 Affected
Linux Linux6.7 Affectedbefore 6.7 Not Affected6.12.115 through 6.12.* Not Affected6.18.60 through 6.18.* Not Affected7.2.14 through 7.2.* Not Affected7.3.1 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.