commit | 08be47564b3c49404e5cb6061c0ede94b0a9e783 | [log] [tgz] |
---|---|---|
author | Mat Martineau <mathew.j.martineau@linux.intel.com> | Wed Jan 24 13:51:26 2018 -0800 |
committer | Denis Kenzior <denkenz@gmail.com> | Wed Jan 24 17:10:31 2018 -0600 |
tree | ca689bad0edb703fc9e582de836e82566d6e3d74 | |
parent | 799bec40520fb2538f1a2b228cd0f7f3ad81a8a1 [diff] |
cipher: Correctly propagate AEAD failures Some pre-4.9 kernels have an AEAD bug that makes recvmsg() return an incorrect value that does not include the AAD length. This could cause an erroneous successful return from l_aead_cipher_{en,de}crypt() if ad_len was longer than the expected output. operate_cipher() now returns the number of bytes copied to the 'out' buffer, and the AEAD functions only succeed if the expected number of bytes were copied.