qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a5d2f4: crypto: ensure XTS is only used with


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a5d2f4: crypto: ensure XTS is only used with ciphers with ...
Date: Mon, 12 Sep 2016 05:30:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a5d2f44d0d3e7523670e103a8c37faed29ff2b76
      
https://github.com/qemu/qemu/commit/a5d2f44d0d3e7523670e103a8c37faed29ff2b76
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-09-12 (Mon, 12 Sep 2016)

  Changed paths:
    M crypto/cipher-gcrypt.c
    M crypto/cipher-nettle.c
    M tests/test-crypto-cipher.c

  Log Message:
  -----------
  crypto: ensure XTS is only used with ciphers with 16 byte blocks

The XTS cipher mode needs to be used with a cipher which has
a block size of 16 bytes. If a mis-matching block size is used,
the code will either corrupt memory beyond the IV array, or
not fully encrypt/decrypt the IV.

This fixes a memory corruption crash when attempting to use
cast5-128 with xts, since the former has an 8 byte block size.

A test case is added to ensure the cipher creation fails with
such an invalid combination.

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: d9269b274a9a08c8cbae14deb514d4e30b4095cf
      
https://github.com/qemu/qemu/commit/d9269b274a9a08c8cbae14deb514d4e30b4095cf
  Author: Gonglei <address@hidden>
  Date:   2016-09-12 (Mon, 12 Sep 2016)

  Changed paths:
    M crypto/init.c
    M crypto/tlscredsx509.c
    M tests/crypto-tls-x509-helpers.h

  Log Message:
  -----------
  crypto: fix building complaint

gnutls commit 846753877d renamed LIBGNUTLS_VERSION_NUMBER to 
GNUTLS_VERSION_NUMBER.
If using gnutls before that verion, we'll get the below warning:
crypto/tlscredsx509.c:618:5: warning: "GNUTLS_VERSION_NUMBER" is not defined

Because gnutls 3.x still defines LIBGNUTLS_VERSION_NUMBER for back compat, Let's
use LIBGNUTLS_VERSION_NUMBER instead of GNUTLS_VERSION_NUMBER to fix building
complaint.

Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: 90d6f60d0727df084b62674bf2310ac74467a5a4
      
https://github.com/qemu/qemu/commit/90d6f60d0727df084b62674bf2310ac74467a5a4
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-09-12 (Mon, 12 Sep 2016)

  Changed paths:
    M crypto/block.c
    M crypto/cipher-builtin.c
    M crypto/cipher-gcrypt.c
    M crypto/cipher-nettle.c

  Log Message:
  -----------
  crypto: report enum strings instead of values in errors

Several error messages print out the raw enum value, which
is less than helpful to users, as these values are not
documented, nor stable across QEMU releases. Switch to use
the enum string instead.

The nettle impl also had two typos where it mistakenly
said "algorithm" instead of "mode", and actually reported
the algorithm value too.

Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>


  Commit: d4c61988b846f6a887f5c9d703b7ff9cad8513ff
      
https://github.com/qemu/qemu/commit/d4c61988b846f6a887f5c9d703b7ff9cad8513ff
  Author: Peter Maydell <address@hidden>
  Date:   2016-09-12 (Mon, 12 Sep 2016)

  Changed paths:
    M crypto/block.c
    M crypto/cipher-builtin.c
    M crypto/cipher-gcrypt.c
    M crypto/cipher-nettle.c
    M crypto/init.c
    M crypto/tlscredsx509.c
    M tests/crypto-tls-x509-helpers.h
    M tests/test-crypto-cipher.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/berrange/tags/pull-qcrypto-2016-09-12-1' into staging

Merge qcrypto 2016/09/12 v1

# gpg: Signature made Mon 12 Sep 2016 12:02:20 BST
# gpg:                using RSA key 0xBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <address@hidden>"
# gpg:                 aka "Daniel P. Berrange <address@hidden>"
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/pull-qcrypto-2016-09-12-1:
  crypto: report enum strings instead of values in errors
  crypto: fix building complaint
  crypto: ensure XTS is only used with ciphers with 16 byte blocks

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/c569c537e5c6...d4c61988b846

reply via email to

[Prev in Thread] Current Thread [Next in Thread]