1
0
Fork 0
freescale-linux-fslc/net/can
Oliver Hartkopp d02b68a929 can: isotp: fix msg_namelen values depending on CAN_REQUIRED_SIZE
[ Upstream commit f522d9559b ]

Since commit f5223e9eee ("can: extend sockaddr_can to include j1939
members") the sockaddr_can has been extended in size and a new
CAN_REQUIRED_SIZE macro has been introduced to calculate the protocol
specific needed size.

The ABI for the msg_name and msg_namelen has not been adapted to the
new CAN_REQUIRED_SIZE macro for the other CAN protocols which leads to
a problem when an existing binary reads the (increased) struct
sockaddr_can in msg_name.

Fixes: e057dd3fc2 ("can: add ISO 15765-2:2016 transport protocol")
Reported-by: Richard Weinberger <richard@nod.at>
Acked-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Link: https://lore.kernel.org/linux-can/1135648123.112255.1616613706554.JavaMail.zimbra@nod.at/T/#t
Link: https://lore.kernel.org/r/20210325125850.1620-2-socketcan@hartkopp.net
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-14 08:42:07 +02:00
..
j1939 net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
Kconfig can: isotp: Explain PDU in CAN_ISOTP help text 2020-11-03 22:30:31 +01:00
Makefile can: add ISO 15765-2:2016 transport protocol 2020-10-07 23:18:33 +02:00
af_can.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: bcm/raw: fix msg_namelen values depending on CAN_REQUIRED_SIZE 2021-04-14 08:42:07 +02:00
gw.c can: remove obsolete version strings 2020-10-12 10:06:39 +02:00
isotp.c can: isotp: fix msg_namelen values depending on CAN_REQUIRED_SIZE 2021-04-14 08:42:07 +02:00
proc.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
raw.c can: bcm/raw: fix msg_namelen values depending on CAN_REQUIRED_SIZE 2021-04-14 08:42:07 +02:00