linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Laight" <David.Laight@ACULAB.COM>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>, "Xi Wang" <xi.wang@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, "Joerg Reuter" <jreuter@yaina.de>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"David Miller" <davem@davemloft.net>,
	<linux-hams@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: RE: [PATCH 1/2] ax25: integer overflows in ax25_setsockopt()
Date: Wed, 23 Nov 2011 14:53:18 -0000	[thread overview]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6D8AEDB@saturn3.aculab.com> (raw)
In-Reply-To: <20111123143913.50fbcc8c@lxorguk.ukuu.org.uk>

 
> > All these magic numbers come from net/ax25/sysctl_net_ax25.c, where
> > min/max values of each field are set for sysctl.  Is it okay to use
> > them?
> 
> The sysctl range is the 'standard' range, but it's always historically
> been possible to override them in apps for special cases. I'm wary of
> changing that because people do insane things like AX.25 
> bounced off the moon where you need very long timeouts.

It is a long time since I wrote any of the X.25 protocol
stack layers, but I would agree that limiting timers to the
values defined in the standard is probably not a good idea.

Even normal telco's may have decided to use values that
are outside the nominal range.

These timers are almost certainly either 'guard' timers
for missing responses or retransmit timers for 'keepalive'
messages - so allowing much larger values doesn't matter.
I'd only limit them in order to stop the code breaking.

The lower limit (1 second) will be below the limit for the
protocol - but exists to stop the code breaking.

	David



  reply	other threads:[~2011-11-23 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  4:28 [PATCH 1/2] ax25: integer overflows in ax25_setsockopt() Xi Wang
2011-11-23 10:44 ` Alan Cox
2011-11-23 14:04   ` Xi Wang
2011-11-23 14:39     ` Alan Cox
2011-11-23 14:53       ` David Laight [this message]
2011-11-23 17:09 ` Ralf Baechle
2011-11-24 19:09   ` Xi Wang

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=AE90C24D6B3A694183C094C60CF0A2F6D8AEDB@saturn3.aculab.com \
    --to=david.laight@aculab.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@davemloft.net \
    --cc=jreuter@yaina.de \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=xi.wang@gmail.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 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).