ring-buffer: Make cpu_buffer::free_page a buffer_data_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: Make cpu_buffer::free_page a buffer_data_read_page
Discarding a cached reader page after a concurrent ring buffer resize uses the new global subbuf_order for the free_pages() call. This mismatched order may crashes the kernel or leaks memory because the cached page was allocated under the old size.
Save the actual free_page order alongside the page address to ensure we always refer to the correct value and do not rely on the potentially stalled cpu_buffer->subbuf_order value. The simplest is to make free_page a buffer_data_read_page which already covers exactly what we need: a page address and a page order.
From the CVE record · Linux
The Linux kernel ring buffer can free a cached reader page using the wrong page order after a concurrent resize, potentially crashing the kernel or leaking memory. The input does not establish whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.