linux/crypto
Xiao Ni 9be148e408 async_xor: check src_offs is not NULL before updating it
When PAGE_SIZE is greater than 4kB, multiple stripes may share the same
page. Thus, src_offs is added to async_xor_offs() with array of offsets.
However, async_xor() passes NULL src_offs to async_xor_offs(). In such
case, src_offs should not be updated. Add a check before the update.

Fixes: ceaf2966ab08(async_xor: increase src_offs when dropping destination page)
Cc: stable@vger.kernel.org # v5.10+
Reported-by: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>
Tested-by: Oleksandr Shchirskyi <oleksandr.shchirskyi@intel.com>
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
2021-06-10 19:40:14 -07:00
..
asymmetric_keys x509: Add OID for NIST P384 and extend parser for it 2021-03-26 19:41:59 +11:00
async_tx async_xor: check src_offs is not NULL before updating it 2021-06-10 19:40:14 -07:00
842.c
acompress.c
adiantum.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
aead.c
aegis.h crypto: aegis128 - Move simd prototypes into aegis.h 2021-03-19 21:59:45 +11:00
aegis128-core.c crypto: aegis128 - Move simd prototypes into aegis.h 2021-03-19 21:59:45 +11:00
aegis128-neon-inner.c
aegis128-neon.c crypto: aegis128 - Move simd prototypes into aegis.h 2021-03-19 21:59:45 +11:00
aes_generic.c
aes_ti.c
af_alg.c crypto: doc - fix kernel-doc notation in chacha.c and af_alg.c 2021-04-22 17:31:29 +10:00
ahash.c
akcipher.c
algapi.c
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
anubis.c
api.c crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-03-13 00:04:01 +11:00
arc4.c
authenc.c
authencesn.c
blake2b_generic.c crypto: blake2b - update file comment 2021-01-03 08:41:39 +11:00
blake2s_generic.c crypto: blake2s - share the "shash" API boilerplate code 2021-01-03 08:41:38 +11:00
blowfish_common.c
blowfish_generic.c crypto: blowfish - use unaligned accessors instead of alignmask 2021-02-10 17:55:56 +11:00
camellia_generic.c crypto: camellia - use unaligned accessors instead of alignmask 2021-02-10 17:55:56 +11:00
cast5_generic.c crypto: cast5 - use unaligned accessors instead of alignmask 2021-02-10 17:55:56 +11:00
cast6_generic.c crypto: cast6 - use unaligned accessors instead of alignmask 2021-02-10 17:55:56 +11:00
cast_common.c
cbc.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
ccm.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
cfb.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
chacha20poly1305.c
chacha_generic.c
cipher.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
cmac.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
compress.c
crc32_generic.c crypto: crc32-generic - Use SPDX-License-Identifier 2021-04-16 21:24:27 +10:00
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c
crypto_engine.c
crypto_null.c
crypto_user_base.c
crypto_user_stat.c
ctr.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
cts.c
curve25519-generic.c
deflate.c
des_generic.c
dh.c
dh_helper.c
drbg.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
ecb.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
ecc.c crypto: ecc - Correct an error in the comments 2021-03-26 20:15:56 +11:00
ecc.h crypto: ecc - delete a useless function declaration 2021-04-16 21:16:31 +10:00
ecc_curve_defs.h Merge branch 'ecc' 2021-03-26 19:55:55 +11:00
ecdh.c crypto: ecdh - move curve_id of ECDH from the key to algorithm name 2021-03-13 00:04:03 +11:00
ecdh_helper.c crypto: ecdh - move curve_id of ECDH from the key to algorithm name 2021-03-13 00:04:03 +11:00
ecdsa.c crypto: ecdsa - Register NIST P384 and extend test suite 2021-03-26 19:41:58 +11:00
ecdsasignature.asn1 crypto: ecdsa - Add support for ECDSA signature verification 2021-03-26 19:41:58 +11:00
echainiv.c
ecrdsa.c
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
essiv.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
fcrypt.c crypto: fcrypt - Remove 'do while(0)' loop for single statement macro 2021-04-02 18:28:13 +11:00
fips.c
gcm.c
geniv.c
gf128mul.c
ghash-generic.c
hash_info.c
hmac.c
internal.h
jitterentropy-kcapi.c
jitterentropy.c crypto: jitterentropy - Put constants on the right side of the expression 2021-03-26 20:02:35 +11:00
jitterentropy.h
Kconfig Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-04-26 08:51:23 -07:00
keywrap.c crypto: keywrap - Remove else after break statement 2021-04-02 18:28:13 +11:00
khazad.c
kpp.c
lrw.c
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
Makefile crypto: ecdsa - Add support for ECDSA signature verification 2021-03-26 19:41:58 +11:00
md4.c
md5.c
memneq.c
michael_mic.c crypto: michael_mic - fix broken misalignment handling 2021-02-10 17:55:55 +11:00
nhpoly1305.c
ofb.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
pcbc.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
pcrypt.c
poly1305_generic.c
proc.c
ripemd.h crypto: rmd320 - remove RIPE-MD 320 hash algorithm 2021-01-29 16:07:04 +11:00
rmd160.c
rng.c crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS 2021-04-02 18:28:12 +11:00
rsa-pkcs1pad.c
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
scatterwalk.c
scompress.c
seed.c
seqiv.c
serpent_generic.c crypto: serpent - Fix sparse byte order warnings 2021-03-07 15:13:15 +11:00
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c
simd.c
skcipher.c crypto: x86 - remove glue helper module 2021-01-14 17:10:29 +11:00
sm2.c
sm2signature.asn1
sm3_generic.c
sm4_generic.c
streebog_generic.c
tcrypt.c crypto: serpent - get rid of obsolete tnepres variant 2021-02-10 17:55:56 +11:00
tcrypt.h
tea.c
testmgr.c Merge branch 'ecc' 2021-03-26 19:55:55 +11:00
testmgr.h Merge branch 'ecc' 2021-03-26 19:55:55 +11:00
twofish_common.c
twofish_generic.c crypto: twofish - use unaligned accessors instead of alignmask 2021-02-10 17:55:57 +11:00
vmac.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
wp512.c
xcbc.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
xor.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-02-21 17:23:56 -08:00
xts.c crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
xxhash_generic.c
zstd.c