]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix a one byte buffer overflow in s_client
authorMatt Caswell <matt@openssl.foundation>
Wed, 11 Mar 2026 15:06:32 +0000 (15:06 +0000)
committerTomas Mraz <tomas@openssl.foundation>
Thu, 12 Mar 2026 17:56:51 +0000 (18:56 +0100)
commite0e276b50a1eb410a15100d6fe889fceaab16793
tree35e1926f39b6f608df45ef2ab840b379c04050eb
parent3e9863ade419783030b5fbc4b9ea84b195815cf9
Fix a one byte buffer overflow in s_client

The buffer used to process user commands when using advanced mode ("-adv")
can overflow the buffer by one byte if the the read buffer is exactly
BUFSIZZ bytes in length (16k). When processing the buffer we add a NUL
terminator to the buffer, so if the buffer is already full then we
overwrite by one byte when we add the NUL terminator.

This does not represent a security issue because this is entirely local
and would be "self-inflicted", i.e. not under attacker control.

This issue was reported to use by Igor Morgenstern from AISLE.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Mar 12 17:56:37 2026
(Merged from https://github.com/openssl/openssl/pull/30376)

(cherry picked from commit 440ac348bf7ad86aaed3eb6a18c7ce587dccb350)
apps/s_client.c