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]
Date:	Tue, 13 Dec 2011 17:00:27 -0500
From:	Xi Wang <xi.wang@...il.com>
To:	Vladislav Yasevich <vladislav.yasevich@...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 RESEND] sctp: fix incorrect overflow check on autoclose

On Dec 12, 2011, at 5:18 PM, Vladislav Yasevich wrote:
> Hm..  this is a bit strange.  This makes it so that on 32 bit platforms
> we have one upper bound for autoclose and on 64 we have another even though
> the type is platform dependent.  This could be considered a regression by
> applications.

Either looks good to me.  Timeout limit is essentially different on 32/64
platforms.

Another (probably uglier) option is to limit the value on 32-bit platform
only, like sock_setsockopt() in net/core/sock.c.

#if (BITS_PER_LONG == 32)
	if (sp->autoclose > MAX_SCHEDULE_TIMEOUT / HZ)
		sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ;
#endif

> In addition this would result in confusion to user since the values
> between setsockopt() and getsockopt() for autoclose would be different.

Are you suggesting to reject the value and return -EINVAL, rather than
silently limiting the autoclose value?

- 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