CVE-2022-49845: can: j1939: j1939_send_one(): fix missing CAN header initialization
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
can: j1939: j1939_send_one(): fix missing CAN header initialization
The read access to struct canxl_frame::len inside of a j1939 created skbuff revealed a missing initialization of reserved and later filled elements in struct can_frame.
This patch initializes the 8 byte CAN header with zero.
The Linux kernel CVE team has assigned CVE-2022-49845 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 5.4.225 with commit d0513b095e1ef1469718564dec3fb3348556d0a8 Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 5.10.155 with commit f8e0edeaa0f2b860bdbbf0aafb4492533043d650 Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 5.15.79 with commit 69e86c6268d59ceddd0abe9ae8f1f5296f316c3c Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 6.0.9 with commit 2719f82ad5d8199cf5f346ea8bb3998ad5323b72 Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 6.1 with commit 3eb3d283e8579a22b81dd2ac3987b77465b2a22f
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-49845
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:
net/can/j1939/main.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/d0513b095e1ef1469718564dec3fb3348556d0a8 https://git.kernel.org/stable/c/f8e0edeaa0f2b860bdbbf0aafb4492533043d650 https://git.kernel.org/stable/c/69e86c6268d59ceddd0abe9ae8f1f5296f316c3c https://git.kernel.org/stable/c/2719f82ad5d8199cf5f346ea8bb3998ad5323b72 https://git.kernel.org/stable/c/3eb3d283e8579a22b81dd2ac3987b77465b2a22f