]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 12:12:31 +0000 (14:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 12:12:31 +0000 (14:12 +0200)
added patches:
can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch

queue-4.4/can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch b/queue-4.4/can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch
new file mode 100644 (file)
index 0000000..bdd7095
--- /dev/null
@@ -0,0 +1,54 @@
+From da2311a6385c3b499da2ed5d9be59ce331fa93e9 Mon Sep 17 00:00:00 2001
+From: Xiaolong Huang <butterflyhuangxx@gmail.com>
+Date: Sat, 7 Dec 2019 22:40:24 +0800
+Subject: can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
+
+From: Xiaolong Huang <butterflyhuangxx@gmail.com>
+
+commit da2311a6385c3b499da2ed5d9be59ce331fa93e9 upstream.
+
+Uninitialized Kernel memory can leak to USB devices.
+
+Fix this by using kzalloc() instead of kmalloc().
+
+Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
+Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c")
+Cc: linux-stable <stable@vger.kernel.org> # >= v4.19
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+[bwh: Backported to 4.9: adjust filename, context]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/usb/kvaser_usb.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/can/usb/kvaser_usb.c
++++ b/drivers/net/can/usb/kvaser_usb.c
+@@ -787,7 +787,7 @@ static int kvaser_usb_simple_msg_async(s
+               return -ENOMEM;
+       }
+-      buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC);
++      buf = kzalloc(sizeof(struct kvaser_msg), GFP_ATOMIC);
+       if (!buf) {
+               usb_free_urb(urb);
+               return -ENOMEM;
+@@ -1457,7 +1457,7 @@ static int kvaser_usb_set_opt_mode(const
+       struct kvaser_msg *msg;
+       int rc;
+-      msg = kmalloc(sizeof(*msg), GFP_KERNEL);
++      msg = kzalloc(sizeof(*msg), GFP_KERNEL);
+       if (!msg)
+               return -ENOMEM;
+@@ -1590,7 +1590,7 @@ static int kvaser_usb_flush_queue(struct
+       struct kvaser_msg *msg;
+       int rc;
+-      msg = kmalloc(sizeof(*msg), GFP_KERNEL);
++      msg = kzalloc(sizeof(*msg), GFP_KERNEL);
+       if (!msg)
+               return -ENOMEM;
index 9348abf01686f4842d96e5366d9a68e3536be536..ccd1c66f112771dc24e89ea86ccc6abd805073b3 100644 (file)
@@ -42,3 +42,4 @@ ath9k-fix-general-protection-fault-in-ath9k_hif_usb_rx_cb.patch
 smack-slab-out-of-bounds-in-vsscanf.patch
 mm-slub-fix-a-memory-leak-in-sysfs_slab_add.patch
 fat-don-t-allow-to-mount-if-the-fat-length-0.patch
+can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch