]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 12:19:28 +0000 (14:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 12:19:28 +0000 (14:19 +0200)
added patches:
bluetooth-fix-faulty-expression-for-minimum-encryption-key-size-check.patch
um-compile-with-modern-headers.patch

queue-4.4/bluetooth-fix-faulty-expression-for-minimum-encryption-key-size-check.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/um-compile-with-modern-headers.patch [new file with mode: 0644]

diff --git a/queue-4.4/bluetooth-fix-faulty-expression-for-minimum-encryption-key-size-check.patch b/queue-4.4/bluetooth-fix-faulty-expression-for-minimum-encryption-key-size-check.patch
new file mode 100644 (file)
index 0000000..9a2772b
--- /dev/null
@@ -0,0 +1,38 @@
+From eca94432934fe5f141d084f2e36ee2c0e614cc04 Mon Sep 17 00:00:00 2001
+From: Matias Karhumaa <matias.karhumaa@gmail.com>
+Date: Tue, 2 Jul 2019 16:35:09 +0200
+Subject: Bluetooth: Fix faulty expression for minimum encryption key size check
+
+From: Matias Karhumaa <matias.karhumaa@gmail.com>
+
+commit eca94432934fe5f141d084f2e36ee2c0e614cc04 upstream.
+
+Fix minimum encryption key size check so that HCI_MIN_ENC_KEY_SIZE is
+also allowed as stated in the comment.
+
+This bug caused connection problems with devices having maximum
+encryption key size of 7 octets (56-bit).
+
+Fixes: 693cd8ce3f88 ("Bluetooth: Fix regression with minimum encryption key size alignment")
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203997
+Signed-off-by: Matias Karhumaa <matias.karhumaa@gmail.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/bluetooth/l2cap_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/bluetooth/l2cap_core.c
++++ b/net/bluetooth/l2cap_core.c
+@@ -1341,7 +1341,7 @@ static bool l2cap_check_enc_key_size(str
+        * actually encrypted before enforcing a key size.
+        */
+       return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
+-              hcon->enc_key_size > HCI_MIN_ENC_KEY_SIZE);
++              hcon->enc_key_size >= HCI_MIN_ENC_KEY_SIZE);
+ }
+ static void l2cap_do_start(struct l2cap_chan *chan)
index 95a6425de43bec1660e8822bb6aef22ea3384b26..0bdcfe35ecc044878fc46eb303faf8456e3f954e 100644 (file)
@@ -44,3 +44,5 @@ team-always-enable-vlan-tx-offload.patch
 ipv4-use-return-value-of-inet_iif-for-__raw_v4_lookup-in-the-while-loop.patch
 bonding-always-enable-vlan-tx-offload.patch
 net-check-before-dereferencing-netdev_ops-during-busy-poll.patch
+bluetooth-fix-faulty-expression-for-minimum-encryption-key-size-check.patch
+um-compile-with-modern-headers.patch
diff --git a/queue-4.4/um-compile-with-modern-headers.patch b/queue-4.4/um-compile-with-modern-headers.patch
new file mode 100644 (file)
index 0000000..134967f
--- /dev/null
@@ -0,0 +1,56 @@
+From 530ba6c7cb3c22435a4d26de47037bb6f86a5329 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Thu, 14 Dec 2017 03:23:37 +0100
+Subject: um: Compile with modern headers
+
+From: Jason A. Donenfeld <Jason@zx2c4.com>
+
+commit 530ba6c7cb3c22435a4d26de47037bb6f86a5329 upstream.
+
+Recent libcs have gotten a bit more strict, so we actually need to
+include the right headers and use the right types. This enables UML to
+compile again.
+
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Alessio Balsini <balsini@android.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/um/os-Linux/file.c   |    1 +
+ arch/um/os-Linux/signal.c |    2 ++
+ arch/x86/um/stub_segv.c   |    1 +
+ 3 files changed, 4 insertions(+)
+
+--- a/arch/um/os-Linux/file.c
++++ b/arch/um/os-Linux/file.c
+@@ -12,6 +12,7 @@
+ #include <sys/mount.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/un.h>
+ #include <sys/types.h>
+ #include <os.h>
+--- a/arch/um/os-Linux/signal.c
++++ b/arch/um/os-Linux/signal.c
+@@ -14,7 +14,9 @@
+ #include <as-layout.h>
+ #include <kern_util.h>
+ #include <os.h>
++#include <sys/ucontext.h>
+ #include <sysdep/mcontext.h>
++#include <um_malloc.h>
+ void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
+       [SIGTRAP]       = relay_signal,
+--- a/arch/x86/um/stub_segv.c
++++ b/arch/x86/um/stub_segv.c
+@@ -6,6 +6,7 @@
+ #include <sysdep/stub.h>
+ #include <sysdep/faultinfo.h>
+ #include <sysdep/mcontext.h>
++#include <sys/ucontext.h>
+ void __attribute__ ((__section__ (".__syscall_stub")))
+ stub_segv_handler(int sig, siginfo_t *info, void *p)