1. 13 12月, 2019 1 次提交
    • T
      crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize · 1e475dc4
      Tudor Ambarus 提交于
      commit 86ef1dfcb561473fbf5e199d58d18c55554d78be upstream.
      
      commit 394a9e044702 ("crypto: cfb - add missing 'chunksize' property")
      adds a test vector where the input length is smaller than the IV length
      (the second test vector). This revealed a NULL pointer dereference in
      the atmel-aes driver, that is caused by passing an incorrect offset in
      scatterwalk_map_and_copy() when atmel_aes_complete() is called.
      
      Do not save the IV in req->info of ablkcipher_request (or equivalently
      req->iv of skcipher_request) when req->nbytes < ivsize, because the IV
      will not be further used.
      
      While touching the code, modify the type of ivsize from int to
      unsigned int, to comply with the return type of
      crypto_ablkcipher_ivsize().
      
      Fixes: 91308019 ("crypto: atmel-aes - properly set IV after {en,de}crypt")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1e475dc4
  2. 03 3月, 2018 1 次提交
  3. 22 2月, 2018 1 次提交
  4. 06 11月, 2017 1 次提交
  5. 03 11月, 2017 4 次提交
  6. 22 9月, 2017 1 次提交
  7. 03 2月, 2017 2 次提交
  8. 01 11月, 2016 1 次提交
  9. 21 10月, 2016 2 次提交
  10. 11 3月, 2016 1 次提交
  11. 06 2月, 2016 1 次提交
  12. 30 1月, 2016 1 次提交
  13. 19 1月, 2016 1 次提交
  14. 23 12月, 2015 22 次提交