Files
linux/net/rds
Dan Carpenter 7cd1033116 rds: fix an integer overflow test in rds_info_getsockopt()
[ Upstream commit 468b732b6f ]

"len" is a signed integer.  We check that len is not negative, so it
goes from zero to INT_MAX.  PAGE_SIZE is unsigned long so the comparison
is type promoted to unsigned long.  ULONG_MAX - 4095 is a higher than
INT_MAX so the condition can never be true.

I don't know if this is harmful but it seems safe to limit "len" to
INT_MAX - 4095.

Fixes: a8c879a7ee ('RDS: Info and stats')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-01 12:07:37 +02:00
..
2015-08-10 12:20:31 -07:00
2014-02-06 11:08:16 -08:00
2014-01-15 15:28:49 -08:00
2012-11-19 18:59:44 -05:00
2009-02-26 23:39:25 -08:00
2015-03-26 15:00:55 +01:00
2009-02-26 23:39:26 -08:00
2013-03-04 14:12:07 -05:00
2012-10-09 13:57:23 -04:00
2013-03-08 00:35:44 -05:00
2012-08-22 22:52:04 -07:00
2012-08-22 22:52:04 -07:00
2011-07-01 16:16:19 -07:00