Hannes Frederic Sowa 79a8468747 random: check for increase of entropy_count because of signed conversion
The expression entropy_count -= ibytes << (ENTROPY_SHIFT + 3) could
actually increase entropy_count if during assignment of the unsigned
expression on the RHS (mind the -=) we reduce the value modulo
2^width(int) and assign it to entropy_count. Trinity found this.

[ Commit modified by tytso to add an additional safety check for a
  negative entropy_count -- which should never happen, and to also add
  an additional paranoia check to prevent overly large count values to
  be passed into urandom_read().  ]

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-07-19 01:42:13 -04:00
..
2014-05-06 13:05:00 -07:00
2014-04-16 14:31:13 -07:00
2014-06-03 23:12:27 +02:00
2013-05-05 00:11:29 -04:00
2013-02-22 23:31:31 -05:00
2013-02-22 23:31:31 -05:00
2013-05-05 00:12:29 -04:00
2013-05-05 00:12:29 -04:00
2014-07-09 16:45:36 -07:00
2014-04-16 14:21:06 -07:00
2013-12-18 16:39:54 -08:00
2012-11-21 12:55:19 -08:00
2011-03-31 11:26:23 -03:00
2013-12-19 15:10:49 +01:00
2013-02-22 23:31:31 -05:00
2012-03-28 18:30:03 +01:00
2012-10-07 07:22:32 -07:00
2013-02-22 23:31:31 -05:00
2011-01-10 08:51:44 -08:00
2013-02-22 23:31:31 -05:00
2013-10-16 12:36:10 -07:00
2014-04-16 14:21:06 -07:00