ring-buffer: Fix subbuf resize race with ring_buffer_alloc_read_page()
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:
ring-buffer: Fix subbuf resize race with ring_buffer_alloc_read_page()
ring_buffer_alloc_read_page() is racy with ring_buffer_subbuf_order_set, it can allocate a reader page with an outdated order. This isn't a big issue, the user can still re-allocate a new reader page and try again.
However, what is more problematic is if the value of subbuf_order changes in the middle of ring_buffer_alloc_read_page(). In that case, bpage->order might not match the actual allocated memory.
Use bpage->order for the allocation to prevent this race.
From the CVE record · Linux
A race between ring_buffer_alloc_read_page() and ring_buffer_subbuf_order_set() can leave a reader page's recorded order inconsistent with its allocated memory. This can occur if the subbuffer order changes during reader-page allocation. The input does not specify an attacker action, access requirements, or user interaction.
Engineers running the Linux kernel should check their affected versions; no version range is provided.