[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201027135451.607741578@linuxfoundation.org>
Date: Tue, 27 Oct 2020 14:44:33 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Robin van der Gracht <robin@...tonic.nl>,
Oleksij Rempel <linux@...pel-privat.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Oliver Hartkopp <socketcan@...tkopp.net>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Cong Wang <xiyou.wangcong@...il.com>,
syzbot+3f3837e61a48d32b495f@...kaller.appspotmail.com
Subject: [PATCH 5.9 023/757] can: j1935: j1939_tp_tx_dat_new(): fix missing initialization of skbcnt
From: Cong Wang <xiyou.wangcong@...il.com>
[ Upstream commit e009f95b1543e26606dca2f7e6e9f0f9174538e5 ]
This fixes an uninit-value warning:
BUG: KMSAN: uninit-value in can_receive+0x26b/0x630 net/can/af_can.c:650
Reported-and-tested-by: syzbot+3f3837e61a48d32b495f@...kaller.appspotmail.com
Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Cc: Robin van der Gracht <robin@...tonic.nl>
Cc: Oleksij Rempel <linux@...pel-privat.de>
Cc: Pengutronix Kernel Team <kernel@...gutronix.de>
Cc: Oliver Hartkopp <socketcan@...tkopp.net>
Cc: Marc Kleine-Budde <mkl@...gutronix.de>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Link: https://lore.kernel.org/r/20201008061821.24663-1-xiyou.wangcong@gmail.com
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
net/can/j1939/transport.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -580,6 +580,7 @@ sk_buff *j1939_tp_tx_dat_new(struct j193
skb->dev = priv->ndev;
can_skb_reserve(skb);
can_skb_prv(skb)->ifindex = priv->ndev->ifindex;
+ can_skb_prv(skb)->skbcnt = 0;
/* reserve CAN header */
skb_reserve(skb, offsetof(struct can_frame, data));
Powered by blists - more mailing lists