| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-50207: ring-buffer: Fix reader locking when changing the sub buffer order |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| ring-buffer: Fix reader locking when changing the sub buffer order |
| |
| The function ring_buffer_subbuf_order_set() updates each |
| ring_buffer_per_cpu and installs new sub buffers that match the requested |
| page order. This operation may be invoked concurrently with readers that |
| rely on some of the modified data, such as the head bit (RB_PAGE_HEAD), or |
| the ring_buffer_per_cpu.pages and reader_page pointers. However, no |
| exclusive access is acquired by ring_buffer_subbuf_order_set(). Modifying |
| the mentioned data while a reader also operates on them can then result in |
| incorrect memory access and various crashes. |
| |
| Fix the problem by taking the reader_lock when updating a specific |
| ring_buffer_per_cpu in ring_buffer_subbuf_order_set(). |
| |
| The Linux kernel CVE team has assigned CVE-2024-50207 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.8 with commit 8e7b58c27b3c567316a51079b375b846f9223bba and fixed in 6.11.6 with commit a569290525a05162d5dd26d9845591eaf46e5802 |
| Issue introduced in 6.8 with commit 8e7b58c27b3c567316a51079b375b846f9223bba and fixed in 6.12 with commit 09661f75e75cb6c1d2d8326a70c311d46729235f |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2024-50207 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| kernel/trace/ring_buffer.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/a569290525a05162d5dd26d9845591eaf46e5802 |
| https://git.kernel.org/stable/c/09661f75e75cb6c1d2d8326a70c311d46729235f |