postgresql/contrib/pgcrypto
Daniel Gustafsson 375d30bcbb pgcrypto: Fix check for buffer size
The code copying the PGP block into the temp buffer failed to
account for the extra 2 bytes in the buffer which are needed
for the prefix. If the block was oversized, subsequent checks
of the prefix would have exceeded the buffer size.  Since the
block sizes are hardcoded in the list of supported ciphers it
can be verified that there is no live bug here. Backpatch all
the way for consistency though, as this bug is old.

Author: Mikhail Gribkov <youzhick@gmail.com>
Discussion: https://postgr.es/m/CAMEv5_uWvcMCMdRFDsJLz2Q8g16HEa9xWyfrkr+FYMMFJhawOw@mail.gmail.com
Backpatch-through: v12
2024-01-30 11:15:46 +01:00
..
expected Add alternative output for OpenSSL 3 without legacy loaded 2021-09-25 11:27:28 +02:00
sql Fix corner case with 16kB-long decompression in pgcrypto, take 2 2020-07-27 15:58:54 +09:00
.gitignore
blf.c
blf.h
crypt-blowfish.c Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
crypt-des.c
crypt-gensalt.c
crypt-md5.c Add missing error check in pgcrypto/crypt-md5.c. 2020-10-16 11:59:25 -04:00
imath.c
imath.h
internal-sha2.c
internal.c
Makefile Remove support for upgrading extensions from "unpackaged" state. 2020-02-19 16:59:14 -05:00
mbuf.c
mbuf.h
md5.c
md5.h
openssl.c Disable OpenSSL EVP digest padding in pgcrypto 2021-09-25 11:27:20 +02:00
pgcrypto--1.0--1.1.sql
pgcrypto--1.1--1.2.sql
pgcrypto--1.2--1.3.sql
pgcrypto--1.3.sql
pgcrypto.c
pgcrypto.control Mark some contrib modules as "trusted". 2020-02-13 15:02:35 -05:00
pgcrypto.h
pgp-armor.c
pgp-cfb.c
pgp-compress.c Fix corner case with 16kB-long decompression in pgcrypto, take 2 2020-07-27 15:58:54 +09:00
pgp-decrypt.c pgcrypto: Fix check for buffer size 2024-01-30 11:15:46 +01:00
pgp-encrypt.c
pgp-info.c Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
pgp-mpi-internal.c Clear some style deviations. 2020-05-21 08:31:16 -07:00
pgp-mpi-openssl.c
pgp-mpi.c
pgp-pgsql.c Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
pgp-pubdec.c
pgp-pubenc.c
pgp-pubkey.c
pgp-s2k.c
pgp.c
pgp.h
px-crypt.c
px-crypt.h
px-hmac.c
px.c Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
px.h
rijndael.c
rijndael.h
rijndael.tbl
sha1.c
sha1.h