| From bippy-1.1.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2022-49844: can: dev: fix skb drop check |
| |
| 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 |