Skip to content
Commit 85ae3aec authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Zhang Changzhong
Browse files

can: j1939: transport: add j1939_session_skb_find_by_offset() function

mainline inclusion
from mainline-v5.9-rc2
commit 840835c9
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4CE
CVE: CVE-2021-47232

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=840835c9281215341d84966a8855f267a971e6a3



--------------------------------

Sometimes it makes no sense to search the skb by pkt.dpo, since we need
next the skb within the transaction block. This may happen if we have an
ETP session with CTS set to less than 255 packets.

After this patch, we will be able to work with ETP sessions where the
block size (ETP.CM_CTS byte 2) is less than 255 packets.

Reported-by: default avatarHenrique Figueira <henrislip@gmail.com>
Reported-by: https://github.com/linux-can/can-utils/issues/228


Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20200807105200.26441-5-o.rempel@pengutronix.de


Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parent 26bfb7d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment