]> git.ipfire.org Git - thirdparty/openssl.git/commit
SSL_set1_groups_list(): Fix memory corruption with 40 groups and more
authorMichael Baentsch <57787676+baentsch@users.noreply.github.com>
Mon, 19 Feb 2024 05:41:35 +0000 (06:41 +0100)
committerMichael Baentsch <57787676+baentsch@users.noreply.github.com>
Thu, 22 Feb 2024 13:36:26 +0000 (14:36 +0100)
commitd9d260eb95ec129b93a55965b6f2f392df0ed0a9
tree032fced6ebcd57b094e9d3e16a05b137287da1cb
parent6f794b461c6e16c8afb996ee190e084cbbddb6b8
SSL_set1_groups_list(): Fix memory corruption with 40 groups and more

Fixes #23624

The calculation of the size for gid_arr reallocation was wrong.
A multiplication by gid_arr array item size was missing.

Testcase is added.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Cherry-pick from https://github.com/openssl/openssl/pull/23625)

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23661)
ssl/t1_lib.c
test/sslapitest.c
test/tls-provider.c