mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Uniformize bounds checks using new macro
This commit uses the previously defined macro to uniformize bounds checks in several places. It also adds bounds checks to the ClientHello writing function that were previously missing. Also, the functions adding extensions to the ClientHello message can now fail if the buffer is too small or a different error condition occurs, and moreover they take an additional buffer end parameter to free them from the assumption that one is writing to the default output buffer. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
7ea4b4d70a
commit
f8f61aad0f
4 changed files with 258 additions and 170 deletions
9
ChangeLog.d/uniformize_bounds_checks.txt
Normal file
9
ChangeLog.d/uniformize_bounds_checks.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Bugfix
|
||||
* Add additional bounds checks in ssl_write_client_hello() preventing
|
||||
output buffer overflow if the configuration declared a buffer that was
|
||||
too small.
|
||||
Changes
|
||||
* Abort the ClientHello writing function as soon as some extension doesn't
|
||||
fit into the record buffer. Previously, such extensions were silently
|
||||
dropped. As a consequence, the TLS handshake now fails when the output
|
||||
buffer is not large enough to hold the ClientHello.
|
||||
Loading…
Add table
Add a link
Reference in a new issue