mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
a4fbe70c5c
The receiver should abort TP if 'total message size' in TP.CM_RTS and
TP.CM_BAM is less than 9 or greater than 1785 [1], but currently the
j1939 stack only checks the upper bound and the receiver will accept
the following broadcast message:
vcan1 18ECFF00 [8] 20 08 00 02 FF 00 23 01
vcan1 18EBFF00 [8] 01 00 00 00 00 00 00 00
vcan1 18EBFF00 [8] 02 00 FF FF FF FF FF FF
This patch adds check for the lower bound and abort illegal TP.
[1] SAE-J1939-82 A.3.4 Row 2 and A.3.6 Row 6.
Fixes:
|
||
---|---|---|
.. | ||
address-claim.c | ||
bus.c | ||
j1939-priv.h | ||
Kconfig | ||
main.c | ||
Makefile | ||
socket.c | ||
transport.c |