From: Patrick McHardy <kaber@trash.net>
To: Matt Walters <mattw@parasun.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: libipq, kernel panics/oopses, and other undesirable traits
Date: Tue, 17 Aug 2004 00:38:47 +0200 [thread overview]
Message-ID: <41213777.9050701@trash.net> (raw)
In-Reply-To: <1092692707.22731.1687.camel@marx.mindlink.net>
Matt Walters wrote:
>Greetings, friends-
>
> I've inlined a patch for ip_queue.c (diff -u is the standard
>patch-o-matic format, right?) which will fix the issue I've been having
>with large packets coming back from userspace causing kernel panics. It
>should probably be added to the nonlinear_skbs patch, since it's the
>same type of fix (memcpy --> copy_skb_bits). There's also a
>storage-type modification for ipq_rcv_skb - skb_len is an unsigned int
>and it was being stored in an int.
>
The skb_copy_bits can't be right. You change skb from being the destination
to the source. If the skb really is nonlinear, we need to linearize it. But
skb_tailroom should return 0 in this case and the skb should be linearized
by skb_copy_expand already. The check isn't triggered because this line is
wrong:
diff = v->data_len - e->skb->len
skb->len is the total length, including fragments. If we want to copy to it,
we either need to linearize it or look at skb_headlen(skb). It's complicated
getting everything right, I need to think about it some more.
Regards
Patrick
next prev parent reply other threads:[~2004-08-16 22:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-15 16:42 Re: libipq, kernel panics/oopses, and other undesirable traits Matt Walters
2004-08-16 21:45 ` Matt Walters
2004-08-16 22:38 ` Patrick McHardy [this message]
2004-08-17 0:40 ` Matt Walters
2004-08-17 0:44 ` Patrick McHardy
2004-08-17 10:40 ` Patrick McHardy
2004-08-17 20:40 ` Matt Walters
2004-08-19 10:55 ` Harald Welte
2004-08-19 14:13 ` Patrick McHardy
2004-08-23 19:07 ` Patrick McHardy
2004-08-23 19:16 ` Matt Walters
2004-08-17 0:53 ` Patrick McHardy
2004-08-17 1:34 ` Matt Walters
-- strict thread matches above, loose matches on Subject: below --
2004-08-14 0:04 Matt Walters
2004-08-14 7:59 ` Patrick McHardy
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=41213777.9050701@trash.net \
--to=kaber@trash.net \
--cc=mattw@parasun.com \
--cc=netfilter-devel@lists.netfilter.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.