From: Greg Kroah-Hartman Date: Mon, 1 Jun 2020 13:00:14 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.4.226~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc88c9073ece56c6517908e92546a44f9eed7557;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches 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 --- diff --git a/queue-5.4/netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch b/queue-5.4/netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch new file mode 100644 index 00000000000..278328bcf66 --- /dev/null +++ b/queue-5.4/netfilter-conntrack-comparison-of-unsigned-in-cthelper-confirmation.patch @@ -0,0 +1,36 @@ +From 94945ad2b330207cded0fd8d4abebde43a776dfb Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Wed, 27 May 2020 12:17:34 +0200 +Subject: netfilter: conntrack: comparison of unsigned in cthelper confirmation + +From: Pablo Neira Ayuso + +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 +Fixes: 703acd70f249 ("netfilter: nfnetlink_cthelper: unbreak userspace helper support") +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1955,7 +1955,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.4/netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch b/queue-5.4/netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch new file mode 100644 index 00000000000..9e7d739eaaf --- /dev/null +++ b/queue-5.4/netfilter-conntrack-pass-value-of-ctinfo-to-__nf_conntrack_update.patch @@ -0,0 +1,64 @@ +From 46c1e0621a72e0469ec4edfdb6ed4d387ec34f8a Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Wed, 27 May 2020 01:10:39 -0700 +Subject: netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update + +From: Nathan Chancellor + +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 +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1880,11 +1880,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; +@@ -2009,7 +2009,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.4/netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch b/queue-5.4/netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch new file mode 100644 index 00000000000..254c6828972 --- /dev/null +++ b/queue-5.4/netfilter-nf_conntrack_pptp-fix-compilation-warning-with-w-1-build.patch @@ -0,0 +1,45 @@ +From 4946ea5c1237036155c3b3a24f049fd5f849f8f6 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +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 + +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 +Fixes: 4c559f15efcc ("netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code") +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman + +--- + 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 + #include + +-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.4/revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch b/queue-5.4/revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch new file mode 100644 index 00000000000..cc34e963b5e --- /dev/null +++ b/queue-5.4/revert-input-i8042-add-thinkpad-s230u-to-i8042-nomux-list.patch @@ -0,0 +1,41 @@ +From f4dec2d6160976b14e54be9c3950ce0f52385741 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Mon, 27 Apr 2020 18:06:02 -0700 +Subject: Revert "Input: i8042 - add ThinkPad S230u to i8042 nomux list" + +From: Dmitry Torokhov + +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 + +--- + 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"), +- }, +- }, + { } + }; + diff --git a/queue-5.4/series b/queue-5.4/series index c4e27b3d75b..1662207c804 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -135,3 +135,7 @@ nexthop-expand-nexthop_is_multipath-in-a-few-places.patch 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 +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