linux-can-fixes-for-5.11-20210113

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAl//Y3QTHG1rbEBwZW5n
 dXRyb25peC5kZQAKCRCpyVqK+u3vqR52CACSt3kU1AySJTY9QhNqnxpxyOcrte50
 6eFa2rNGpvZzSACh/OUb85jR0dIwAakvLmAkLmwn2zn4HQH/b9UapBPBf8HbVch5
 Mm748XF6LzWNjRgJZEVkn1SV7MiKlvL3Q05HrjH4SsugIjT+LX257JoUrDRbdlgV
 cGI4urUAtm9ap34QH7ngijnV8DTGAbSycmtptDNxRkKUG1WWg9F28p3mbrphVl5q
 13biWoKequCbF30LRf5X2g8lbVny64SnVyFsiqX1fiioXY6CuogBWXYpmzT46X+H
 zi0WoKf36+fh6rSdSTNKza46Ja5ndI9Tw2wZwMGSh2PQnRfFI4VcVwx3
 =wBY+
 -----END PGP SIGNATURE-----

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

Marc Kleine-Budde says:

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

The first patch is by Oliver Hartkopp for the CAn ISO-TP protocol and fixes a
kernel information leak to userspace.

The last patch is by Qinglang Miao for the mcp251xfd driver and fixes a NULL
pointer check to work on the correct variable.

* tag 'linux-can-fixes-for-5.11-20210113' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
  can: mcp251xfd: mcp251xfd_handle_rxif_one(): fix wrong NULL pointer check
  can: isotp: isotp_getname(): fix kernel information leak
====================

Link: https://lore.kernel.org/r/20210113212158.925513-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2021-01-13 19:00:49 -08:00
commit 7b25339f4e
2 changed files with 2 additions and 1 deletions

View File

@ -1491,7 +1491,7 @@ mcp251xfd_handle_rxif_one(struct mcp251xfd_priv *priv,
else
skb = alloc_can_skb(priv->ndev, (struct can_frame **)&cfd);
if (!cfd) {
if (!skb) {
stats->rx_dropped++;
return 0;
}

View File

@ -1155,6 +1155,7 @@ static int isotp_getname(struct socket *sock, struct sockaddr *uaddr, int peer)
if (peer)
return -EOPNOTSUPP;
memset(addr, 0, sizeof(*addr));
addr->can_family = AF_CAN;
addr->can_ifindex = so->ifindex;
addr->can_addr.tp.rx_id = so->rxid;