From: Pablo Neira <pablo@netfilter.org>
To: Samir Bellabes <sbellabes@mandriva.com>
Cc: Harald Welte <laforge@netfilter.org>,
netfilter-devel@lists.netfilter.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: buffer overflow in ip_ct_{ftp,tftp,irc}
Date: Thu, 08 Sep 2005 01:43:34 +0200 [thread overview]
Message-ID: <431F7B26.4040302@netfilter.org> (raw)
In-Reply-To: <m2slwgsc4p.fsf@cerbere.dyndns.info>
Samir Bellabes wrote:
> for (i = 0; i < ports_c; i++) {
> + /* don't allow bad port values */
> + if (ports[i] < 1 || ports[i] > 65535) {
> + printk(KERN_WARNING "ip_ct_ftp: ERROR port"
> + "should be between 1 and 65535\n");
> + fini();
> + return -EINVAL;
> + }
Better something like this?
-static int ports[MAX_PORTS];
+static short
ports[MAX_PORTS];
static int ports_c;
-module_param_array(ports, int, &ports_c, 0400);
+module_param_array(ports, short, &ports_c, 0400);
--
Pablo
next prev parent reply other threads:[~2005-09-07 23:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 23:11 buffer overflow in ip_ct_{ftp,tftp,irc} Samir Bellabes
2005-09-07 23:15 ` Samir Bellabes
2005-09-07 23:43 ` Pablo Neira [this message]
2005-09-07 23:48 ` Pablo Neira
2005-09-09 22:59 ` Patrick McHardy
2005-09-12 8:44 ` Amin Azez
2005-09-12 8:49 ` Patrick McHardy
2005-09-20 7:11 ` Yasuyuki KOZAKAI
[not found] ` <200509200711.j8K7Bw3x002184@toshiba.co.jp>
2005-09-20 8:10 ` Pablo Neira
2005-09-20 9:35 ` Harald Welte
2005-09-20 12:48 ` Yasuyuki KOZAKAI
[not found] ` <200509201248.j8KCmNi9009046@toshiba.co.jp>
2005-09-20 14:15 ` Harald Welte
2005-09-24 8:43 ` Yasuyuki KOZAKAI
2005-09-10 7:38 ` [PATCH] " Harald Welte
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=431F7B26.4040302@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=sbellabes@mandriva.com \
/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.