Skip to content
Commit b7745783 authored by Richard Palethorpe's avatar Richard Palethorpe Committed by Greg Kroah-Hartman
Browse files

slcan: Don't transmit uninitialized stack data in padding



[ Upstream commit b9258a2c ]

struct can_frame contains some padding which is not explicitly zeroed in
slc_bump. This uninitialized data will then be transmitted if the stack
initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).

This commit just zeroes the whole struct including the padding.

Signed-off-by: default avatarRichard Palethorpe <rpalethorpe@suse.com>
Fixes: a1044e36 ("can: add slcan driver for serial/USB-serial CAN adapters")
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Cc: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: security@kernel.org
Cc: wg@grandegger.com
Cc: mkl@pengutronix.de
Cc: davem@davemloft.net
Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2b421960
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment