]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Oct 2023 18:27:39 +0000 (20:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Oct 2023 18:27:39 +0000 (20:27 +0200)
added patches:
revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch

queue-4.14/revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch b/queue-4.14/revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch
new file mode 100644 (file)
index 0000000..65b3b62
--- /dev/null
@@ -0,0 +1,40 @@
+From 8d271d77834f96bd04ff3a29eb688d4364eec009 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 9 Oct 2023 20:25:00 +0200
+Subject: Revert "rtnetlink: Reject negative ifindexes in RTM_NEWLINK"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 69197b2b2a7bcf92b209490639316af5dc751cc0 which is
+commit 30188bd7838c16a98a520db1fe9df01ffc6ed368 upstream.
+
+It was improperly backported to 4.14.y, and applied to the wrong
+function, which obviously causes problems.  A fixed version will be
+applied as a separate commit later.
+
+Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Link: https://lore.kernel.org/r/ZSQeA8fhUT++iZvz@ostr-mac
+Cc: Ido Schimmel <idosch@nvidia.com>
+Cc: Jiri Pirko <jiri@nvidia.com>
+Cc: Jakub Kicinski <kuba@kernel.org>
+Cc: Paolo Abeni <pabeni@redhat.com>
+Cc: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/rtnetlink.c |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
+@@ -2311,10 +2311,7 @@ static int rtnl_setlink(struct sk_buff *
+       ifm = nlmsg_data(nlh);
+       if (ifm->ifi_index > 0)
+               dev = __dev_get_by_index(net, ifm->ifi_index);
+-      else if (ifm->ifi_index < 0) {
+-              NL_SET_ERR_MSG(extack, "ifindex can't be negative");
+-              return -EINVAL;
+-      } else if (tb[IFLA_IFNAME])
++      else if (tb[IFLA_IFNAME])
+               dev = __dev_get_by_name(net, ifname);
+       else
+               goto errout;
index fc8d7c9f91343c27995698e49c2b11a1dcbdb301..adac1353bb5651ecd31aa6b15c54f2b89b5dffdf 100644 (file)
@@ -53,3 +53,4 @@ gpio-aspeed-fix-the-gpio-number-passed-to-pinctrl_gpio_set_config.patch
 rdma-cma-fix-truncation-compilation-warning-in-make_cma_ports.patch
 rdma-mlx5-fix-null-string-error.patch
 parisc-restore-__ldcw_align-for-pa-risc-2.0-processors.patch
+revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch