openssl/crypto/bio
Neil Horman 4bad474746 embed bio_dgram_data inside bio_dgram_sctp_data
the sctp BIO implementation uses the generic BIO dgram implementation
under the covers for some operations.  However, the private data for
each bio is incongruous, leading to segfaults when doing things like
passing a dgram_sctp_ctrl operation to the underlying dgram_ctrl method.

Fix this by removing the common fields between the two strcutres and
embedding a bio_dgram_data as the first member of the
bio_dgram_sctp_data struct.  This allows implicit casting when that call
path is taken, avoiding any memory mis-use

Fixes #20643

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22278)
2023-10-05 19:09:06 +02:00
..
bf_buff.c Copyright year updates 2023-09-07 09:59:15 +01:00
bf_lbuf.c Copyright year updates 2023-09-07 09:59:15 +01:00
bf_nbio.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
bf_null.c Update copyright year 2021-06-17 13:24:59 +01:00
bf_prefix.c Update copyright year 2021-06-17 13:24:59 +01:00
bf_readbuff.c Fix DER reading from stdin for BIO_f_readbuffer 2021-03-22 09:07:36 +10:00
bio_addr.c Copyright year updates 2023-09-28 14:23:29 +01:00
bio_cb.c BIO_sendmmsg/BIO_recvmmsg (API only) 2022-08-19 09:01:30 +01:00
bio_dump.c Update copyright year 2021-06-17 13:24:59 +01:00
bio_err.c BIO_s_dgram_pair 2022-09-23 11:59:13 +10:00
bio_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_local.h Copyright year updates 2023-09-07 09:59:15 +01:00
bio_meth.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_print.c Fix typos found by codespell 2023-09-13 08:13:08 +02:00
bio_sock.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
bio_sock2.c crypto/*: Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:01 +11:00
bss_acpt.c Copyright year updates 2023-09-07 09:59:15 +01:00
bss_bio.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
bss_conn.c Copyright year updates 2023-09-07 09:59:15 +01:00
bss_core.c Update copyright year 2022-05-03 13:34:51 +01:00
bss_dgram.c embed bio_dgram_data inside bio_dgram_sctp_data 2023-10-05 19:09:06 +02:00
bss_dgram_pair.c Fix a failure in bio_dgram_test on the NonStop platform 2023-09-13 11:53:13 +01:00
bss_fd.c crypto: Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:01 +11:00
bss_file.c crypto: Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:01 +11:00
bss_log.c Copyright year updates 2023-09-07 09:59:15 +01:00
bss_mem.c Copyright year updates 2023-09-07 09:59:15 +01:00
bss_null.c Update copyright year 2021-06-17 13:24:59 +01:00
bss_sock.c Copyright year updates 2023-09-28 14:23:29 +01:00
build.info BIO_s_dgram_pair 2022-09-23 11:59:13 +10:00
ossl_core_bio.c Copyright year updates 2023-09-07 09:59:15 +01:00