From: Greg Kroah-Hartman Date: Mon, 9 Oct 2023 18:27:50 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.14.327~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae9773a896aea55eefdeeac6a76e4cad643f2251;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch --- diff --git a/queue-4.19/revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch b/queue-4.19/revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch new file mode 100644 index 00000000000..0c7403cab15 --- /dev/null +++ b/queue-4.19/revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch @@ -0,0 +1,40 @@ +From 8d271d77834f96bd04ff3a29eb688d4364eec009 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Mon, 9 Oct 2023 20:25:00 +0200 +Subject: Revert "rtnetlink: Reject negative ifindexes in RTM_NEWLINK" + +From: Greg Kroah-Hartman + +This reverts commit 42c8406432e730cb7442d97ecfdbf47084a5af4d which is +commit 30188bd7838c16a98a520db1fe9df01ffc6ed368 upstream. + +It was improperly backported to 4.19.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 +Link: https://lore.kernel.org/r/ZSQeA8fhUT++iZvz@ostr-mac +Cc: Ido Schimmel +Cc: Jiri Pirko +Cc: Jakub Kicinski +Cc: Paolo Abeni +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + net/core/rtnetlink.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/net/core/rtnetlink.c ++++ b/net/core/rtnetlink.c +@@ -2702,10 +2702,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; diff --git a/queue-4.19/series b/queue-4.19/series index 7ad599931b3..f584152bd64 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -89,3 +89,4 @@ 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 dccp-fix-dccp_v4_err-dccp_v6_err-again.patch +revert-rtnetlink-reject-negative-ifindexes-in-rtm_newlink.patch