From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Dave Jones <davej@redhat.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org,
Netfilter Development Mailinglist
<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] Use unsigned variables for packet lengths in ip[6]_queue.
Date: Fri, 03 Jun 2011 12:07:37 +0200 [thread overview]
Message-ID: <4DE8B269.9070505@netfilter.org> (raw)
In-Reply-To: <20110528003651.GA8380@redhat.com>
On 28/05/11 02:36, Dave Jones wrote:
> On Tue, Apr 19, 2011 at 08:41:05PM -0700, David Miller wrote:
> > From: Dave Jones <davej@redhat.com>
> > Date: Tue, 19 Apr 2011 21:42:22 -0400
> >
> > > Not catastrophic, but ipqueue seems to be too trusting of what it gets
> > > passed from userspace, and passes it on down to the page allocator,
> > > where it will spew warnings if the page order is too high.
> > >
> > > __ipq_rcv_skb has several checks for lengths too small, but doesn't
> > > seem to have any for oversized ones. I'm not sure what the maximum
> > > we should check for is. I'll code up a diff if anyone has any ideas
> > > on a sane maximum.
> >
> > Maybe the thing to do is to simply pass __GFP_NOWARN to nlmsg_new()
> > in netlink_ack()?
> >
> > Anyone else have a better idea?
>
> So I went back to this today, and found something that doesn't look right.
> After adding some instrumentation, and re-running my tests, I found that
> the reason we were blowing up with enormous allocations was that we
> were passing down a nlmsglen's like -1061109568
>
> Is there any reason for that to be signed ?
> The nlmsg_len entry of nlmsghdr is a u32, so I'm assuming this is a bug.
>
> With the patch below, I haven't been able to reproduce the problem, but
> I don't know if I've inadvertantly broken some other behaviour somewhere
> deeper in netlink where this is valid.
I have applied this. Thanks.
BTW, ip[6]_queue has been marked obsoleted since long time, probably we
can schedule this for removal anytime soon. The nfnetlink_queue
successor has been there to provide a replacement for this since long time.
prev parent reply other threads:[~2011-06-03 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110420014221.GC26949@redhat.com>
[not found] ` <20110419.204105.68144653.davem@davemloft.net>
[not found] ` <20110528003651.GA8380@redhat.com>
2011-06-02 20:57 ` [PATCH] Use unsigned variables for packet lengths in ip[6]_queue David Miller
2011-06-07 12:59 ` Patrick McHardy
2011-06-07 14:19 ` Patrick McHardy
2011-06-07 14:39 ` Dave Jones
2011-06-07 15:19 ` Patrick McHardy
2011-06-03 10:07 ` Pablo Neira Ayuso [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=4DE8B269.9070505@netfilter.org \
--to=pablo@netfilter.org \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.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 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).