[linux] 02/02: virtio-net: drop NETIF_F_FRAGLIST (CVE-2015-5156)
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Wed Sep 9 20:20:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch wheezy-security
in repository linux.
commit 00ab6795a3dc66f6ec6066498487a3f94b078996
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Wed Sep 9 21:15:47 2015 +0100
virtio-net: drop NETIF_F_FRAGLIST (CVE-2015-5156)
---
debian/changelog | 1 +
.../all/virtio-net-drop-netif_f_fraglist.patch | 36 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 38 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f9a2c6d..6ed94a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
linux (3.2.68-1+deb7u4) UNRELEASED; urgency=medium
* ipv6: addrconf: validate new MTU before applying it (CVE-2015-0272)
+ * virtio-net: drop NETIF_F_FRAGLIST (CVE-2015-5156)
-- Ben Hutchings <ben at decadent.org.uk> Fri, 07 Aug 2015 19:47:24 +0100
diff --git a/debian/patches/bugfix/all/virtio-net-drop-netif_f_fraglist.patch b/debian/patches/bugfix/all/virtio-net-drop-netif_f_fraglist.patch
new file mode 100644
index 0000000..d4eb8bd
--- /dev/null
+++ b/debian/patches/bugfix/all/virtio-net-drop-netif_f_fraglist.patch
@@ -0,0 +1,36 @@
+From: Jason Wang <jasowang at redhat.com>
+Date: Wed, 5 Aug 2015 10:34:04 +0800
+Subject: virtio-net: drop NETIF_F_FRAGLIST
+Origin: https://git.kernel.org/linus/48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
+
+virtio declares support for NETIF_F_FRAGLIST, but assumes
+that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
+always true with a fraglist.
+
+A longer fraglist in the skb will make the call to skb_to_sgvec overflow
+the sg array, leading to memory corruption.
+
+Drop NETIF_F_FRAGLIST so we only get what we can handle.
+
+Cc: Michael S. Tsirkin <mst at redhat.com>
+Signed-off-by: Jason Wang <jasowang at redhat.com>
+Acked-by: Michael S. Tsirkin <mst at redhat.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/virtio_net.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -981,9 +981,9 @@ static int virtnet_probe(struct virtio_d
+ /* Do we support "hardware" checksums? */
+ if (virtio_has_feature(vdev, VIRTIO_NET_F_CSUM)) {
+ /* This opens up the world of extra features. */
+- dev->hw_features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
++ dev->hw_features |= NETIF_F_HW_CSUM | NETIF_F_SG;
+ if (csum)
+- dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
++ dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
+
+ if (virtio_has_feature(vdev, VIRTIO_NET_F_GSO)) {
+ dev->hw_features |= NETIF_F_TSO | NETIF_F_UFO
diff --git a/debian/patches/series b/debian/patches/series
index 01cef26..b32effc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1176,3 +1176,4 @@ bugfix/x86/x86-bpf_jit-fix-compilation-of-large-bpf-programs.patch
bugfix/all/sg_start_req-make-sure-that-there-s-not-too-many-ele.patch
bugfix/all/md-use-kzalloc-when-bitmap-is-disabled.patch
bugfix/all/ipv6-addrconf-validate-new-MTU-before-applying-it.patch
+bugfix/all/virtio-net-drop-netif_f_fraglist.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list