commit | b2ee6b432e5a05ac12399515fbce710ba03e5c3d | [log] [tgz] |
---|---|---|
author | Hanno Becker <hanno.becker@arm.com> | Mon Jun 26 13:52:14 2017 +0100 |
committer | Hanno Becker <hanno.becker@arm.com> | Mon Jun 26 14:11:16 2017 +0100 |
tree | 0f58d31319cf01f039f786eb1aa272341f959d8c | |
parent | 8a2855ee3cf2fb3443e12233fcbbea4a9492b683 [diff] |
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K of virtual memory. This commit replaces the check by a safe version.