Linux
io_uring: ensure ctx->rings is stable for task work flags manipulation
In the Linux kernel, the following vulnerability has been resolved: io_uring: ensure ctx->rings is stable for task work flags manipulation If DEFER_TASKRUN | SETUP_TASKRUN is used and task work is added while the ring is being resized, it's possible for the OR'ing of IORING_SQ_TASKRUN to happen in the small window of swapping into the new rings and the old rings being freed. Prevent this by adding a 2nd ->rings pointer, ->rings_rcu, which is protected by RCU. The task work flags manipulation is inside RCU already, and if the resize ring freeing is done post an RCU synchronize, then there's no need to add locking to the fast path of task work additions. Note: this is only done for DEFER_TASKRUN, as that's the only setup mode that supports ring resizing. If this ever changes, then they too need to use the io_ctx_mark_taskrun() helper.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 79cfe9e59c2a12c3b3faeeefe38d23f3d8030972, < 7cc4530b3e952d4a5947e1e55d06620d8845d4f5
- >= 79cfe9e59c2a12c3b3faeeefe38d23f3d8030972, < 46dc07d5f31411cc023f3bf1f4a23a07bf6e0ed1
- >= 79cfe9e59c2a12c3b3faeeefe38d23f3d8030972, < 96189080265e6bb5dde3a4afbaf947af493e3f82
Fixed in 7cc4530b3e952d4a5947e1e55d06620d8845d4f5, 46dc07d5f31411cc023f3bf1f4a23a07bf6e0ed1, 96189080265e6bb5dde3a4afbaf947af493e3f82
- 6.13
Fixed in 0, 6.18.19, 6.19.9, 7.0
Mitigation
Upgrade Linux to 7cc4530b3e952d4a5947e1e55d06620d8845d4f5 or 46dc07d5f31411cc023f3bf1f4a23a07bf6e0ed1 or 96189080265e6bb5dde3a4afbaf947af493e3f82 or later.
Upgrade Linux to 0 or 6.18.19 or 6.19.9 or 7.0 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.