lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EEB40D5.7030906@hp.com>
Date:	Fri, 16 Dec 2011 08:00:05 -0500
From:	Vlad Yasevich <vladislav.yasevich@...com>
To:	Xi Wang <xi.wang@...il.com>
CC:	netdev@...r.kernel.org, linux-sctp@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrei Pelinescu-Onciul <andrei@...el.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v2] sctp: fix incorrect overflow check on autoclose



On 12/15/2011 05:13 PM, Xi Wang wrote:
> On Dec 15, 2011, at 4:07 PM, Vlad Yasevich wrote:
>> I think it would be better to keep this value in seconds and get rid
>> of division in the setsockopt code.  We could then have a min and max
>> values where max value could be something like 2 days.  I really don't
>> see an autoclose value that is bigger then that being very useful.  In
>> fact, most of the time these values are very small as one wants to close
>> out idle associations.
> 
> Now I start to think exposing a new sysctl option might be a little
> overkill since autoclose is often small.
> 
> How about this?
> 
> 1) Simply store autoclose in seconds in setsockopt.
> 
> 2) Avoid overflow in associola.c.
> 
> 	asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] =
> 		(sp->autoclose > MAX_SCHEDULE_TIMEOUT / HZ)
> 		? MAX_SCHEDULE_TIMEOUT
> 		: (unsigned long)sp->autoclose * HZ;
> 
> Or we could use INT_MAX instead of MAX_SCHEDULE_TIMEOUT if you want to
> keep that value consistent across 32/64 bits.

This would work as well.  I do like the max configurable though as it
might be a nice feature, but the above code is exactly what I was
thinking about too.

-vlad

> 
> - xi
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ