Advertisement
moften

Buffer overflow in tiny-AES128-C

Oct 15th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. 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.
  2.  
  3. 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
  4.  
  5. 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/ )
  6.  
  7. 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement