linux/drivers/net/can
Richard Palethorpe b774578329 slcan: Don't transmit uninitialized stack data in padding
[ Upstream commit b9258a2cec ]

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: Richard Palethorpe <rpalethorpe@suse.com>
Fixes: a1044e36e4 ("can: add slcan driver for serial/USB-serial CAN adapters")
Reviewed-by: Kees 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: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 10:45:08 +02:00
..
c_can can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open 2019-12-05 09:19:41 +01:00
cc770
ifi_canfd
m_can can: m_can: implement errata "Needless activation of MRAF irq" 2019-07-14 08:11:07 +02:00
mscan can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode 2020-01-14 20:07:02 +01:00
peak_canfd
rcar can: rcar_canfd: fix possible IRQ storm on high load 2019-08-16 10:12:43 +02:00
sja1000 can: sja1000: force the string buffer NULL-terminated 2019-08-29 08:28:37 +02:00
softing
spi can: mcp251x: mcp251x_restart_work_handler(): Fix potential force_quit race condition 2019-12-05 09:19:43 +01:00
usb can: gs_usb: gs_usb_probe(): use descriptors of current altsetting 2020-01-14 20:07:02 +01:00
at91_can.c
dev.c can: add missing attribute validation for termination 2020-03-18 07:14:15 +01:00
flexcan.c can: flexcan: increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails 2019-12-05 09:19:43 +01:00
grcan.c
janz-ican3.c
Kconfig
led.c
Makefile
pch_can.c
rx-offload.c can: rx-offload: can_rx_offload_irq_offload_fifo(): continue on error 2019-12-05 09:19:43 +01:00
slcan.c slcan: Don't transmit uninitialized stack data in padding 2020-04-13 10:45:08 +02:00
sun4i_can.c
ti_hecc.c
vcan.c
vxcan.c
xilinx_can.c can: xilinx: fix return type of ndo_start_xmit function 2019-12-13 08:52:08 +01:00