tinyAES128 in C bug

最新进展:这个库已经重命名为tiny-AES-c,并增加了192和256加密,看andreas-wehrmann和作者进行的对话,应该是修复了这个bug,我没有进行测试。

在对AES加密解密功能进行压力测试时, 单片机进入硬件错误, 怀疑使用的库tinyAES128有内存溢出, 经过Google, 发现已经有人遇到同样的问题。暂时放弃tinyAES128,改用mbedTLS,没有发现问题。

The library tiny-AES128-C contains a buffer overflow in its AES128_CBC_encrypt_buffer() function, where 15 bytes beyond the end of the input buffer can be overwritten.

The library tiny-AES128-C, available from https://github.com/kokke/tiny-AES128-C , contains a buffer overflow in its AES128_CBC_encrypt_buffer() function, where 15 bytes beyond the end of the input buffer can be overwritten. For instance, if the function is invoked with an input buffer of length 33, the bytes at offsets 33…47 with respect to the beginning of the input buffer will be overwritten. An attacker controlling either the key or the plaintext has some latitude to choose the values of some of the bytes thus overwritten.
A fix for the buffer overflow was first proposed by GitHub user andreas-wehrmann in the form of a pull request: https://github.com/kokke/tiny-AES128-C/pull/18
Vincent Benayoun and I fixed a residual issue (a longish writeup can be found at http://trust-in-soft.com/the-sociology-of-open-source-security-fixes-continued/ )
The principal author for the library, who appeared to have abandoned it at the time, has since fixed compiler warnings in tiny-AES128-C, but has not at the time of this writing integrated any fix for the buffer overflow: https://github.com/kokke/tiny-AES128-C/commit/7c959460a188611c26aa45c54c6e8b96b7ac163a

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 文/壹花 001那些呼啸而来的经典 监制王家卫,摄影鲍德熹,美术指导张叔平,演员梁朝伟金城武陈奕迅杜鹃,奔着这个组...
    严妍阅读 940评论 0 2
  • 文/西纬九度 当你剪去刘海,笑声和眼角的鱼尾纹一起收起,可曾诅咒那一长串操蛋的命运。只一个兜兜转转,她已不是她,你...
    西纬九度阅读 592评论 10 15
  • 今年我兴匆匆的给自己定了很多目标,没敢定太大,画画的目标也就每周画2幅,随便画。可是目前我发现这完全超额完成了o(...
    悟空的变画阅读 372评论 4 6
  • 撒落在心口的盐 —伍艺迩 阳光,雨露; 花开,花落; 云卷,云舒; 秋去,春来; 又,一年。 说相遇,那是...
    伍艺迩阅读 249评论 0 2
  • 天底下没有完美的事,鱼和熊掌不能兼得的,这是真理。 我承认我贪lu
    欢心阅读 136评论 0 0