-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for data input size of CAAM CMAC do_update() #4583
Conversation
Could this be addressed? |
That's doable. However, I'm not sure to have something to merge before the release tomorrow unfortunately |
That's fine, it can be done later. I suppose adding a few
|
Fix a corner case where the CAAM would try to allocate an input DMA object with a size of 0 bytes. Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
Fix an issue in the CMAC do_update() operation that would happen in the following conditions: * a data temporay buffer full (16 bytes). * an input message of 16 bytes. These conditions would set the data size to be processed by the CAAM equals to zero. This would result on the loss of 16 bytes of the input message and a wrong CMAC. Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
f20fb8f
to
133cbad
Compare
@jforissier
Tag applied! |
@clementfaure excellent, thanks. |
Add a CMAC subtest where do_update operations are done with a data input size of 16 bytes. The CAAM CMAC driver does not properly handle multiple do_update operations with 16 bytes input data. Link: OP-TEE/optee_os#4583 Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org>
Add a CMAC subtest where do_update operations are done with a data input size of 16 bytes. The CAAM CMAC driver does not properly handle multiple do_update operations with 16 bytes input data. Link: OP-TEE/optee_os#4583 Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Add a CMAC subtest where do_update operations are done with a data input size of 16 bytes. This is a test case for a bug in the CAAM CMAC driver which would not handle properly consecutive do_update operations with input data size of 16 bytes. Link: OP-TEE/optee_os#4583 Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Add a CMAC subtest where do_update operations are done with a data input size of 16 bytes. This is a test case for a bug in the CAAM CMAC driver which would not handle properly consecutive do_update operations with input data size of 16 bytes. Link: OP-TEE/optee_os#4583 Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Hello,
These are two fixes for the CAAM CMAC we found while inspecting the code.
xtest does not cover these cases.
Thanks!
Clement