[Bug 206049] alg: skcipher: p8_aes_xts encryption unexpectedly succeeded on test vector "random: len=0 klen=64"; expected_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[<flush>66.99%@+10, 33.1%@alignmask+1155]

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Tue Jan 7 22:03:28 AEDT 2020


https://bugzilla.kernel.org/show_bug.cgi?id=206049

Michael Ellerman (michael at ellerman.id.au) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |michael at ellerman.id.au

--- Comment #3 from Michael Ellerman (michael at ellerman.id.au) ---
Looks like other implementations check the size, can you try this:

diff --git a/drivers/crypto/vmx/aes_xts.c b/drivers/crypto/vmx/aes_xts.c
index d59e736882f6..9fee1b1532a4 100644
--- a/drivers/crypto/vmx/aes_xts.c
+++ b/drivers/crypto/vmx/aes_xts.c
@@ -84,6 +84,9 @@ static int p8_aes_xts_crypt(struct skcipher_request *req, int
enc)
        u8 tweak[AES_BLOCK_SIZE];
        int ret;

+       if (req->cryptlen < AES_BLOCK_SIZE)
+               return -EINVAL;
+
        if (!crypto_simd_usable() || (req->cryptlen % XTS_BLOCK_SIZE) != 0) {
                struct skcipher_request *subreq = skcipher_request_ctx(req);

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the Linuxppc-dev mailing list