Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Mar 15, 2023
  2. Feb 16, 2023
  3. Jan 07, 2022
  4. Jan 05, 2022
  5. Nov 11, 2021
  6. Nov 10, 2021
  7. Aug 12, 2021
  8. Jul 09, 2021
    • Ben Hutchings's avatar
      Fix potential deadlock in CIOCCPHASH · 8ce239bd
      Ben Hutchings authored
      
      lockdep reports a potential deadlock when this ioctl is used,
      because crypto_copy_hash_state() takes mutexes in inconsistent
      order.
      
      1. In the first call to crypto_get_session_by_sid(), it is holding
         a fcrypt mutex when it locks a csession mutex.
      2. In the second call it is still holding a csession mutex  when it
         locks a fcrypt mutex.
      
      But there is an even simpler potential self-deadlock: the caller could
      pass the same session ID as both source and destination.
      
      Add a crypto_get_sessions_by_sid() that looks up and locks two
      sessions:
      
      * If the session IDs are the same, fail
      * If both sessions are found, lock their mutexes in address ordre
      
      Use this in crypto_copy_hash_state().
      
      Signed-off-by: default avatarBen Hutchings <ben.hutchings@mind.be>
      8ce239bd
    • Ben Hutchings's avatar
      Make CIOCCPHASH fail cleanly on sessions without hash state · 3b5cd014
      Ben Hutchings authored
      
      In case the CIOCCPHASH ioctl is used on a session that only has cipher
      state, this results in a null pointer dereference.
      
      Change cryptodev_hash_copy() to check that the hash_data structures it
      is given have been initialised.
      
      Signed-off-by: default avatarBen Hutchings <ben.hutchings@mind.be>
      3b5cd014
  9. Jul 02, 2021
  10. Jun 24, 2021
  11. Mar 09, 2021
  12. Mar 02, 2021
  13. Feb 18, 2021
  14. Feb 09, 2021
  15. Jan 27, 2021
  16. Dec 27, 2020
  17. Aug 31, 2020
  18. Aug 16, 2020
  19. Jul 28, 2020
  20. Jul 19, 2020
  21. Jul 13, 2020
  22. Jul 03, 2020
  23. Jul 02, 2020
  24. Jan 23, 2020
  25. Jan 22, 2020
  26. Dec 02, 2019
    • Andrei Botila's avatar
      cryptlib.c: fix build on kernel v5.5+ · 98b163a2
      Andrei Botila authored
      
      Starting with kernel v5.5-rc1 ablkcipher and blkcipher are removed and
      symmetric key operations will rely solely on skcipher:
      commit d63007eb954 ("crypto: ablkcipher - remove deprecated and unused ablkcipher support").
      
      When cryptodev will use higher kernel versions > 5.4 will need to use the
      skcipher interface instead.
      
      Signed-off-by: default avatarAndrei Botila <andrei.botila@nxp.com>
      98b163a2
  27. May 23, 2019
  28. Feb 11, 2019
    • Derald D. Woods's avatar
      Fix module loading with Linux v5.0-rc5 · f971e0cd
      Derald D. Woods authored
      
      This commit fixes this module load error:
      [...]
      [   29.112091] cryptodev: loading out-of-tree module taints kernel.
      [   29.128906] cryptodev: Unknown symbol crypto_givcipher_type (err -2)
      [   29.188842] cryptodev: Unknown symbol crypto_givcipher_type (err -2)
      modprobe: can't load module cryptodev (extra/cryptodev.ko): unknown symbol in module, or unknown parameter
      [...]
      
      Upstream Linux support for unused GIVCIPHER, and others, was dropped here:
      
      c79b411eaa72 (crypto: skcipher - remove remnants of internal IV generators)
      
      Signed-off-by: default avatarDerald D. Woods <woods.technical@gmail.com>
      f971e0cd
  29. Dec 20, 2018
  30. Nov 02, 2018
  31. Oct 31, 2018
    • Eneas U de Queiroz's avatar
      add CIOCCPHASH to copy hash state between sessions · 6b0a81c9
      Eneas U de Queiroz authored
      
      It is often useful to copy the partial state of a hash function to
      another session, so that it can be used as a base for two or more
      computations.
      
      The most prominent example is HMAC where all hashes start from
      a base determined by the key.  By copying the state to another
      session means that we only have to compute that base once rather
      than for each message.
      
      This creates a CIOCCPHASH ioctl, where the source and destination
      session ids are fed to the paramenter struct.  Both sessions must have
      been created before calling CIOCCPHASH.
      
      The ioctl uses the kernel ahash import/export calls, available since
      version 2.6.29.  The drivers were not required to implement these
      calls until version 4.17.
      
      OpenSSL requires this ioctl to avoid having to keep the contents of the
      whole message before it can calculate the digest.
      
      Signed-off-by: default avatarEneas U de Queiroz <cote2004-github@yahoo.com>
      6b0a81c9
Loading