-
- Downloads
crypto: nx - Fix reentrancy bugs
This patch fixes a host of reentrancy bugs in the nx driver. The
following algorithms are affected:
* CCM
* GCM
* CTR
* XCBC
* SHA256
* SHA512
The crypto API allows a single transform to be used by multiple
threads simultaneously. For example, IPsec will use a single tfm
to process packets for a given SA. As packets may arrive on
multiple CPUs that tfm must be reentrant.
The nx driver does try to deal with this by using a spin lock.
Unfortunately only the basic AES/CBC/ECB algorithms do this in
the correct way.
The symptom of these bugs may range from the generation of incorrect
output to memory corruption.
Cc: stable@vger.kernel.org
Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
Showing
- drivers/crypto/nx/nx-aes-ccm.c 4 additions, 2 deletionsdrivers/crypto/nx/nx-aes-ccm.c
- drivers/crypto/nx/nx-aes-ctr.c 4 additions, 3 deletionsdrivers/crypto/nx/nx-aes-ctr.c
- drivers/crypto/nx/nx-aes-gcm.c 10 additions, 7 deletionsdrivers/crypto/nx/nx-aes-gcm.c
- drivers/crypto/nx/nx-aes-xcbc.c 44 additions, 26 deletionsdrivers/crypto/nx/nx-aes-xcbc.c
- drivers/crypto/nx/nx-sha256.c 24 additions, 19 deletionsdrivers/crypto/nx/nx-sha256.c
- drivers/crypto/nx/nx-sha512.c 25 additions, 19 deletionsdrivers/crypto/nx/nx-sha512.c
- drivers/crypto/nx/nx.c 3 additions, 0 deletionsdrivers/crypto/nx/nx.c
- drivers/crypto/nx/nx.h 11 additions, 3 deletionsdrivers/crypto/nx/nx.h
Loading
Please register or sign in to comment