From mboxrd@z Thu Jan 1 00:00:00 1970 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 7D4561E0B9C for ; Thu, 1 May 2025 14:14:52 +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=1746108892; cv=none; b=hjTnRVrOjVDcmRjvKduNnTMckiCodCDOTz5A2InO+UISPS3p5g0pRk+N91i1//r3DbRR/mAbOakdy4QWHX8j+4nboZNu5D/be6O/T6zvLdmQBsdPykRePSba2uJAU5zi30kMe+bK7KS0soMCVvc73cgIT5pkZ3EAUGsIuckyUVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108892; c=relaxed/simple; bh=g4n9ydNBQd8O+HHUXeiGUzfoA7xj8kgN8yZgA+SevTw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=g6l4pUGbXzTo2y0irTlqAYLiFtW/m1JrYUeKyFBJM+K8Orh2aVQZ/gXha5iC56LRDSS9lYv8JwQiBQdC3zp5khAKSZXgbm77Va3GvvGsA5AcJJqjtjYtMSMO28oBqtaSvXl4BIzqYpJa8wXoZKigsMgpDwF1G450ByadUo33HWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jGL51x7b; 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="jGL51x7b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C561C4CEED; Thu, 1 May 2025 14:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108892; bh=g4n9ydNBQd8O+HHUXeiGUzfoA7xj8kgN8yZgA+SevTw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jGL51x7bJ50tg7IXihOX4S9xIW7akKLRcd5/rPmzcKlD8/qvYZeTN4R49klpBAuFO 5pZw5UJG7DEw6TcMCjeSra5bsZxQaFEEzx7qSWkUKeEAXea9yWZBAASp6TprVKFaPT ZkmuFmmju3YBkY1mT6R/LWXXPeWQmxoazRKSDg7M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49844: can: dev: fix skb drop check Date: Thu, 1 May 2025 16:10:34 +0200 Message-ID: <2025050141-CVE-2022-49844-e0b9@gregkh> X-Mailer: git-send-email 2.49.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=3428; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZFaTDBNz5xgroab5e8LWw4MvYlCEyRJCsxFQ/ebkXCc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDUtLXokL6rU6B5z4v7RH5HjpOp8E75csRX9Edb77W y30eO7bEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMJymNYcEz7ZcSrSVp3fj8X uiI9m01iitW/GIYFs68kb9Zq04t1ytsanjB/Y6TF51d3AQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: can: dev: fix skb drop check In commit a6d190f8c767 ("can: skb: drop tx skb if in listen only mode") the priv->ctrlmode element is read even on virtual CAN interfaces that do not create the struct can_priv at startup. This out-of-bounds read may lead to CAN frame drops for virtual CAN interfaces like vcan and vxcan. This patch mainly reverts the original commit and adds a new helper for CAN interface drivers that provide the required information in struct can_priv. [mkl: patch pch_can, too] The Linux kernel CVE team has assigned CVE-2022-49844 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit a6d190f8c7670068d8c154ef8477eca07b5e3574 and fixed in 6.0.9 with commit 386c49fe31ee748e053860b3bac7794a933ac9ac Issue introduced in 6.0 with commit a6d190f8c7670068d8c154ef8477eca07b5e3574 and fixed in 6.1 with commit ae64438be1923e3c1102d90fd41db7afcfaf54cc 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-2022-49844 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/at91_can.c drivers/net/can/c_can/c_can_main.c drivers/net/can/can327.c drivers/net/can/cc770/cc770.c drivers/net/can/ctucanfd/ctucanfd_base.c drivers/net/can/dev/skb.c drivers/net/can/flexcan/flexcan-core.c drivers/net/can/grcan.c drivers/net/can/ifi_canfd/ifi_canfd.c drivers/net/can/janz-ican3.c drivers/net/can/kvaser_pciefd.c drivers/net/can/m_can/m_can.c drivers/net/can/mscan/mscan.c drivers/net/can/pch_can.c drivers/net/can/peak_canfd/peak_canfd.c drivers/net/can/rcar/rcar_can.c drivers/net/can/rcar/rcar_canfd.c drivers/net/can/sja1000/sja1000.c drivers/net/can/slcan/slcan-core.c drivers/net/can/softing/softing_main.c drivers/net/can/spi/hi311x.c drivers/net/can/spi/mcp251x.c drivers/net/can/spi/mcp251xfd/mcp251xfd-tx.c drivers/net/can/sun4i_can.c drivers/net/can/ti_hecc.c drivers/net/can/usb/ems_usb.c drivers/net/can/usb/esd_usb.c drivers/net/can/usb/etas_es58x/es58x_core.c drivers/net/can/usb/gs_usb.c drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c drivers/net/can/usb/mcba_usb.c drivers/net/can/usb/peak_usb/pcan_usb_core.c drivers/net/can/usb/ucan.c drivers/net/can/usb/usb_8dev.c drivers/net/can/xilinx_can.c include/linux/can/dev.h 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/386c49fe31ee748e053860b3bac7794a933ac9ac https://git.kernel.org/stable/c/ae64438be1923e3c1102d90fd41db7afcfaf54cc