linux-can-fixes-for-5.11-20210127

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmARMX4THG1rbEBwZW5n
 dXRyb25peC5kZQAKCRCpyVqK+u3vqV4OB/9sAgySWtKO9ts6cWbhQ1q6W1QJ8IQ3
 QI7wB+9lTtBoGUdTx7o8vyfPQBTjYsnsmUo4/UBPlP7kg0YkezcxT+N5raQNDuF3
 cRTHKiqfydxGpwGiTCPP8WRxFqbkbXRiTEPoPonkOaPPMctetrQMGxuywaLgeHuP
 gv5nmDHkNzD3jZZiKtz0nKdK1KiJ2eqsutER7JSmotmZJH1NfE0Ba2HuwWxFvoj3
 uBLJnfg7pWUWIwLKW9CcF8T0AGijfzqUMnKTSNbLsdgqW+7LgosoznO4S6lUNGDu
 +G/8FOY2rcdf3A+LvhNzDEOpkga6aopq7g45qL9Faof8SSze67RqDK6n
 =3W1k
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-fixes-for-5.11-20210127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2021-01-27

The patch is by Dan Carpenter and fixes a potential information leak in
can_fill_info().

* tag 'linux-can-fixes-for-5.11-20210127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
  can: dev: prevent potential information leak in can_fill_info()
====================

Link: https://lore.kernel.org/r/20210127094028.2778793-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2021-01-27 17:51:45 -08:00
commit 45a8146481

View file

@ -1163,7 +1163,7 @@ static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)
{
struct can_priv *priv = netdev_priv(dev);
struct can_ctrlmode cm = {.flags = priv->ctrlmode};
struct can_berr_counter bec;
struct can_berr_counter bec = { };
enum can_state state = priv->state;
if (priv->do_get_state)