From: Tommy Christensen <tommy.christensen@tpack.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: simon.roscic@chello.at, netdev@oss.sgi.com, davem@davemloft.net
Subject: Re: Fwd: [2.6] ethertap and af_inet.c assertion failures
Date: Sat, 15 Jan 2005 21:20:42 +0100 [thread overview]
Message-ID: <41E97B1A.30205@tpack.net> (raw)
In-Reply-To: <20050115183023.GA31211@gondor.apana.org.au>
Herbert Xu wrote:
> On Sat, Jan 15, 2005 at 05:19:59PM +0100, Tommy Christensen wrote:
>
>>Shouldn't there be a check for skb_shared as well? Or are the
>>callers of netlink_unicast/broadcast supposed to avoid this.
>
>
> Had anyone been using shared skb's here before they would've got into
> trouble a long time ago with calls such as skb_orphan in the path.
>
> Even if they managed to do that and not notice then the pskb_expand_head
> call in netlink_trim would've likely caught it as well.
Well, pskb_expand_head was added recently and isn't even always called.
Have a look at audit_log_drain() in kernel/audit.c. This code does:
skb_get
netlink_unicast
...
kfree_skb
This is working just fine - until one day an over-sized skb comes along
and hits the BUG in pskb_expand_head ...
That particular example can easily be solved by re-arranging the code a
bit (I'll send a patch to someone).
Still, regarding netlink, I think the safe approach is to either handle
or disallow shared skb's. Anything in-between could appear to be working,
and then suddenly blow up on your production system. </paranoia>
-Tommy
next prev parent reply other threads:[~2005-01-15 20:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-23 23:02 Fwd: [2.6] ethertap and af_inet.c assertion failures Simon Roscic
2005-01-11 21:26 ` Tommy Christensen
2005-01-12 22:25 ` Simon Roscic
2005-01-15 13:31 ` Herbert Xu
2005-01-15 16:19 ` Tommy Christensen
2005-01-15 18:30 ` Herbert Xu
2005-01-15 20:20 ` Tommy Christensen [this message]
2005-01-16 8:02 ` [NETLINK] Do not netlink_unicast shared packet in kernel/audit.c Herbert Xu
2005-01-16 8:34 ` Tommy Christensen
2005-01-17 21:36 ` David S. Miller
2005-01-17 23:11 ` Herbert Xu
2005-01-19 22:33 ` David S. Miller
2005-01-15 18:03 ` Fwd: [2.6] ethertap and af_inet.c assertion failures Simon Roscic
2005-01-17 21:37 ` David S. Miller
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=41E97B1A.30205@tpack.net \
--to=tommy.christensen@tpack.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.com \
--cc=simon.roscic@chello.at \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).