linux-stable/net/can
Norbert Slusarek c297559a2a can: bcm: fix infoleak in struct bcm_msg_head
commit 5e87ddbe39 upstream.

On 64-bit systems, struct bcm_msg_head has an added padding of 4 bytes between
struct members count and ival1. Even though all struct members are initialized,
the 4-byte hole will contain data from the kernel stack. This patch zeroes out
struct bcm_msg_head before usage, preventing infoleaks to userspace.

Fixes: ffd980f976 ("[CAN]: Add broadcast manager (bcm) protocol")
Link: https://lore.kernel.org/r/trinity-7c1b2e82-e34f-4885-8060-2cd7a13769ce-1623532166177@3c-app-gmx-bs52
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Norbert Slusarek <nslusarek@gmx.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-23 14:41:28 +02:00
..
j1939 net: introduce CAN specific pointer in the struct net_device 2021-04-07 14:47:41 +02:00
af_can.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 14:47:41 +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: fix infoleak in struct bcm_msg_head 2021-06-23 14:41:28 +02:00
gw.c can: gw: add support for CAN FD frames 2019-08-13 17:32:21 +02:00
Kconfig can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
Makefile can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
proc.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 14:47:41 +02:00
raw.c can: bcm/raw: fix msg_namelen values depending on CAN_REQUIRED_SIZE 2021-04-14 08:24:14 +02:00