From: Greg Kroah-Hartman Date: Mon, 11 Jan 2021 19:58:51 +0000 (+0100) Subject: drop net-dcb-validate-netlink-message-in-dcb-handler.patch from all queues X-Git-Tag: v4.4.251~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2150f1e0401be073178f6cdfda69e265fb2660c8;p=thirdparty%2Fkernel%2Fstable-queue.git drop net-dcb-validate-netlink-message-in-dcb-handler.patch from all queues --- diff --git a/queue-4.14/net-dcb-validate-netlink-message-in-dcb-handler.patch b/queue-4.14/net-dcb-validate-netlink-message-in-dcb-handler.patch deleted file mode 100644 index d9ff9695567..00000000000 --- a/queue-4.14/net-dcb-validate-netlink-message-in-dcb-handler.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun Jan 10 01:16:11 PM CET 2021 -From: Petr Machata -Date: Tue, 22 Dec 2020 22:49:44 +0100 -Subject: net: dcb: Validate netlink message in DCB handler - -From: Petr Machata - -[ Upstream commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 ] - -DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB -messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have -the CAP_NET_ADMIN capability. - -However, the operation to be performed is not decided from the DCB message -type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for -reading DCB objects, the corresponding SET and DEL commands are used for -manipulation. - -The assumption is that set-like commands will be sent via an RTM_SETDCB -message, and get-like ones via RTM_GETDCB. However, this assumption is not -enforced. - -It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN -capability by sending the corresponding command in an RTM_GETDCB message. -That is a bug. Fix it by validating the type of the request message against -the type used for the response. - -Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") -Signed-off-by: Petr Machata -Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org -Signed-off-by: Jakub Kicinski -Signed-off-by: Greg Kroah-Hartman ---- - net/dcb/dcbnl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/dcb/dcbnl.c -+++ b/net/dcb/dcbnl.c -@@ -1727,6 +1727,8 @@ static int dcb_doit(struct sk_buff *skb, - fn = &reply_funcs[dcb->cmd]; - if (!fn->cb) - return -EOPNOTSUPP; -+ if (fn->type != nlh->nlmsg_type) -+ return -EPERM; - - if (!tb[DCB_ATTR_IFNAME]) - return -EINVAL; diff --git a/queue-4.14/series b/queue-4.14/series index 1eecb1c87ef..49165a0e745 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -9,7 +9,6 @@ ethernet-ucc_geth-set-dev-max_mtu-to-1518.patch atm-idt77252-call-pci_disable_device-on-error-path.patch qede-fix-offload-for-ipip-tunnel-packets.patch virtio_net-fix-recursive-call-to-cpus_read_lock.patch -net-dcb-validate-netlink-message-in-dcb-handler.patch net-ncsi-use-real-net-device-for-response-handler.patch net-ethernet-fix-memleak-in-ethoc_probe.patch net-sysfs-take-the-rtnl-lock-when-storing-xps_cpus.patch diff --git a/queue-4.19/net-dcb-validate-netlink-message-in-dcb-handler.patch b/queue-4.19/net-dcb-validate-netlink-message-in-dcb-handler.patch deleted file mode 100644 index 9897b979900..00000000000 --- a/queue-4.19/net-dcb-validate-netlink-message-in-dcb-handler.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun Jan 10 12:47:32 PM CET 2021 -From: Petr Machata -Date: Tue, 22 Dec 2020 22:49:44 +0100 -Subject: net: dcb: Validate netlink message in DCB handler - -From: Petr Machata - -[ Upstream commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 ] - -DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB -messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have -the CAP_NET_ADMIN capability. - -However, the operation to be performed is not decided from the DCB message -type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for -reading DCB objects, the corresponding SET and DEL commands are used for -manipulation. - -The assumption is that set-like commands will be sent via an RTM_SETDCB -message, and get-like ones via RTM_GETDCB. However, this assumption is not -enforced. - -It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN -capability by sending the corresponding command in an RTM_GETDCB message. -That is a bug. Fix it by validating the type of the request message against -the type used for the response. - -Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") -Signed-off-by: Petr Machata -Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org -Signed-off-by: Jakub Kicinski -Signed-off-by: Greg Kroah-Hartman ---- - net/dcb/dcbnl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/dcb/dcbnl.c -+++ b/net/dcb/dcbnl.c -@@ -1756,6 +1756,8 @@ static int dcb_doit(struct sk_buff *skb, - fn = &reply_funcs[dcb->cmd]; - if (!fn->cb) - return -EOPNOTSUPP; -+ if (fn->type != nlh->nlmsg_type) -+ return -EPERM; - - if (!tb[DCB_ATTR_IFNAME]) - return -EINVAL; diff --git a/queue-4.19/series b/queue-4.19/series index 2394b98c165..a20003fd9e3 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -17,7 +17,6 @@ atm-idt77252-call-pci_disable_device-on-error-path.patch net-mvpp2-fix-gop-port-3-networking-complex-control-configurations.patch qede-fix-offload-for-ipip-tunnel-packets.patch virtio_net-fix-recursive-call-to-cpus_read_lock.patch -net-dcb-validate-netlink-message-in-dcb-handler.patch net-ncsi-use-real-net-device-for-response-handler.patch net-ethernet-fix-memleak-in-ethoc_probe.patch net-sysfs-take-the-rtnl-lock-when-storing-xps_cpus.patch diff --git a/queue-4.4/net-dcb-validate-netlink-message-in-dcb-handler.patch b/queue-4.4/net-dcb-validate-netlink-message-in-dcb-handler.patch deleted file mode 100644 index 54633f7f4ff..00000000000 --- a/queue-4.4/net-dcb-validate-netlink-message-in-dcb-handler.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun Jan 10 02:09:05 PM CET 2021 -From: Petr Machata -Date: Tue, 22 Dec 2020 22:49:44 +0100 -Subject: net: dcb: Validate netlink message in DCB handler - -From: Petr Machata - -[ Upstream commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 ] - -DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB -messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have -the CAP_NET_ADMIN capability. - -However, the operation to be performed is not decided from the DCB message -type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for -reading DCB objects, the corresponding SET and DEL commands are used for -manipulation. - -The assumption is that set-like commands will be sent via an RTM_SETDCB -message, and get-like ones via RTM_GETDCB. However, this assumption is not -enforced. - -It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN -capability by sending the corresponding command in an RTM_GETDCB message. -That is a bug. Fix it by validating the type of the request message against -the type used for the response. - -Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") -Signed-off-by: Petr Machata -Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org -Signed-off-by: Jakub Kicinski -Signed-off-by: Greg Kroah-Hartman ---- - net/dcb/dcbnl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/dcb/dcbnl.c -+++ b/net/dcb/dcbnl.c -@@ -1725,6 +1725,8 @@ static int dcb_doit(struct sk_buff *skb, - fn = &reply_funcs[dcb->cmd]; - if (!fn->cb) - return -EOPNOTSUPP; -+ if (fn->type != nlh->nlmsg_type) -+ return -EPERM; - - if (!tb[DCB_ATTR_IFNAME]) - return -EINVAL; diff --git a/queue-4.4/series b/queue-4.4/series index 3b57d91c988..b2f4a1cdee3 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -3,7 +3,6 @@ workqueue-kick-a-worker-based-on-the-actual-activati.patch lib-genalloc-fix-the-overflow-when-size-is-too-big.patch depmod-handle-the-case-of-sbin-depmod-without-sbin-i.patch atm-idt77252-call-pci_disable_device-on-error-path.patch -net-dcb-validate-netlink-message-in-dcb-handler.patch ipv4-ignore-ecn-bits-for-fib-lookups-in-fib_compute_spec_dst.patch net-hns-fix-return-value-check-in-__lb_other_process.patch net-hdlc_ppp-fix-issues-when-mod_timer-is-called-while-timer-is-running.patch diff --git a/queue-4.9/net-dcb-validate-netlink-message-in-dcb-handler.patch b/queue-4.9/net-dcb-validate-netlink-message-in-dcb-handler.patch deleted file mode 100644 index 1211657cd72..00000000000 --- a/queue-4.9/net-dcb-validate-netlink-message-in-dcb-handler.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun Jan 10 01:36:06 PM CET 2021 -From: Petr Machata -Date: Tue, 22 Dec 2020 22:49:44 +0100 -Subject: net: dcb: Validate netlink message in DCB handler - -From: Petr Machata - -[ Upstream commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 ] - -DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB -messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have -the CAP_NET_ADMIN capability. - -However, the operation to be performed is not decided from the DCB message -type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for -reading DCB objects, the corresponding SET and DEL commands are used for -manipulation. - -The assumption is that set-like commands will be sent via an RTM_SETDCB -message, and get-like ones via RTM_GETDCB. However, this assumption is not -enforced. - -It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN -capability by sending the corresponding command in an RTM_GETDCB message. -That is a bug. Fix it by validating the type of the request message against -the type used for the response. - -Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") -Signed-off-by: Petr Machata -Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org -Signed-off-by: Jakub Kicinski -Signed-off-by: Greg Kroah-Hartman ---- - net/dcb/dcbnl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/dcb/dcbnl.c -+++ b/net/dcb/dcbnl.c -@@ -1726,6 +1726,8 @@ static int dcb_doit(struct sk_buff *skb, - fn = &reply_funcs[dcb->cmd]; - if (!fn->cb) - return -EOPNOTSUPP; -+ if (fn->type != nlh->nlmsg_type) -+ return -EPERM; - - if (!tb[DCB_ATTR_IFNAME]) - return -EINVAL; diff --git a/queue-4.9/series b/queue-4.9/series index 1f20d66610b..9b38751c4a3 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -4,7 +4,6 @@ lib-genalloc-fix-the-overflow-when-size-is-too-big.patch depmod-handle-the-case-of-sbin-depmod-without-sbin-i.patch ethernet-ucc_geth-fix-use-after-free-in-ucc_geth_remove.patch atm-idt77252-call-pci_disable_device-on-error-path.patch -net-dcb-validate-netlink-message-in-dcb-handler.patch net-ncsi-use-real-net-device-for-response-handler.patch net-ethernet-fix-memleak-in-ethoc_probe.patch ipv4-ignore-ecn-bits-for-fib-lookups-in-fib_compute_spec_dst.patch diff --git a/queue-5.10/net-dcb-validate-netlink-message-in-dcb-handler.patch b/queue-5.10/net-dcb-validate-netlink-message-in-dcb-handler.patch deleted file mode 100644 index 8fabd21443f..00000000000 --- a/queue-5.10/net-dcb-validate-netlink-message-in-dcb-handler.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun Jan 10 11:18:59 AM CET 2021 -From: Petr Machata -Date: Tue, 22 Dec 2020 22:49:44 +0100 -Subject: net: dcb: Validate netlink message in DCB handler - -From: Petr Machata - -[ Upstream commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 ] - -DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB -messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have -the CAP_NET_ADMIN capability. - -However, the operation to be performed is not decided from the DCB message -type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for -reading DCB objects, the corresponding SET and DEL commands are used for -manipulation. - -The assumption is that set-like commands will be sent via an RTM_SETDCB -message, and get-like ones via RTM_GETDCB. However, this assumption is not -enforced. - -It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN -capability by sending the corresponding command in an RTM_GETDCB message. -That is a bug. Fix it by validating the type of the request message against -the type used for the response. - -Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") -Signed-off-by: Petr Machata -Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org -Signed-off-by: Jakub Kicinski -Signed-off-by: Greg Kroah-Hartman ---- - net/dcb/dcbnl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/dcb/dcbnl.c -+++ b/net/dcb/dcbnl.c -@@ -1765,6 +1765,8 @@ static int dcb_doit(struct sk_buff *skb, - fn = &reply_funcs[dcb->cmd]; - if (!fn->cb) - return -EOPNOTSUPP; -+ if (fn->type != nlh->nlmsg_type) -+ return -EPERM; - - if (!tb[DCB_ATTR_IFNAME]) - return -EINVAL; diff --git a/queue-5.10/series b/queue-5.10/series index 1d01a717bfa..20190049a8c 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -15,7 +15,6 @@ ibmvnic-continue-fatal-error-reset-after-passive-init.patch net-ethernet-mvneta-fix-error-handling-in-mvneta_probe.patch qede-fix-offload-for-ipip-tunnel-packets.patch virtio_net-fix-recursive-call-to-cpus_read_lock.patch -net-dcb-validate-netlink-message-in-dcb-handler.patch net-ncsi-use-real-net-device-for-response-handler.patch net-ethernet-fix-memleak-in-ethoc_probe.patch net-sysfs-take-the-rtnl-lock-when-storing-xps_cpus.patch diff --git a/queue-5.4/net-dcb-validate-netlink-message-in-dcb-handler.patch b/queue-5.4/net-dcb-validate-netlink-message-in-dcb-handler.patch deleted file mode 100644 index 70d16f170e0..00000000000 --- a/queue-5.4/net-dcb-validate-netlink-message-in-dcb-handler.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun Jan 10 11:49:07 AM CET 2021 -From: Petr Machata -Date: Tue, 22 Dec 2020 22:49:44 +0100 -Subject: net: dcb: Validate netlink message in DCB handler - -From: Petr Machata - -[ Upstream commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 ] - -DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB -messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have -the CAP_NET_ADMIN capability. - -However, the operation to be performed is not decided from the DCB message -type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for -reading DCB objects, the corresponding SET and DEL commands are used for -manipulation. - -The assumption is that set-like commands will be sent via an RTM_SETDCB -message, and get-like ones via RTM_GETDCB. However, this assumption is not -enforced. - -It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN -capability by sending the corresponding command in an RTM_GETDCB message. -That is a bug. Fix it by validating the type of the request message against -the type used for the response. - -Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") -Signed-off-by: Petr Machata -Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org -Signed-off-by: Jakub Kicinski -Signed-off-by: Greg Kroah-Hartman ---- - net/dcb/dcbnl.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/net/dcb/dcbnl.c -+++ b/net/dcb/dcbnl.c -@@ -1765,6 +1765,8 @@ static int dcb_doit(struct sk_buff *skb, - fn = &reply_funcs[dcb->cmd]; - if (!fn->cb) - return -EOPNOTSUPP; -+ if (fn->type != nlh->nlmsg_type) -+ return -EPERM; - - if (!tb[DCB_ATTR_IFNAME]) - return -EINVAL; diff --git a/queue-5.4/series b/queue-5.4/series index 3393290a918..2ace4f5d2d3 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -20,7 +20,6 @@ ibmvnic-continue-fatal-error-reset-after-passive-init.patch net-ethernet-mvneta-fix-error-handling-in-mvneta_probe.patch qede-fix-offload-for-ipip-tunnel-packets.patch virtio_net-fix-recursive-call-to-cpus_read_lock.patch -net-dcb-validate-netlink-message-in-dcb-handler.patch net-ncsi-use-real-net-device-for-response-handler.patch net-ethernet-fix-memleak-in-ethoc_probe.patch net-sysfs-take-the-rtnl-lock-when-storing-xps_cpus.patch