commit | 0a6f2bcaec59ba016a066c08245244ebaa2aac81 | [log] [tgz] |
---|---|---|
author | Markus S. Wamser <markus.wamser@mixed-mode.de> | Tue Mar 26 11:29:44 2019 +0100 |
committer | Jerome Forissier <jerome.forissier@linaro.org> | Wed Jun 26 08:47:36 2019 +0200 |
tree | af94a1cb5333978dcf57185574fbb6c5d829568c | |
parent | eb2046fc26783e09827eb26f6d41ea1190517c51 [diff] |
pem_to_pub_c.py: Add sanity check for public exponent of TA signing key This change fixes a potential security vulnerability. The public exponent of the TA signing key is stored by OP-TEE OS as an unsigned 32-bit integer. While rarely seen in the wild, public exponents that overflow this storage field exist. Although the C compiler usually generates an overflow warning when such an exponent would be set, this happens only once after the key was changed and is easily overlooked. With this change the script throws an exception, notifying the user of the unsuitable key. Without the sanity check, such an unsuitable key would simply lead to TA signature verification failures. However, if the public exponent e is close to a multiple of 2^32, a small exponent attack to forge a signature might be feasible. Signed-off-by: Markus S. Wamser <markus.wamser@mixed-mode.de> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> [jf: add file name to commit subject] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
This git contains source code for the secure side implementation of OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io.
// OP-TEE core maintainers