]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jun 2020 13:00:27 +0000 (15:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jun 2020 13:00:27 +0000 (15:00 +0200)
added patches:
netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch
netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch
netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch
revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch

queue-5.6/netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch [new file with mode: 0644]
queue-5.6/netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch [new file with mode: 0644]
queue-5.6/netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch [new file with mode: 0644]
queue-5.6/revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch [new file with mode: 0644]
queue-5.6/series

diff --git a/queue-5.6/netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch b/queue-5.6/netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch
new file mode 100644 (file)
index 0000000..ea16d66
--- /dev/null
@@ -0,0 +1,36 @@
+From 94945ad2b330207cded0fd8d4abebde43a776dfb Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Wed, 27 May 2020 12:17:34 +0200
+Subject: netfilter: conntrack: comparison of unsigned in cthelper confirmation
+
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+
+commit 94945ad2b330207cded0fd8d4abebde43a776dfb upstream.
+
+net/netfilter/nf_conntrack_core.c: In function nf_confirm_cthelper:
+net/netfilter/nf_conntrack_core.c:2117:15: warning: comparison of unsigned expression in < 0 is always false [-Wtype-limits]
+ 2117 |   if (protoff < 0 || (frag_off & htons(~0x7)) != 0)
+      |               ^
+
+ipv6_skip_exthdr() returns a signed integer.
+
+Reported-by: Colin Ian King <colin.king@canonical.com>
+Fixes: 703acd70f249 ("netfilter: nfnetlink_cthelper: unbreak userspace helper support")
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nf_conntrack_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/netfilter/nf_conntrack_core.c
++++ b/net/netfilter/nf_conntrack_core.c
+@@ -2090,7 +2090,7 @@ static int nf_confirm_cthelper(struct sk
+ {
+       const struct nf_conntrack_helper *helper;
+       const struct nf_conn_help *help;
+-      unsigned int protoff;
++      int protoff;
+       help = nfct_help(ct);
+       if (!help)
diff --git a/queue-5.6/netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch b/queue-5.6/netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch
new file mode 100644 (file)
index 0000000..49eda2c
--- /dev/null
@@ -0,0 +1,64 @@
+From 46c1e0621a72e0469ec4edfdb6ed4d387ec34f8a Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Wed, 27 May 2020 01:10:39 -0700
+Subject: netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update
+
+From: Nathan Chancellor <natechancellor@gmail.com>
+
+commit 46c1e0621a72e0469ec4edfdb6ed4d387ec34f8a upstream.
+
+Clang warns:
+
+net/netfilter/nf_conntrack_core.c:2068:21: warning: variable 'ctinfo' is
+uninitialized when used here [-Wuninitialized]
+        nf_ct_set(skb, ct, ctinfo);
+                           ^~~~~~
+net/netfilter/nf_conntrack_core.c:2024:2: note: variable 'ctinfo' is
+declared here
+        enum ip_conntrack_info ctinfo;
+        ^
+1 warning generated.
+
+nf_conntrack_update was split up into nf_conntrack_update and
+__nf_conntrack_update, where the assignment of ctinfo is in
+nf_conntrack_update but it is used in __nf_conntrack_update.
+
+Pass the value of ctinfo from nf_conntrack_update to
+__nf_conntrack_update so that uninitialized memory is not used
+and everything works properly.
+
+Fixes: ee04805ff54a ("netfilter: conntrack: make conntrack userspace helpers work again")
+Link: https://github.com/ClangBuiltLinux/linux/issues/1039
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nf_conntrack_core.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/net/netfilter/nf_conntrack_core.c
++++ b/net/netfilter/nf_conntrack_core.c
+@@ -2015,11 +2015,11 @@ static void nf_conntrack_attach(struct s
+ }
+ static int __nf_conntrack_update(struct net *net, struct sk_buff *skb,
+-                               struct nf_conn *ct)
++                               struct nf_conn *ct,
++                               enum ip_conntrack_info ctinfo)
+ {
+       struct nf_conntrack_tuple_hash *h;
+       struct nf_conntrack_tuple tuple;
+-      enum ip_conntrack_info ctinfo;
+       struct nf_nat_hook *nat_hook;
+       unsigned int status;
+       int dataoff;
+@@ -2144,7 +2144,7 @@ static int nf_conntrack_update(struct ne
+               return 0;
+       if (!nf_ct_is_confirmed(ct)) {
+-              err = __nf_conntrack_update(net, skb, ct);
++              err = __nf_conntrack_update(net, skb, ct, ctinfo);
+               if (err < 0)
+                       return err;
+       }
diff --git a/queue-5.6/netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch b/queue-5.6/netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch
new file mode 100644 (file)
index 0000000..254c682
--- /dev/null
@@ -0,0 +1,45 @@
+From 4946ea5c1237036155c3b3a24f049fd5f849f8f6 Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Wed, 27 May 2020 12:24:10 +0200
+Subject: netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
+
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+
+commit 4946ea5c1237036155c3b3a24f049fd5f849f8f6 upstream.
+
+>> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
+extern const char *const pptp_msg_name(u_int16_t msg);
+^~~~~~
+
+Reported-by: kbuild test robot <lkp@intel.com>
+Fixes: 4c559f15efcc ("netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code")
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/netfilter/nf_conntrack_pptp.h |    2 +-
+ net/netfilter/nf_conntrack_pptp.c           |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/include/linux/netfilter/nf_conntrack_pptp.h
++++ b/include/linux/netfilter/nf_conntrack_pptp.h
+@@ -10,7 +10,7 @@
+ #include <net/netfilter/nf_conntrack_expect.h>
+ #include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
+-extern const char *const pptp_msg_name(u_int16_t msg);
++const char *pptp_msg_name(u_int16_t msg);
+ /* state of the control session */
+ enum pptp_ctrlsess_state {
+--- a/net/netfilter/nf_conntrack_pptp.c
++++ b/net/netfilter/nf_conntrack_pptp.c
+@@ -91,7 +91,7 @@ static const char *const pptp_msg_name_a
+       [PPTP_SET_LINK_INFO]            = "SET_LINK_INFO"
+ };
+-const char *const pptp_msg_name(u_int16_t msg)
++const char *pptp_msg_name(u_int16_t msg)
+ {
+       if (msg > PPTP_MSG_MAX)
+               return pptp_msg_name_array[0];
diff --git a/queue-5.6/revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch b/queue-5.6/revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch
new file mode 100644 (file)
index 0000000..cc34e96
--- /dev/null
@@ -0,0 +1,41 @@
+From f4dec2d6160976b14e54be9c3950ce0f52385741 Mon Sep 17 00:00:00 2001
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Date: Mon, 27 Apr 2020 18:06:02 -0700
+Subject: Revert "Input: i8042 - add ThinkPad S230u to i8042 nomux list"
+
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+
+commit f4dec2d6160976b14e54be9c3950ce0f52385741 upstream.
+
+This reverts commit 18931506465a762ffd3f4803d36a18d336a67da9. From Kevin
+Locke:
+
+"... nomux only appeared to fix the issue because the controller
+continued working after warm reboots. After more thorough testing from
+both warm and cold start, I now believe the entry should be added to
+i8042_dmi_reset_table rather than i8042_dmi_nomux_table as i8042.reset=1
+alone is sufficient to avoid the issue from both states while
+i8042.nomux is not."
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h |    7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -541,13 +541,6 @@ static const struct dmi_system_id __init
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
+               },
+       },
+-      {
+-              /* Lenovo ThinkPad Twist S230u */
+-              .matches = {
+-                      DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+-                      DMI_MATCH(DMI_PRODUCT_NAME, "33474HU"),
+-              },
+-      },
+       { }
+ };
index adeb5b1c9162e1e0d8aa282d7b2e74fb873ed777..5b9ed80f656086329739312994207e3632b5af06 100644 (file)
@@ -171,3 +171,7 @@ ipv4-nexthop-version-of-fib_info_nh_uses_dev.patch
 net-dsa-declare-lockless-tx-feature-for-slave-ports.patch
 bonding-fix-reference-count-leak-in-bond_sysfs_slave_add.patch
 powerpc-bpf-enable-bpf_probe_read-str-on-powerpc-again.patch
+revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch
+netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch
+netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch
+netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch