From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netfilter-devel@lists.netfilter.org, Patrick McHardy <kaber@trash.net>
Subject: [NETFILTER 01/06]: H.323 helper: fix endless loop caused by invalid TPKT len
Date: Tue, 2 May 2006 22:48:04 +0200 (MEST) [thread overview]
Message-ID: <20060502204804.7610.79065.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20060502204803.7610.72174.sendpatchset@localhost.localdomain>
[NETFILTER]: H.323 helper: fix endless loop caused by invalid TPKT len
When the TPKT len included in the packet is below the lowest valid value
of 4 an underflow occurs which results in an endless loop.
Found by testcase 0000058 from the PROTOS c07-h2250v4 testsuite.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit ce641a7a27c17eaffbc769ef81d29c3925214655
tree 224c05dcc5fddb2bb8bc08f3cf01394d35605ca9
parent 532f57da408c5a5710075d17047e2d97bdfd22f3
author Patrick McHardy <kaber@trash.net> Tue, 02 May 2006 21:57:27 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 02 May 2006 21:57:27 +0200
net/ipv4/netfilter/ip_conntrack_helper_h323.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
index 2c2fb70..518f581 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
@@ -162,6 +162,8 @@ static int get_tpkt_data(struct sk_buff
/* Validate TPKT length */
tpktlen = tpkt[2] * 256 + tpkt[3];
+ if (tpktlen < 4)
+ goto clear_out;
if (tpktlen > tcpdatalen) {
if (tcpdatalen == 4) { /* Separate TPKT header */
/* Netmeeting sends TPKT header and data separately */
next prev parent reply other threads:[~2006-05-02 20:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 20:48 [NETFILTER 00/06]: Netfilter fixes for 2.6.17 Patrick McHardy
2006-05-02 20:48 ` Patrick McHardy [this message]
2006-05-02 20:48 ` [NETFILTER 02/06]: H.323 helper: fix use of uninitialized data Patrick McHardy
2006-05-02 20:48 ` [NETFILTER 03/06]: SCTP conntrack: fix infinite loop Patrick McHardy
2006-05-02 20:48 ` [NETFILTER 04/06]: NAT: silence unused variable warnings with CONFIG_XFRM=n Patrick McHardy
2006-05-02 20:48 ` [NETFILTER 05/06]: H.323 helper: Change author's email address Patrick McHardy
2006-05-02 20:48 ` [NETFILTER 06/06]: x_tables: don't use __copy_{from, to}_user on unchecked memory in compat layer Patrick McHardy
2006-05-04 6:21 ` [NETFILTER 00/06]: Netfilter fixes for 2.6.17 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=20060502204804.7610.79065.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--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.