Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311406

Re: net: GPF in __netlink_ns_capable

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: net: GPF in __netlink_ns_capable
Date 2016-01-18 10:30 +0100
Message-ID <qSeim-73y-31@gated-at.bofh.it> (permalink)
References <qRlce-3ZF-13@gated-at.bofh.it> <qRmBm-507-69@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jan 16, 2016 at 01:08:33AM +0100, Richard Weinberger wrote:
> On Fri, Jan 15, 2016 at 11:31 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
> > Call Trace:
> >  [<     inline     >] netlink_ns_capable net/netlink/af_netlink.c:1417
> >  [<ffffffff8529c0a5>] netlink_capable+0x25/0x30 net/netlink/af_netlink.c:1432
> 
> Hmm, we're crashing because NETLINK_CB(skb).sk is NULL.
> netlink_dump() creates a new skb without a netlink control block,
> but infiniband's dump functions use netlink_capable() which needs a valid
> NETLINK_CB(skb).sk.
> 
> What about something like that?

No you can't do it here as netlink_unicast also calls this and for
that case you'd be overwriting the original sending user-space
socket with the kernel socket.

I'm adding Eric Bierderman as he wrote some of the code in question.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

net: GPF in __netlink_ns_capable Dmitry Vyukov <dvyukov@google.com> - 2016-01-15 23:40 +0100
  Re: net: GPF in __netlink_ns_capable Richard Weinberger <richard.weinberger@gmail.com> - 2016-01-16 01:10 +0100
    Re: net: GPF in __netlink_ns_capable Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-18 10:30 +0100
      Re: net: GPF in __netlink_ns_capable ebiederm@xmission.com (Eric W. Biederman) - 2016-01-18 21:40 +0100
        RE: net: GPF in __netlink_ns_capable "Wan, Kaike" <kaike.wan@intel.com> - 2016-01-19 21:50 +0100
        RE: net: GPF in __netlink_ns_capable "Wan, Kaike" <kaike.wan@intel.com> - 2016-01-20 15:40 +0100
          Re: net: GPF in __netlink_ns_capable Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-20 16:10 +0100
            RE: net: GPF in __netlink_ns_capable "Wan, Kaike" <kaike.wan@intel.com> - 2016-01-20 19:20 +0100
      Re: net: GPF in __netlink_ns_capable ebiederm@xmission.com (Eric W. Biederman) - 2016-01-18 21:40 +0100

csiph-web