]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: drbg - Fix the fips_enabled priority boost
authorEric Biggers <ebiggers@kernel.org>
Mon, 20 Apr 2026 06:33:49 +0000 (23:33 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 7 May 2026 08:09:59 +0000 (16:09 +0800)
commita8a1f93080efc83a9ff8452954429ae379e9e614
treeab6c90b69622fa994c33cf61667075dc74e97cf1
parent6f49f00c981bbb9ef602966f19bfdbef46b681d2
crypto: drbg - Fix the fips_enabled priority boost

When fips_enabled=1, it seems to have been intended for one of the
algorithms defined in crypto/drbg.c to be the highest priority "stdrng"
algorithm, so that it is what is used by "stdrng" users.

However, the code only boosts the priority to 400, which is less than
the priority 500 used in drivers/crypto/caam/caamprng.c.  Thus, the CAAM
RNG could be used instead.

Fix this by boosting the priority by 2000 instead of 200.

Fixes: 541af946fe13 ("crypto: drbg - SP800-90A Deterministic Random Bit Generator")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c