io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()
Not everything requires locking in there, which is why the 'has_lock' variable exists. But enough does that it's a bit unwieldy to manage. Wrap the whole thing in a ->uring_lock trylock, and just return with no output if we fail to grab it. The existing trylock() will already have greatly diminished utility/output for the failure case.
This fixes an issue with reading the SQE fields, if the ring is being actively resized at the same time.
From the CVE record · Linux
The Linux kernel's io_uring fdinfo code can read SQE fields while a ring is being resized. This can cause incorrect reads when fdinfo is read concurrently with an active resize. The input does not specify whether an attacker needs authentication or user interaction.
Engineers running the Linux kernel should check affected versions; none are specified in the input.