]> git.ipfire.org Git - thirdparty/openssl.git/commit
ossl_rio_poll_builder_add_fd(): Fixup pfds after reallocation
authorsashan <anedvedicky@gmail.com>
Wed, 11 Jun 2025 06:23:38 +0000 (08:23 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 13 Jun 2025 10:39:20 +0000 (12:39 +0200)
commit65184bf9de91594a1d257f00d021bf5b1f5421c9
tree067f527cec7ca30101b8e959b3323d76c7903e6d
parent654bae104045cb96937d9e7bbc0e731b63158a2b
ossl_rio_poll_builder_add_fd(): Fixup pfds after reallocation

Local variable `pfds` used in `ossl_rio_poll_builder_add_fd()` must be consistent
with `rpb->pfd_heap`. The function maintains array of SSL objects for SSL_poll(3ossl).
It works with no issues until we need to reallocate `rbp->pfd_heap` in `rpb_ensure_alloc()`.
After `rpb_ensure_alloc()` returns we must update local variable `pfds` with `rpb->pfd_heap`
not doing so makes function to write to dead buffer.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27804)

(cherry picked from commit 5ee8248d083c00583d52350ed9464bfb58d2f60c)
ssl/rio/poll_builder.c