xts fuzz testing and lack of ciphertext stealing support

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

 



Hi,

With fuzz testing enabled, I am seeing xts(aes) failures on caam drivers.

Below are several failures, extracted from different runs:

[    3.921654] alg: skcipher: xts-aes-caam encryption unexpectedly succeeded on test vector "random: len=40 klen=64"; expected_error=-22, cfg="random: inplace use_finup nosimd src_divs=[57.93%@+11, 37.18%@+164, <reimport>0.68%@+4, 0.50%@+305, 3.71%@alignmask+3975]" 

[    3.726698] alg: skcipher: xts-aes-caam encryption unexpectedly succeeded on test vector "random: len=369 klen=64"; expected_error=-22, cfg="random: inplace may_sleep use_digest src_divs=[100.0%@alignmask+584]" 

[    3.741082] alg: skcipher: xts-aes-caam encryption unexpectedly succeeded on test vector "random: len=2801 klen=64"; expected_error=-22, cfg="random: inplace may_sleep use_digest src_divs=[100.0%@+6] iv_offset=18"

It looks like the problem is not in CAAM driver.
More exactly, fuzz testing is generating random test vectors and running
them through both SW generic (crypto/xts.c) and CAAM implementation:
-SW generic implementation of xts(aes) does not support ciphertext stealing
and throws -EINVAL when input is not a multiple of AES block size (16B)
-caam has support for ciphertext stealing, and allows for any input size
which results in "unexpectedly succeeded" error messages.

Any suggestion how this should be fixed?

Thanks,
Horia




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux