]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jul 2020 12:58:28 +0000 (14:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jul 2020 12:58:28 +0000 (14:58 +0200)
added patches:
revert-cifs-fix-the-target-file-was-deleted-when-rename-failed.patch
staging-wlan-ng-properly-check-endpoint-types.patch

queue-4.4/revert-cifs-fix-the-target-file-was-deleted-when-rename-failed.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/staging-wlan-ng-properly-check-endpoint-types.patch [new file with mode: 0644]
queue-4.4/x86-math-emu-fix-up-cmp-insn-for-clang-ias.patch

diff --git a/queue-4.4/revert-cifs-fix-the-target-file-was-deleted-when-rename-failed.patch b/queue-4.4/revert-cifs-fix-the-target-file-was-deleted-when-rename-failed.patch
new file mode 100644 (file)
index 0000000..f9cf013
--- /dev/null
@@ -0,0 +1,58 @@
+From 0e6705182d4e1b77248a93470d6d7b3013d59b30 Mon Sep 17 00:00:00 2001
+From: Steve French <stfrench@microsoft.com>
+Date: Thu, 23 Jul 2020 14:41:29 -0500
+Subject: Revert "cifs: Fix the target file was deleted when rename failed."
+
+From: Steve French <stfrench@microsoft.com>
+
+commit 0e6705182d4e1b77248a93470d6d7b3013d59b30 upstream.
+
+This reverts commit 9ffad9263b467efd8f8dc7ae1941a0a655a2bab2.
+
+Upon additional testing with older servers, it was found that
+the original commit introduced a regression when using the old SMB1
+dialect and rsyncing over an existing file.
+
+The patch will need to be respun to address this, likely including
+a larger refactoring of the SMB1 and SMB3 rename code paths to make
+it less confusing and also to address some additional rename error
+cases that SMB3 may be able to workaround.
+
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Reported-by: Patrick Fernie <patrick.fernie@gmail.com>
+CC: Stable <stable@vger.kernel.org>
+Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
+Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
+Acked-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/inode.c |   10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+--- a/fs/cifs/inode.c
++++ b/fs/cifs/inode.c
+@@ -1737,7 +1737,6 @@ cifs_rename2(struct inode *source_dir, s
+       FILE_UNIX_BASIC_INFO *info_buf_target;
+       unsigned int xid;
+       int rc, tmprc;
+-      bool new_target = d_really_is_negative(target_dentry);
+       if (flags & ~RENAME_NOREPLACE)
+               return -EINVAL;
+@@ -1814,13 +1813,8 @@ cifs_rename2(struct inode *source_dir, s
+        */
+ unlink_target:
+-      /*
+-       * If the target dentry was created during the rename, try
+-       * unlinking it if it's not negative
+-       */
+-      if (new_target &&
+-          d_really_is_positive(target_dentry) &&
+-          (rc == -EACCES || rc == -EEXIST)) {
++      /* Try unlinking the target dentry if it's not negative */
++      if (d_really_is_positive(target_dentry) && (rc == -EACCES || rc == -EEXIST)) {
+               if (d_is_dir(target_dentry))
+                       tmprc = cifs_rmdir(target_dir, target_dentry);
+               else
index a49273da3f43ac5ca54b8b1145fd2a6687162e88..08f932c02f1f18953f5668c44610642c570b49da 100644 (file)
@@ -23,3 +23,5 @@ regmap-dev_get_regmap_match-fix-string-comparison.patch
 usb-gadget-udc-gr_udc-fix-memleak-on-error-handling-.patch
 arm64-use-test_tsk_thread_flag-for-checking-tif_sing.patch
 x86-math-emu-fix-up-cmp-insn-for-clang-ias.patch
+revert-cifs-fix-the-target-file-was-deleted-when-rename-failed.patch
+staging-wlan-ng-properly-check-endpoint-types.patch
diff --git a/queue-4.4/staging-wlan-ng-properly-check-endpoint-types.patch b/queue-4.4/staging-wlan-ng-properly-check-endpoint-types.patch
new file mode 100644 (file)
index 0000000..d75d40f
--- /dev/null
@@ -0,0 +1,52 @@
+From faaff9765664009c1c7c65551d32e9ed3b1dda8f Mon Sep 17 00:00:00 2001
+From: Rustam Kovhaev <rkovhaev@gmail.com>
+Date: Wed, 22 Jul 2020 09:10:52 -0700
+Subject: staging: wlan-ng: properly check endpoint types
+
+From: Rustam Kovhaev <rkovhaev@gmail.com>
+
+commit faaff9765664009c1c7c65551d32e9ed3b1dda8f upstream.
+
+As syzkaller detected, wlan-ng driver does not do sanity check of
+endpoints in prism2sta_probe_usb(), add check for xfer direction and type
+
+Reported-and-tested-by: syzbot+c2a1fa67c02faa0de723@syzkaller.appspotmail.com
+Link: https://syzkaller.appspot.com/bug?extid=c2a1fa67c02faa0de723
+Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200722161052.999754-1-rkovhaev@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/wlan-ng/prism2usb.c |   16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/drivers/staging/wlan-ng/prism2usb.c
++++ b/drivers/staging/wlan-ng/prism2usb.c
+@@ -60,11 +60,25 @@ static int prism2sta_probe_usb(struct us
+                              const struct usb_device_id *id)
+ {
+       struct usb_device *dev;
+-
++      const struct usb_endpoint_descriptor *epd;
++      const struct usb_host_interface *iface_desc = interface->cur_altsetting;
+       wlandevice_t *wlandev = NULL;
+       hfa384x_t *hw = NULL;
+       int result = 0;
++      if (iface_desc->desc.bNumEndpoints != 2) {
++              result = -ENODEV;
++              goto failed;
++      }
++
++      result = -EINVAL;
++      epd = &iface_desc->endpoint[1].desc;
++      if (!usb_endpoint_is_bulk_in(epd))
++              goto failed;
++      epd = &iface_desc->endpoint[2].desc;
++      if (!usb_endpoint_is_bulk_out(epd))
++              goto failed;
++
+       dev = interface_to_usbdev(interface);
+       wlandev = create_wlan();
+       if (wlandev == NULL) {
index baac02600f8197e58779848adbb3b8ff0c76b929..1353589c09bb9aa4463c2dbf64c8f8cd47d94d03 100644 (file)
@@ -22,11 +22,9 @@ Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
 Link: https://lkml.kernel.org/r/20200527135352.1198078-1-arnd@arndb.de
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- arch/x86/math-emu/wm_sqrt.S | 2 +-
+ arch/x86/math-emu/wm_sqrt.S |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/arch/x86/math-emu/wm_sqrt.S b/arch/x86/math-emu/wm_sqrt.S
-index d258f59564e11..3b40c98bbbd40 100644
 --- a/arch/x86/math-emu/wm_sqrt.S
 +++ b/arch/x86/math-emu/wm_sqrt.S
 @@ -208,7 +208,7 @@ sqrt_stage_2_finish:
@@ -38,6 +36,3 @@ index d258f59564e11..3b40c98bbbd40 100644
        jnz     sqrt_stage_2_error
  #endif /* PARANOID */
  
--- 
-2.25.1
-