Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4AF17F9 for ; Wed, 4 Sep 2024 18:36:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725475019; cv=none; b=YU7yDhnaqYsDhvZlGkBem6X0GzAUJprgG0XVtWvbjP8rODxl6H1uSLEf7JkPI6DdB7N1eo6Fv7qlfQIgITLUxkVO3S68Xm/AGLlagVmVmo4/4p4IMbkgkIRGGjeMHyAWV1XWaaRYiHvCiTmMNLACUFVHE8UVaEBNwsHHuXvuFYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725475019; c=relaxed/simple; bh=C5o9COE3wy8u9eFjKsf4zzc8hykf8a6Iv2UMTp2defM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lZp0OZxWZbi7fV1oNjx2rfTdJsV4eIxSaWhwfebQFPC3hfAN+2m/H/HQ6ll9loRjxa8FGo0KtUYa+D2sIkk0kfXNOVGE9O8QQfiuc/J9fb7cXd3Mzj3mOCGuBEY79gi64QW6uk2IUrV+cy7pxBdEXwLz8I+nz8JHW/yePvqdspg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HnS7GNUB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HnS7GNUB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D27ABC4CEC6; Wed, 4 Sep 2024 18:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725475018; bh=C5o9COE3wy8u9eFjKsf4zzc8hykf8a6Iv2UMTp2defM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HnS7GNUBaLrOLpeH9d28C2v8joBYlmBz52PDmHbTPeRiKDqCDstGg8qRLLLBgAm+C 5cpNWDi3dhqP+s04bN0YZfZlUD7peHQHMHPPV1K0aSh9bOVrRki09/Y3bfvyMqkVZ+ ClouA1y3vbpXm+nXXQ1NtOSQBX4K6A2L6x2OwZ6g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-44951: serial: sc16is7xx: fix TX fifo corruption Date: Wed, 4 Sep 2024 20:36:11 +0200 Message-ID: <2024090411-CVE-2024-44951-9121@gregkh> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2844; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=C5o9COE3wy8u9eFjKsf4zzc8hykf8a6Iv2UMTp2defM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk3Vsz++3eW2xSh0h+O+iGGiwv/y856K9vyxEJPveigQ QyHruyujlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIuAzD/LjSqOaVec568QFP l/hqLr19aoJLKcM8TYkJBewmT9PDEjadNI3JnsG2t5ENAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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 4409df5866b7 and fixed in 6.10.5 with commit 09cfe05e9907 Issue introduced in 6.8 with commit 4409df5866b7 and fixed in 6.11-rc3 with commit 133f4c00b8b2 Issue introduced in 6.1.76 with commit 4b068e55bf5e Issue introduced in 6.6.15 with commit 9879e1bec3c0 Issue introduced in 6.7.3 with commit dbe196ca489f 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