| 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-44951: serial: sc16is7xx: fix TX fifo corruption |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| serial: sc16is7xx: fix TX fifo corruption |
| |
| Sometimes, when a packet is received on channel A at almost the same time |
| as a packet is about to be transmitted on channel B, we observe with a |
| logic analyzer that the received packet on channel A is transmitted on |
| channel B. In other words, the Tx buffer data on channel B is corrupted |
| with data from channel A. |
| |
| The problem appeared since commit 4409df5866b7 ("serial: sc16is7xx: change |
| EFR lock to operate on each channels"), which changed the EFR locking to |
| operate on each channel instead of chip-wise. |
| |
| This commit has introduced a regression, because the EFR lock is used not |
| only to protect the EFR registers access, but also, in a very obscure and |
| undocumented way, to protect access to the data buffer, which is shared by |
| the Tx and Rx handlers, but also by each channel of the IC. |
| |
| Fix this regression first by switching to kfifo_out_linear_ptr() in |
| sc16is7xx_handle_tx() to eliminate the need for a shared Rx/Tx buffer. |
| |
| Secondly, replace the chip-wise Rx buffer with a separate Rx buffer for |
| each channel. |
| |
| The Linux kernel CVE team has assigned CVE-2024-44951 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.8 with commit 4409df5866b7ff7686ba27e449ca97a92ee063c9 and fixed in 6.10.5 with commit 09cfe05e9907f3276887a20e267cc40e202f4fdd |
| Issue introduced in 6.8 with commit 4409df5866b7ff7686ba27e449ca97a92ee063c9 and fixed in 6.11 with commit 133f4c00b8b2bfcacead9b81e7e8edfceb4b06c4 |
| Issue introduced in 6.1.76 with commit 4b068e55bf5ea7bab4d8a282c6a24b03e80c0b68 |
| Issue introduced in 6.6.15 with commit 9879e1bec3c0f077427dd0d258c80c63ce9babdf |
| Issue introduced in 6.7.3 with commit dbe196ca489f3833e0f9eeb86ac346194f131c91 |
| |
| 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-44951 |
| 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: |
| drivers/tty/serial/sc16is7xx.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/09cfe05e9907f3276887a20e267cc40e202f4fdd |
| https://git.kernel.org/stable/c/133f4c00b8b2bfcacead9b81e7e8edfceb4b06c4 |