Fix a crash in v2i_IPAddrBlocks()
authorMatt Caswell <matt@openssl.org>
Fri, 10 Jun 2022 11:33:45 +0000 (12:33 +0100)
committerHugo Landau <hlandau@openssl.org>
Mon, 25 Jul 2022 06:33:21 +0000 (07:33 +0100)
commit264a3f453c418dc01f4b74928ed2a76a08a65513
treef35e970983678910d3849e45475b6796a6164142
parentc3b0279bda7bf4f0f81a3dba952698fa68a51639
Fix a crash in v2i_IPAddrBlocks()

If an IP address prefix value is supplied that is too large then a crash
can result. v2i_IPAddrBlocks() should sanity check the prefix value, as
should X509v3_addr_add_prefix().

Reported by Theo Buehler (@botovq)

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18847)
crypto/x509v3/v3_addr.c
test/v3ext.c