Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	netdev@vger.kernel.org, Dmitry Safonov <dima@arista.com>
Subject: Re: [PATCH 4.4 106/124] netlink: Do not subscribe to non-existent groups
Date: Sun, 5 Aug 2018 16:03:01 +0200
Message-ID: <20180805140301.GA17056@kroah.com> (raw)
In-Reply-To: <20180804180734.GA25546@flashbox>

On Sat, Aug 04, 2018 at 11:07:34AM -0700, Nathan Chancellor wrote:
> On Sat, Aug 04, 2018 at 11:01:35AM +0200, Greg Kroah-Hartman wrote:
> > 4.4-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Dmitry Safonov <dima@arista.com>
> > 
> > [ Upstream commit 7acf9d4237c46894e0fa0492dd96314a41742e84 ]
> > 
> > Make ABI more strict about subscribing to group > ngroups.
> > Code doesn't check for that and it looks bogus.
> > (one can subscribe to non-existing group)
> > Still, it's possible to bind() to all possible groups with (-1)
> > 
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: Steffen Klassert <steffen.klassert@secunet.com>
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Dmitry Safonov <dima@arista.com>
> > Signed-off-by: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  net/netlink/af_netlink.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > --- a/net/netlink/af_netlink.c
> > +++ b/net/netlink/af_netlink.c
> > @@ -983,6 +983,7 @@ static int netlink_bind(struct socket *s
> >  		if (err)
> >  			return err;
> >  	}
> > +	groups &= (1UL << nlk->ngroups) - 1;
> >  
> >  	bound = nlk->bound;
> >  	if (bound) {
> > 
> > 
> 
> Hi Greg,
> 
> I am so sorry I didn't catch this in my initial report but this commit
> along with ba7aaf93ef2f ("netlink: Don't shift with UB on nlk->ngroups")
> breaks mobile data on both the Pixel 2 XL and OnePlus 6. There is signal
> but it just never connects to 3G/LTE. Reverting those two commits fixes
> the issue.
> 
> Nothing stands out to me in dmesg unfortunately and iven neither device
> is running a vanilla kernel, I cannot say if this is a problem in mainline
> or not but I just wanted to make you aware of it.

Many thanks for catching this.  I'll go drop this patch from the trees
for now, and will queue it up later with the fixup patch when that lands
in Linus's tree.

thanks,

greg k-h

      parent reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180804082702.434482435@linuxfoundation.org>
2018-08-04  9:01 ` Greg Kroah-Hartman
2018-08-04 18:07   ` Nathan Chancellor
2018-08-04 22:33     ` Dmitry Safonov
2018-08-04 22:49       ` Nathan Chancellor
2018-08-04 23:12         ` Dmitry Safonov
2018-08-04 23:21           ` Nathan Chancellor
2018-08-04 23:25             ` David Miller
2018-08-04 23:26             ` Dmitry Safonov
2018-08-04 23:33               ` David Miller
2018-08-04 23:44                 ` Dmitry Safonov
2018-08-04 23:50                   ` Dmitry Safonov
2018-08-05  0:07                   ` David Miller
2018-08-04 23:47                 ` Dmitry Safonov
2018-08-05  0:08                   ` David Miller
2018-08-05 14:03     ` Greg Kroah-Hartman [this message]

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=20180805140301.GA17056@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=dima@arista.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git