diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2018-07-13 11:12:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-06 17:20:51 +0300 |
commit | 51ef850c78bb311e7bc5e6aada5756fbf71d6b08 (patch) | |
tree | 4a44efe28881418f320fa6d124feaeca6ca3dddf /drivers/usb/serial/Kconfig | |
parent | 65be9cbe1224f1fe51591b44e3d35603b81b595c (diff) | |
download | linux-51ef850c78bb311e7bc5e6aada5756fbf71d6b08.tar.xz |
crypto: padlock-aes - Fix Nano workaround data corruption
commit 46d8c4b28652d35dc6cfb5adf7f54e102fc04384 upstream.
This was detected by the self-test thanks to Ard's chunking patch.
I finally got around to testing this out on my ancient Via box. It
turns out that the workaround got the assembly wrong and we end up
doing count + initial cycles of the loop instead of just count.
This obviously causes corruption, either by overwriting the source
that is yet to be processed, or writing over the end of the buffer.
On CPUs that don't require the workaround only ECB is affected.
On Nano CPUs both ECB and CBC are affected.
This patch fixes it by doing the subtraction prior to the assembly.
Fixes: a76c1c23d0c3 ("crypto: padlock-aes - work around Nano CPU...")
Cc: <stable@vger.kernel.org>
Reported-by: Jamie Heilman <jamie@audible.transient.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/Kconfig')
0 files changed, 0 insertions, 0 deletions