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 8C5F51F543A for ; Fri, 27 Dec 2024 15:03:27 +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=1735311807; cv=none; b=Es6Ua9KPiDWJwd4u7RXyh3jihBihFB7X/OcO4klkasQ5jdRbH+/7oUJdI84qmyNYtV2+bsJE81YAKxTERGEHcpniHipdIYZKyCUP4AHIWMM6cwqfQ4rj4ZlhMjQJYp1nYdDl3MV5wumHUwlwEqIATsnEwrUIBydkCPAQlcurIJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311807; c=relaxed/simple; bh=ydyUVdlBouatWDfVSMOaSBE06vQ40XHnTQLqhGzCK3U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ICkIxlImmWzWvPXTKeq+eJ78eHN1daiODjzx8UPzlGSp58S4Qx6oxGqgP9l4HMBHzYrUF/7XmFKdmPEzfSyQxtOkYfqu2jK36NMt+80JTXFD3eL945/yXGnqt/guE80Z7rSWl/jiVzB67QOuaVBp6RFlnn30PDA07i7F1nmzE+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2a05t+Sq; 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="2a05t+Sq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F04E3C4CED0; Fri, 27 Dec 2024 15:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311807; bh=ydyUVdlBouatWDfVSMOaSBE06vQ40XHnTQLqhGzCK3U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2a05t+SqyzAEPpLtPxES2h5DNMmaoTXKZQvZ5UXMffra5wA0VYRxF0pjNxvwEKouS TQoBdtaBAwqXJzyejs86L8mlmh0Bi+xLYCVoqiHrEvFkmTRpPl9fWoj05z/yv//UkO VOv8GELsCKw4168/87FFH0RJJGHD/Riuk9Ro49Gw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56651: can: hi311x: hi3110_can_ist(): fix potential use-after-free Date: Fri, 27 Dec 2024 16:02:52 +0100 Message-ID: <2024122740-CVE-2024-56651-2d22@gregkh> X-Mailer: git-send-email 2.47.1 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=3280; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ydyUVdlBouatWDfVSMOaSBE06vQ40XHnTQLqhGzCK3U=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5BydY/j+Q5/coac4E26WTtqUKOB08VrTovknyBa5/8 vXRb20MOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiV1MY5tnJVB8Kz5HeFhPX ePbk/t7A2PfHPBnmyuxd1Mf/x2/yjFmSB/izVa3+Lp31DwA= 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: can: hi311x: hi3110_can_ist(): fix potential use-after-free The commit a22bd630cfff ("can: hi311x: do not report txerr and rxerr during bus-off") removed the reporting of rxerr and txerr even in case of correct operation (i. e. not bus-off). The error count information added to the CAN frame after netif_rx() is a potential use after free, since there is no guarantee that the skb is in the same state. It might be freed or reused. Fix the issue by postponing the netif_rx() call in case of txerr and rxerr reporting. The Linux kernel CVE team has assigned CVE-2024-56651 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit a22bd630cfff496b270211745536e50e98eb3a45 and fixed in 6.1.120 with commit 4ad77eb8f2e07bcfa0e28887d3c7dbb732d92cc1 Issue introduced in 6.0 with commit a22bd630cfff496b270211745536e50e98eb3a45 and fixed in 6.6.66 with commit 1128022009444faf49359bd406cd665b177cb643 Issue introduced in 6.0 with commit a22bd630cfff496b270211745536e50e98eb3a45 and fixed in 6.12.5 with commit bc30b2fe8c54694f8ae08a5b8a5d174d16d93075 Issue introduced in 6.0 with commit a22bd630cfff496b270211745536e50e98eb3a45 and fixed in 6.13-rc2 with commit 9ad86d377ef4a19c75a9c639964879a5b25a433b Issue introduced in 4.14.291 with commit 303733fdab728d34708014b3096dc69ebae6e531 Issue introduced in 4.19.256 with commit 410054f1cf75378a6f009359e5952a240102a1a2 Issue introduced in 5.4.211 with commit d20bf7e76136fd4c1e47502a1f5773f2290013ed Issue introduced in 5.10.137 with commit 22e382d47de09e865a9214cc5c9f99256e65deaa Issue introduced in 5.15.61 with commit dcfcd5fc999b1eb7946de1fd031bc3aaf224c5ae Issue introduced in 5.18.18 with commit 330b0ac34beec4fef8b002549af5bc6d0b6f0836 Issue introduced in 5.19.2 with commit f3d865a6b791abbc874739ed702ae64ad2607511 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-56651 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/net/can/spi/hi311x.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/4ad77eb8f2e07bcfa0e28887d3c7dbb732d92cc1 https://git.kernel.org/stable/c/1128022009444faf49359bd406cd665b177cb643 https://git.kernel.org/stable/c/bc30b2fe8c54694f8ae08a5b8a5d174d16d93075 https://git.kernel.org/stable/c/9ad86d377ef4a19c75a9c639964879a5b25a433b