Re: [PATCH] DRBG: fix maximum value checks on 32 bit systems

From: Herbert Xu
Date: Tue Aug 26 2014 - 04:09:14 EST

On Tue, Aug 26, 2014 at 10:06:52AM +0200, Stephan Mueller wrote:
> The maximum values for additional input string or generated blocks is
> larger than 1<<32. To ensure a sensible value on 32 bit systems, return
> SIZE_MAX on 32 bit systems. This value is lower than the maximum allowed
> values defined in SP800-90A. The standard allow lower maximum values,
> but not larger values.
> Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
> Signed-off-by: Stephan Mueller <smueller@xxxxxxxxxx>

Unfortunately there's a place in drbg where you add one to
drbg_max_addtl which will cause it to overflow back to zero.

Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at