pgsql: pgcrypto: Fix check for buffer size

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: pgcrypto: Fix check for buffer size
Дата
Msg-id E1rUlLo-003pQP-Ql@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c29022164f8a25d7b22763374c10a0c8311abcff

Modified Files
--------------
contrib/pgcrypto/pgp-decrypt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: pgcrypto: Fix check for buffer size
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Add a failover option to subscriptions.