From: "David S. Miller" <davem@davemloft.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org,
yasuyuki.kozakai@toshiba.co.jp
Subject: Re: [PATCH]: fixed kernel panic when trying to find tcp option
Date: Wed, 15 Sep 2004 08:50:49 -0700 [thread overview]
Message-ID: <20040915085049.7a7d45f0.davem@davemloft.net> (raw)
In-Reply-To: <20040915084335.6944eebe.davem@davemloft.net>
On Wed, 15 Sep 2004 08:43:35 -0700
"David S. Miller" <davem@davemloft.net> wrote:
> All callers, well there is only one, make sure optlen is
> non-zero.
>
> Here is the call site in tcp_match():
>
> if (tcpinfo->option) {
> if (th->doff * 4 < sizeof(_tcph)) {
> *hotdrop = 1;
> return 0;
> }
> if (!tcp_find_option(tcpinfo->option, skb,
> th->doff*4 - sizeof(_tcph),
> tcpinfo->invflags & IPT_TCP_INV_OPTION,
> hotdrop))
> return 0;
> }
>
> If the optlen would be zero, second if() passes and we
> set *hotdrop to 1 and return.
Wait, that is the bug, the condition test has an
off-by-one error, it should read:
if (th->doff * 4 <= sizeof(_tcph))
I will fix this in my tree.
next prev parent reply other threads:[~2004-09-15 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 11:36 [PATCH]: fixed kernel panic when trying to find tcp option Yasuyuki Kozakai
2004-09-15 15:43 ` David S. Miller
2004-09-15 15:50 ` David S. Miller [this message]
2004-09-15 17:20 ` Yasuyuki Kozakai
2004-09-15 17:22 ` David S. Miller
2004-09-15 17:31 ` Yasuyuki Kozakai
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=20040915085049.7a7d45f0.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=usagi-core@linux-ipv6.org \
--cc=yasuyuki.kozakai@toshiba.co.jp \
/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.