]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: af_alg - Work around empty control messages without MSG_MORE
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 27 Aug 2020 07:14:36 +0000 (17:14 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 27 Aug 2020 13:20:36 +0000 (23:20 +1000)
commit01b62d867c87834db30519318d364f4efa583733
tree3664b274d8ef9e53c37a06b28bcce535a7049ac4
parentd4edff2b41576c52022bdda3b984b3dae1666dd6
crypto: af_alg - Work around empty control messages without MSG_MORE

The iwd daemon uses libell which sets up the skcipher operation with
two separate control messages.  As the first control message is sent
without MSG_MORE, it is interpreted as an empty request.

While libell should be fixed to use MSG_MORE where appropriate, this
patch works around the bug in the kernel so that existing binaries
continue to work.

We will print a warning however.

A separate issue is that the new kernel code no longer allows the
control message to be sent twice within the same request.  This
restriction is obviously incompatible with what iwd was doing (first
setting an IV and then sending the real control message).  This
patch changes the kernel so that this is explicitly allowed.

Reported-by: Caleb Jorden <caljorden@hotmail.com>
Fixes: b7dad8488f83 ("crypto: algif_aead - Only wake up when...")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c