All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, stable@vger.kernel.org,
	lwn@lwn.net, jslaby@suse.cz
Subject: Re: Linux 4.14.324
Date: Mon, 9 Oct 2023 11:36:35 -0400	[thread overview]
Message-ID: <ZSQeA8fhUT++iZvz@ostr-mac> (raw)
In-Reply-To: <2023083037-conceded-candle-b9e8@gregkh>

On Wed, Aug 30, 2023 at 05:02:37PM +0200, Greg Kroah-Hartman wrote:
> I'm announcing the release of the 4.14.324 kernel.
> 
> All users of the 4.14 kernel series must upgrade.
> 
> The updated 4.14.y git tree can be found at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
> and can be browsed at the normal kernel.org git web browser:
> 	https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
> 
...
> 
> Ido Schimmel (1):
>       rtnetlink: Reject negative ifindexes in RTM_NEWLINK


The above commit (69197b2 rtnetlink: Reject negative ifindexes in RTM_NEWLINK)
appears to has been applied icorrectly, causing some regressions (like attaching
a VF to a running guest). The change needs to be made in rtnl_newlink(), not
rtnl_setlink().

I didn't check all other branches but at least 5.4 looks OK.

I believe 69197b2 needs to be reverted and instead this applied:

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a76f3024..f4b98f7 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2547,9 +2547,12 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
                ifname[0] = '\0';
 
        ifm = nlmsg_data(nlh);
-       if (ifm->ifi_index > 0)
+       if (ifm->ifi_index > 0) {
                dev = __dev_get_by_index(net, ifm->ifi_index);
-       else {
+       } else if (ifm->ifi_index < 0) {
+               NL_SET_ERR_MSG(extack, "ifindex can't be negative");
+               return -EINVAL;
+       } else {
                if (ifname[0])
                        dev = __dev_get_by_name(net, ifname);
                else



  parent reply	other threads:[~2023-10-09 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 15:02 Linux 4.14.324 Greg Kroah-Hartman
2023-08-30 15:02 ` Greg Kroah-Hartman
2023-10-09 15:36 ` Boris Ostrovsky [this message]
2023-10-09 18:24   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZSQeA8fhUT++iZvz@ostr-mac \
    --to=boris.ostrovsky@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lwn@lwn.net \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.