Skip to content
Snippets Groups Projects
Commit bc97e57e authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: algif_skcipher - Handle unaligned receive buffer


As it is if user-space passes through a receive buffer that's not
aligned to to the cipher block size, we'll end up encrypting or
decrypting a partial block which causes a spurious EINVAL to be
returned.

This patch fixes this by moving the partial block test after the
af_alg_make_sg call.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0f6bb83c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment