io_uring: Fix release of pinned pages when __io_uaddr_map fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| 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: Fix release of pinned pages when __io_uaddr_map fails
Looking at the error path of __io_uaddr_map, if we fail after pinning the pages for any reasons, ret will be set to -EINVAL and the error handler won't properly release the pinned pages.
I didn't manage to trigger it without forcing a failure, but it can happen in real life when memory is heavily fragmented.
From the CVE record · Linux
The Linux kernel’s io_uring code can fail to release pinned pages if __io_uaddr_map fails after pinning them. This can occur when memory is heavily fragmented; the input does not specify attacker access requirements or user interaction.
Teams running the Linux kernel should check for this issue; affected versions are not specified.