]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jun 2015 04:24:02 +0000 (21:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jun 2015 04:24:02 +0000 (21:24 -0700)
added patches:
ath3k-add-support-of-0489-e076-ar3012-device.patch
ath3k-add-support-of-13d3-3474-ar3012-device.patch
pipe-iovec-fix-memory-corruption-when-retrying-atomi-3.14.patch

queue-3.14/ath3k-add-support-of-0489-e076-ar3012-device.patch [new file with mode: 0644]
queue-3.14/ath3k-add-support-of-13d3-3474-ar3012-device.patch [new file with mode: 0644]
queue-3.14/pipe-iovec-fix-memory-corruption-when-retrying-atomi-3.14.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/ath3k-add-support-of-0489-e076-ar3012-device.patch b/queue-3.14/ath3k-add-support-of-0489-e076-ar3012-device.patch
new file mode 100644 (file)
index 0000000..c15f156
--- /dev/null
@@ -0,0 +1,79 @@
+From 692c062e7c282164fd7cda68077f79dafd176eaf Mon Sep 17 00:00:00 2001
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+Date: Sat, 6 Jun 2015 20:25:40 +0300
+Subject: ath3k: Add support of 0489:e076 AR3012 device
+
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+
+commit 692c062e7c282164fd7cda68077f79dafd176eaf upstream.
+
+BugLink: https://bugs.launchpad.net/bugs/1462614
+
+This device requires new firmware files
+ AthrBT_0x11020100.dfu and ramps_0x11020100_40.dfu added to
+/lib/firmware/ar3k/ that are not included in linux-firmware yet.
+
+T: Bus=03 Lev=01 Prnt=01 Port=09 Cnt=06 Dev#= 7 Spd=12 MxCh= 0
+D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
+P: Vendor=0489 ProdID=e076 Rev= 0.01
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
+E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
+I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
+I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
+I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
+I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
+I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
+
+Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/ath3k.c |    2 ++
+ drivers/bluetooth/btusb.c |    1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/ath3k.c
++++ b/drivers/bluetooth/ath3k.c
+@@ -79,6 +79,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x0489, 0xe057) },
+       { USB_DEVICE(0x0489, 0xe056) },
+       { USB_DEVICE(0x0489, 0xe05f) },
++      { USB_DEVICE(0x0489, 0xe076) },
+       { USB_DEVICE(0x0489, 0xe078) },
+       { USB_DEVICE(0x04c5, 0x1330) },
+       { USB_DEVICE(0x04CA, 0x3004) },
+@@ -133,6 +134,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -157,6 +157,7 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
diff --git a/queue-3.14/ath3k-add-support-of-13d3-3474-ar3012-device.patch b/queue-3.14/ath3k-add-support-of-13d3-3474-ar3012-device.patch
new file mode 100644 (file)
index 0000000..de435e5
--- /dev/null
@@ -0,0 +1,59 @@
+From 0d0cef6183aec0fb6d0c9f00a09ff51ee086bbe2 Mon Sep 17 00:00:00 2001
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+Date: Sat, 6 Jun 2015 20:29:25 +0300
+Subject: ath3k: add support of 13d3:3474 AR3012 device
+
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+
+commit 0d0cef6183aec0fb6d0c9f00a09ff51ee086bbe2 upstream.
+
+BugLink: https://bugs.launchpad.net/bugs/1427680
+
+This device requires new firmware files
+ AthrBT_0x11020100.dfu and ramps_0x11020100_40.dfu added to
+/lib/firmware/ar3k/ that are not included in linux-firmware yet.
+
+T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
+D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
+P: Vendor=13d3 ProdID=3474 Rev=00.01
+C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
+I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+
+Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/ath3k.c |    2 ++
+ drivers/bluetooth/btusb.c |    1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/ath3k.c
++++ b/drivers/bluetooth/ath3k.c
+@@ -110,6 +110,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x13d3, 0x3402) },
+       { USB_DEVICE(0x13d3, 0x3408) },
+       { USB_DEVICE(0x13d3, 0x3432) },
++      { USB_DEVICE(0x13d3, 0x3474) },
+       /* Atheros AR5BBU12 with sflash firmware */
+       { USB_DEVICE(0x0489, 0xE02C) },
+@@ -165,6 +166,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
+       /* Atheros AR5BBU22 with sflash firmware */
+       { USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -188,6 +188,7 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
+       /* Atheros AR5BBU12 with sflash firmware */
+       { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
diff --git a/queue-3.14/pipe-iovec-fix-memory-corruption-when-retrying-atomi-3.14.patch b/queue-3.14/pipe-iovec-fix-memory-corruption-when-retrying-atomi-3.14.patch
new file mode 100644 (file)
index 0000000..855fae9
--- /dev/null
@@ -0,0 +1,180 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Tue, 16 Jun 2015 22:11:06 +0100
+Subject: pipe: iovec: Fix memory corruption when retrying atomic copy
+ as non-atomic
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+pipe_iov_copy_{from,to}_user() may be tried twice with the same iovec,
+the first time atomically and the second time not.  The second attempt
+needs to continue from the iovec position, pipe buffer offset and
+remaining length where the first attempt failed, but currently the
+pipe buffer offset and remaining length are reset.  This will corrupt
+the piped data (possibly also leading to an information leak between
+processes) and may also corrupt kernel memory.
+
+This was fixed upstream by commits f0d1bec9d58d ("new helper:
+copy_page_from_iter()") and 637b58c2887e ("switch pipe_read() to
+copy_page_to_iter()"), but those aren't suitable for stable.  This fix
+for older kernel versions was made by Seth Jennings for RHEL and I
+have extracted it from their update.
+
+CVE-2015-1805
+
+References: https://bugzilla.redhat.com/show_bug.cgi?id=1202855
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/pipe.c |   55 ++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 32 insertions(+), 23 deletions(-)
+
+--- a/fs/pipe.c
++++ b/fs/pipe.c
+@@ -117,25 +117,27 @@ void pipe_wait(struct pipe_inode_info *p
+ }
+ static int
+-pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len,
+-                      int atomic)
++pipe_iov_copy_from_user(void *addr, int *offset, struct iovec *iov,
++                      size_t *remaining, int atomic)
+ {
+       unsigned long copy;
+-      while (len > 0) {
++      while (*remaining > 0) {
+               while (!iov->iov_len)
+                       iov++;
+-              copy = min_t(unsigned long, len, iov->iov_len);
++              copy = min_t(unsigned long, *remaining, iov->iov_len);
+               if (atomic) {
+-                      if (__copy_from_user_inatomic(to, iov->iov_base, copy))
++                      if (__copy_from_user_inatomic(addr + *offset,
++                                                    iov->iov_base, copy))
+                               return -EFAULT;
+               } else {
+-                      if (copy_from_user(to, iov->iov_base, copy))
++                      if (copy_from_user(addr + *offset,
++                                         iov->iov_base, copy))
+                               return -EFAULT;
+               }
+-              to += copy;
+-              len -= copy;
++              *offset += copy;
++              *remaining -= copy;
+               iov->iov_base += copy;
+               iov->iov_len -= copy;
+       }
+@@ -143,25 +145,27 @@ pipe_iov_copy_from_user(void *to, struct
+ }
+ static int
+-pipe_iov_copy_to_user(struct iovec *iov, const void *from, unsigned long len,
+-                    int atomic)
++pipe_iov_copy_to_user(struct iovec *iov, void *addr, int *offset,
++                    size_t *remaining, int atomic)
+ {
+       unsigned long copy;
+-      while (len > 0) {
++      while (*remaining > 0) {
+               while (!iov->iov_len)
+                       iov++;
+-              copy = min_t(unsigned long, len, iov->iov_len);
++              copy = min_t(unsigned long, *remaining, iov->iov_len);
+               if (atomic) {
+-                      if (__copy_to_user_inatomic(iov->iov_base, from, copy))
++                      if (__copy_to_user_inatomic(iov->iov_base,
++                                                  addr + *offset, copy))
+                               return -EFAULT;
+               } else {
+-                      if (copy_to_user(iov->iov_base, from, copy))
++                      if (copy_to_user(iov->iov_base,
++                                       addr + *offset, copy))
+                               return -EFAULT;
+               }
+-              from += copy;
+-              len -= copy;
++              *offset += copy;
++              *remaining -= copy;
+               iov->iov_base += copy;
+               iov->iov_len -= copy;
+       }
+@@ -395,7 +399,7 @@ pipe_read(struct kiocb *iocb, const stru
+                       struct pipe_buffer *buf = pipe->bufs + curbuf;
+                       const struct pipe_buf_operations *ops = buf->ops;
+                       void *addr;
+-                      size_t chars = buf->len;
++                      size_t chars = buf->len, remaining;
+                       int error, atomic;
+                       if (chars > total_len)
+@@ -409,9 +413,11 @@ pipe_read(struct kiocb *iocb, const stru
+                       }
+                       atomic = !iov_fault_in_pages_write(iov, chars);
++                      remaining = chars;
+ redo:
+                       addr = ops->map(pipe, buf, atomic);
+-                      error = pipe_iov_copy_to_user(iov, addr + buf->offset, chars, atomic);
++                      error = pipe_iov_copy_to_user(iov, addr, &buf->offset,
++                                                    &remaining, atomic);
+                       ops->unmap(pipe, buf, addr);
+                       if (unlikely(error)) {
+                               /*
+@@ -426,7 +432,6 @@ redo:
+                               break;
+                       }
+                       ret += chars;
+-                      buf->offset += chars;
+                       buf->len -= chars;
+                       /* Was it a packet buffer? Clean up and exit */
+@@ -531,6 +536,7 @@ pipe_write(struct kiocb *iocb, const str
+               if (ops->can_merge && offset + chars <= PAGE_SIZE) {
+                       int error, atomic = 1;
+                       void *addr;
++                      size_t remaining = chars;
+                       error = ops->confirm(pipe, buf);
+                       if (error)
+@@ -539,8 +545,8 @@ pipe_write(struct kiocb *iocb, const str
+                       iov_fault_in_pages_read(iov, chars);
+ redo1:
+                       addr = ops->map(pipe, buf, atomic);
+-                      error = pipe_iov_copy_from_user(offset + addr, iov,
+-                                                      chars, atomic);
++                      error = pipe_iov_copy_from_user(addr, &offset, iov,
++                                                      &remaining, atomic);
+                       ops->unmap(pipe, buf, addr);
+                       ret = error;
+                       do_wakeup = 1;
+@@ -575,6 +581,8 @@ redo1:
+                       struct page *page = pipe->tmp_page;
+                       char *src;
+                       int error, atomic = 1;
++                      int offset = 0;
++                      size_t remaining;
+                       if (!page) {
+                               page = alloc_page(GFP_HIGHUSER);
+@@ -595,14 +603,15 @@ redo1:
+                               chars = total_len;
+                       iov_fault_in_pages_read(iov, chars);
++                      remaining = chars;
+ redo2:
+                       if (atomic)
+                               src = kmap_atomic(page);
+                       else
+                               src = kmap(page);
+-                      error = pipe_iov_copy_from_user(src, iov, chars,
+-                                                      atomic);
++                      error = pipe_iov_copy_from_user(src, &offset, iov,
++                                                      &remaining, atomic);
+                       if (atomic)
+                               kunmap_atomic(src);
+                       else
index 0b1e22d4748913d2e0d5ba7f2a1d7bef48f2a7d3..6b5974403c5fade26ad69a797ac9b802ff3873dd 100644 (file)
@@ -1,3 +1,6 @@
 crypto-caam-fix-rng-buffer-cache-alignment.patch
 tracing-have-filter-check-for-balanced-ops.patch
 drm-mgag200-reject-non-character-cell-aligned-mode-widths.patch
+ath3k-add-support-of-0489-e076-ar3012-device.patch
+ath3k-add-support-of-13d3-3474-ar3012-device.patch
+pipe-iovec-fix-memory-corruption-when-retrying-atomi-3.14.patch